This article discusses the Packing Machine Control System for selecting products using the XG-5000 PLC Software. The product will be carried by a Conveyor, the system will select products that have a standard weight. Products with non-standard weight will be eliminated by being Dropped into the Collector Tank by a Piston. All products carried by the Conveyor will be counted in the “OK Products” and “Not OK Products” categories.
PLC Packing Machine Control System
The following are the I/Os in the program.
- The PB_START (0.00) button is used to turn ON the system.
- The PB_STOP (0.01) button is used to turn OFF the system.
- The RESET_COUNTER (0.02) button is used to Reset the Counter data.
- The SENS_PRODUCT (P00002) sensor is used to detect products carried by the Conveyor.
- Limit Switch LS_PISTON (P00003) is used to provide feedback if the Piston in the Forward state.
Before this system is Run, the “Set Value” parameter for the Standard Weight of the product must be set in the memory word SV_WEIGH (D00001).
When this system is turned ON, the Conveyor CONVEYOR (P00040) will Run to carry the product.
Conveyor (P00040) will Stop for 2 seconds when the SENS_PRODUCT (P00002) Sensor detects that the product has arrived at the Weighing Area.
If the product has a weight that matches the Standard Weight “Set Value” parameter, then the Conveyor CONVEYOR (P00040) will Run again to carry the product to the destination area.
If the product weight does not match the Standard Weight “Set Value” parameter, the Piston PISTON (P00041) will Drop the product into the Collector Tank, and then, the Conveyor CONVEYOR (P00040) will Run again.
The quantity of products that have a Standard Weight will be counted in the memory word COUNTER_OK (D00010).
The quantity of products with non-standard weight will be counted in the memory of the word COUNTER_NOT_OK (D00011).
Program Addressing
Comment | Input (I) | Output (Q) | Memory Word | Memory Bits | Timer |
PB_START | P00000 | ||||
PB_STOP | P00001 | ||||
SENS_PRODUCT | P00002 | ||||
LS_PISTON | P00003 | ||||
RESET_COUNTER | P00004 | ||||
CONVEYOR | P00040 | ||||
PISTON | P00041 | ||||
TIMER1 | T0000 | ||||
PV_WEIGH | D00000 | ||||
SV_WEIGH | D00001 | ||||
COUNTER_OK | D00010 | ||||
COUNTER_NOT_OK | D00011 | ||||
SYSTEM_ON | M00000 | ||||
IR_CUTOFF1 | M00001 |
XG5000 PLC Programming
RUNG 1
In this Rung, when the PB_START (P00000) button is Pressed, the memory bit SYSTEM_ON (M00000) changes to HIGH state. The memory bit SYSTEM_ON (M00000) remains in the HIGH state even though the PB_START (P00000) button has been Released because it uses the SET Coil instruction.
RUNG 4
In this Rung, the memory bit SYSTEM_ON (M00000) will change to LOW state if the PB_STOP (P00001) button is Pressed. Because it uses the RESET Coil instruction.
RUNG 7
In this rung, when the RESET_COUNTER (0.02) button is Pressed, the values in memory word COUNTER_OK (D00010) and COUNTER_NOT_OK (D00011) will be reset to zero “0”.
RUNG 13
When the NO contact of memory bit SYSTEM_ON (M00000) in the HIGH state, the Output CONVEYOR (P00040) will be ON.
If the NO contact of memory bit SYSTEM_ON (M00000) in the LOW state or the NC contact of memory bit IR_CUTOFF1 (M00001) in the HIGH state, then the CONVEYOR (P00040) Output will be OFF.
RUNG 17
In this Rung, if the NO contacts of memory bit SYSTEM_ON (M00000) and The Sensor SENS_PRODUCT (P00002) are in the HIGH state, then the memory bit IR_CUTOFF1 (M00001) will be in the HIGH state.
Because it uses the SET Coil Instruction, the memory bit IR_CUTOFF1 (M00001) will remain in the HIGH state even though the SENS_PRODUCT (P00002) Sensor in the LOW state.
RUNG 21
When the NO contact of memory bit IR_CUTOFF1 (M00001) in the HIGH state, the Timer TIMER1 (T0000) will Start counting up to 2 seconds.
RUNG 24
When the NO contact of TIMER1 (T0000) in the HIGH state and the value in memory word PV_WEIGH (D00000) is Equal to SV_WEIGH (D00001), then the memory bit IR_CUTOFF1 (M00001) will be in the LOW state and the value in memory word COUNTER_OK (D00010) will increase (+1).
RUNG 33
When the NO contact of TIMER1 (T0000) in the HIGH state and the value in memory word PV_WEIGH (D00000) is Not Equal to SV_WEIGH (D00001), then the Output PISTON (P00041) will be ON.
Because it uses the SET Coil Instruction, the PISTON (P00041) Output will remain ON even though the NO contact of TIMER1 (T0000) in the LOW state.
RUNG 38
In this Rung, if the Limit Switch LS_PISTON (P00003) in the HIGH state, then the Output PISTON (P00041) will be OFF, the memory bit IR_CUTOFF1 (M00001) will be in the LOW state, and the value in memory word COUNTER_NOT_OK (D00011) will increase (+1).
Read Next:
- FactoryTalk View Studio Import and Export
- Structured Text vs. Instruction List for PLC
- Create a User-Defined Function Block in Codesys
- Structured Text PLC Example for Motor Interlock
- Allen Bradley PLC to PLC Communication Tutorial