Page 81

Petruzella_ProgrammableLogicControllers__5e

Input L1 L2 Container_Sensor <Local:1:I.Data.2> Container_Counter_Max.DN Container_Counter_Counts Container_Counter_Max Figure 15-71  CTU program used to remove containers from a conveyor line. • The Increment_PL controlled by the Package_ Counter.CU status bit turns on and off as each bottle passes to show that the counter is incrementing. • When the accumulated value of the counter is 24 the DN bit of the counter is set and switches on the Preset_Reached_PL. • The counter is reset by momentarily closing the Reset_Button. The program shown in Figure 15-71 uses two CTU instructions as part of a program to remove 5 out of every 10 containers from a conveyor line using an electric solenoid. The different tags created to fit the program are shown in Figure 15-72. The operation of the program can be summarized as follows: • The preset for the Container_Counter_Counts is set for 6 and that for the Container_Counter_Max is set to 11. • When the container is detected both counters will increase their accumulated values by 1. 370 Part 4  Programming Counters Container_Sensor <Local:1:I.Data.2> SOL <Local:2:O.Data.2> Container_Counter_Counts.DN Ladder logic program CTU Count Up Counter Preset Accum Container_Counter_Counts Output Sensor Solenoid SOL Container_Sensor CU DN CTU Count Up Counter Preset Accum Container_Counter_Max CU DN RES RES Tag Name Value Style Data Type Container_Counter_Counts Container_Counter_Counts .PRE Container_Counter_Counts .ACC Container_Counter_Counts .CU Container_Counter_Counts .CD Container_Counter_Counts .DN Container_Counter_Counts .OV Container_Counter_Counts .UN {...} 6 0 0 0 0 0 0 Decimal Decimal Decimal Decimal Decimal Decimal Decimal COUNTER DINT DINT BOOL BOOL BOOL BOOL BOOL Container_Counter_Max Container_Counter_Max .PRE Container_Counter_Max .ACC Container_Counter_Max .CU Container_Counter_Max .CD Container_Counter_Max .DN Container_Counter_Max .OV Container_Counter_Max .UN {...} 11 0 0 0 0 0 0 Decimal Decimal Decimal Decimal Decimal Decimal Decimal COUNTER DINT DINT BOOL BOOL BOOL BOOL BOOL Container_Sensor 0 Decimal BOOL SOL 0 Decimal BOOL Figure 15-72  Tags created for the CTU program used to remove containers from a conveyor line.


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above