This article will discuss an Automated Bottle Inspection System using XG-5000 PLC software. This system will select the quality of bottles carried by a conveyor. The system will sort bottles into Good and Bad quality categories. When the system detects the presence of a bottle, it will check the bottle’s quality for 5 seconds, then the first actuator will push the bottle onto the conveyor track. At the end of the conveyor track, there will be a second actuator that will direct the bottle to a container for good-quality bottles or to a container for bad-quality bottles. The system will also count the number of bottles that have been selected.
Program Objective
System Sequence:
1. Start System: Upon system startup, all system components will be in Standby mode.
2. Bottle Detected:
- When the proximity sensor detects a bottle, Conveyor-A and Conveyor-C will start moving.
- The system will provide a 5-second delay for the vision sensor to inspect the bottle quality.
- Actuator-1 will push the bottle onto the Conveyor-A track.
3. Bottle OK:
- If the detected bottle is of good quality, Actuator-2 will activate to direct the bottle onto the Conveyor-B track.
- Conveyor B will transport the bottle to the good-quality bottle storage container.
4. Bottle BAD:
- If the detected bottle is of poor quality, Actuator-2 will not activate, causing the bottle to be directed onto the Conveyor-C track.
- Conveyor-C will transport the bottle to the poor-quality bottle storage container.
5. After the bottle has entered the storage container, all conveyors will stop, and the bottle will be counted.
6. The bottle counter data can be reset by pressing the “Reset” button.
PLC-Based Bottle Grading System
I/O Addressing
S.No. | Comment | Input (I) | Output(Q) | Memory Bit | Memory Word | Timer |
1 | START | P0000 | ||||
2 | STOP | P0001 | ||||
3 | PROXIMITY_SENS | P0002 | ||||
4 | VISION_SENS | P0004 | ||||
5 | LS_ACTUATOR_1 | P0005 | ||||
6 | BOTTLE_OK_SENS | P0006 | ||||
7 | BOTTLE_BAD_SENS | P0007 | ||||
8 | RESET_COUNTER | P0008 | ||||
9 | ACTUATOR_1 | P0040 | ||||
10 | ACTUATOR_2 | P0042 | ||||
11 | CONVEYOR_A | P0041 | ||||
12 | CONVEYOR_B | P0043 | ||||
13 | CONVEYOR_C | P0044 | ||||
14 | COUNTER_BOTTLE_BAD | D0001 | ||||
15 | COUNTER_BOTTLE_OK | D0000 | ||||
16 | SYSTEM_ON | M0000 | ||||
17 | TIMER_ACTUATOR_1 | T000 |
PLC Program
RUNG 1 (START_SYSTEM)
In this Rung, the memory bit SYSTEM_ON (M0000) will be in the HIGH state when the START (P0000) button is Pressed. Because it uses Latching, the memory bit SYSTEM_ON (M0000) will remain in the HIGH state even though the START (P0000) button has been Released.
The memory bit SYSTEM_ON (M0000) will be in the LOW state if the STOP (P0001) button is Pressed.
RUNG 3 (ACTUATOR 1 ON)
In this Rung, when the NO contact of memory bit SYSTEM_ON (M0000) and sensor PROXIMITY_SENS (P0002) are in the HIGH state, the TIMER_ACTUATOR_1 (T000) Timer will Start counting up to 5 seconds.
After Timer TIMER_ACTUATOR_1 (T000) has finished counting, the output ACTUATOR_1 (P0040) will be ON. Because it uses Latching, the ACTUATOR_1 (P0040) output will remain ON even though the NO contact of the sensor PROXIMITY_SENS (P0002) is in the LOW state.
The output ACTUATOR_1 (P0040) will return OFF if the NC contact of Limit Switch LS_ACTUATOR_1 (P0005) is in the HIGH state.
RUNG 18 (CONVEYOR A ON)
In this Rung, if the NO contact of memory bit SYSTEM_ON (M0000) and the Limit Switch LS_ACTUATOR_1 (P0005) are in the HIGH state, then the CONVEYOR_A (P0041) output will be ON. Because it uses Latching, the CONVEYOR_A (P0041) output will remain ON even though the NO contact of the Limit Switch LS_ACTUATOR_1 (P0005) is in the LOW state.
The CONVEYOR_A (P0041) output will return OFF if the NC contact of Sensors BOTTLE_OK_SENS (P0006) and BOTTLE_BAD_SENS (P0007) are in the HIGH state.
RUNG 27 (ACTUATOR 2 & CONVEYOR B ON)
When the NO contact of memory bit SYSTEM_ON (M0000) and sensor VISION_SENS (P0004) are in the HIGH state, the outputs CONVEYOR_B (P0042) and ACTUATOR_2 (P0042) will be ON. Because it uses Latching, the outputs CONVEYOR_B (P0042) and ACTUATOR_2 (P0042) will remain ON even though the NO contact of Sensor VISION_SENS (P0004) is in the LOW state.
The outputs CONVEYOR_B (P0042) and ACTUATOR_2 (P0042) will be OFF when the NC contact of Sensor BOTTLE_OK_SENS (P0006) is in the HIGH state.
RUNG 38 (CONVEYOR C ON)
When the NO contact of memory bit SYSTEM_ON (M0000) and Sensor PROXIMITY_SENS (P0002) are in the HIGH state, the CONVEYOR_C (P0044) output will be ON. Because it uses Latching, the CONVEYOR_C (P0044) output will remain ON even though the NO contact of Sensor PROXIMITY_SENS (P0002) is in the LOW state.
The CONVEYOR_C (P0044) output will be OFF when the NC contact of Sensors BOTTLE_OK_SENS (P0006) and ACTUATOR_2 (P0042) are in the HIGH state.
RUNG 46 (COUNTER OK BOTTLE)
When the NO contact of memory bit SYSTEM_ON (M0000) and the BOTTLE_OK_SENS (P0006) Sensor are in the HIGH state, the value in the memory word COUNTER_BOTTLE_OK (D0000) will increase (+1). Because it uses the ADD Instruction.
RUNG 54 (COUNTER BAD BOTTLE)
When the NO contact of memory bit SYSTEM_ON (M0000) and Sensor BOTTLE_BAD_SENS (P0007) is in the HIGH state, the value in the memory word COUNTER_BOTTLE_BAD (D0001) will increase (+1). Because it uses the ADD Instruction.
RUNG 62 (RESET COUNTER)
When the RESET_COUNTER (P0008) button is Pressed, the values in the memory words COUNTER_BOTTLE_OK (D0000) and COUNTER_BOTTLE_BAD (D0001) will be reset to zero “0”. Because the MOV instruction moves the zero value “0” to the memory words COUNTER_BOTTLE_OK (D0000) and COUNTER_BOTTLE_BAD (D0001).
Read Next:
- PLC Automatic Empty Bottle Detection
- Ladder Logic Example with Timers
- Automatic Bottle Filling System using PLC
- Converter Instruction in Siemens PLC
- PLC Programming on Bottle Line Control