bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 6: the enhancement of the box utilization

Hello everyone, and welcome back with a new tutorial in our ladder logic programming. Today we will continue the bottle line production line using ladder logic programming. Let me remind you, everyone; we have seen how to utilize the bit shift left instruction BSL to save the data that describes the state of a bottle, including the present state, size state, either large or small size and the excellent and broken state as well. And also we utilized these states to energize the large bottle and scrap solenoid to divert the bottles to the appropriate position and conveyor. At the end of the day, we have separated small, large, and scrap bottles. Today we are going to manage the scraping of the broken bottle.

Bottle line Scraping management 

In each bottle line process, we have a common and critical problem with removing and eliminating the scraping of broken bottles. Figure 1 shows that on the main conveyor, there are broken bottles. We need to prevent them from processing and take them out to be ground and removed. We have a conveyor on the second row on the left for this mission. For what? For collecting the output of the grinder in boxes, as you can see on the conveyor, take them out of the line. That outlines what we need to do, but how about the details? Follow up, and you will get to know.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 1: bottle line scraping management

Project Requirements

In this project, we need to pick the broken bottles, diver them to the grinder, and take the scrap through the conveyor out of the process. Many subtasks we need to do, like deciding on the broken bottles and classifying them into large and small for the size of the scrap boxes, given that the large bottles are 2/3 and the small bottles are 1/3. Also, one sub-task activates the scrap driver solenoid on time when there is a broken bottle. Also, the grinder needs to run all the time. And we are counting the broken and good bottles by classifying the size of the bottles. We have been requested to do this task to avoid the scenario of unmanaged scraping, as shown in figure 2.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 2: the scenario of unmanaged scraping

The inputs and outputs associated with this process

Table 1 lists the IOs of the process, including the name, addresses, and descriptions. These are not all the IOs in the project. We will use these most important parts to develop the scrap management process.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Table 1: scraping management IOs

-

Addresses

Description

Scraping gate

O:2/4

Solenoid to control the scraping gate

The Grinder

O:2/3

The grinder motor for grinding the broken bottles

Box sensor LS10

I:1/15

The limit switch to detect the boxes edges

Scrap conveyor

O:2/1

The conveyor motor of the scrap 

Selector switch A

I:1/2

To select and control the counters display (small bottle)  

Selector switch B

I:1/3

To select and control the counters display  (large bottle)

Selector switch C

I:1/4

To select and control the counters display  (scarp)

Screen BCD

O:4

The screen BCD output

Screen small bottles control

O:2/11

The output to control the small bottle display

Screen large bottles control

O:2/12

The output to control the large bottle display

Screen scrap bottles control

O:2/13

The output to control the scrap bottle display

Screen boxes control

O:2/14

The output to control the boxes display

Projects ladder logic program

Because the logic is extended, we will present it piece by piece. Figure 3 shows the first piece of the scraping removal process. Describe this to you, my friends; the first rung runs the large bottle size diverter solenoid by sensing a presence of a large size bottle thank to using the match bit of the 32 bits of the saved register B3:6 and B3:7. Similarly, rung 3 energizes the large bottle conveyor to give space for the next bottle and prevents the crash from happening. The third rung is not that different; it runs the broken bottle diverter thanks to the saved broken bottles in 32 bits of b3:8 and b3:9. Then counter of type count up is used to count the large, the small broken bottles, and the large broken bottles.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 3: the ladder logic code of part 1 of the scrap management project

Figure 4 shows the second portion of the ladder logic program of the scrap management process; you can see, everyone, in rung number 9, the multiply instruction is used to calculate the 2/3 and the 1/3 portion of the large and small bottles. And at the end, we use add instructions to get the sum of the total scrap. For the logic sequence, let us jump just a moment to rung number 11, which checks the sum we have obtained in tinged nine that represents the whole amount of scrap, including the small and the large bottles—testing using the LIM instruction to see if it is between the limit of the capacity of the box. If it is within the boundary of total capacity, the box should move by commanding the scrap conveyor. Backing to rung number 10, it is when the box reaches the limit switch position that the counter is reset to start over the scraping cycles. Counter reset includes the large and small size bottle counters.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 4: the ladder logic code of part 2 of the scrap management project

Testing the scrap process

After completing the requested logic, we will check it, as shown in figure 5. This screen capture of the run process is brilliant because it shows all the subtasks we need to do in this project. First, you guys can see one of the broken bottles goes to the grinder once it has reached the correct position.  Also, you can see the small bottles going on the main conveyor and the large bottles going over the large bottles conveyor. Also, the most important thing you can notice is the filled boxes on the scrap conveyor in the second row and on the left. You can see boxes are being filled and moved through the scrap conveyor. The boxes are not equally filled because the limit we set is composed of 2/3rd of the large bottles and 1/3rd of the small bottles when we need to know how many of each we might have each time. We can continue tuning the limit in the code until reaching the most utilization of the box size.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 5: the testing of the scraping project

Figure 6 shows how using the scrap boxes happens by adapting the limits in the LIM instructions.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 6: the enhancement of the box utilization

The last part we need to do to complete the scrap management is to display the counters on the displays we have. We need to display the small, large, and scrap counters on the screens on the bottom right part of the project screen. Figure 7 shows the piece of code of our ladder logic program that does that logic. It is just moving the counters’ accumulators to the BCd outputs based on the output control bits controlled by the selector switch's inputs. For example, to display the small bottles processed so far, we energize the output O:2/11 when the selector switch is at position A and then use that output to invoke the MOV instruction to move the values from the small bottles counter accumulator to the screen output O:4. Same scenario to manage all the screens for the large bottles, and scrap bottles counters.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 7: the ladder logic piece of code to display the counters on the BCD screens

Testing the displays

Figure 8 shows how successful the counter’s accumulators have been displayed on the BCD screens thanks to the last piece of code of the ladder logic program we discussed.

bottle line scraping management, bottle line scraping management plc, bottle line scraping management ladder logic, bottle filling and capping with plc
Figure 8: the display of the counters

What’s next???

Thanks so much, my friends, for following up on the end of this tutorial, in which we have covered a good part of the bottle line project. That part was about getting rid of the scrap and classifying the bottle based on size, small and large. Also, we have shown how to display small, large, and scrap counters on the BCD screens. Next time we will complete a critical part of that project: filling and capping the bottles by completing the code that manages the capping station and filling station. So please be there, and I hope to see you soon with our incoming ladder logic programming series tutorial.