Page 88

Petruzella_ProgrammableLogicControllers__5e

Conveyor_1_Sensor <Local:1:I.Data.4> Conveyor_2_Sensor <Local:1:I.Data.5> Ladder logic program CTU Count Up Counter Preset Accum Conveyor_1_Parts.DN CTU Count Up Counter Preset Accum ADD Add Source A Source B Dest Conveyor_2_Parts.DN Manual_Conveyor_Reset <Local:1:I.Data.2> Inputs Conveyor_1_Sensor Conveyor_2_Sensor Manual_Conveyor_Reset Conveyor 1 Conveyor 2 Conveyor 3 L1 Tag Name Value Style Data Type Conveyor_1_Parts Conveyor_1_Parts.PRE Conveyor_1_Parts.ACC Conveyor_1_Parts.CU Conveyor_1_Parts.DN Conveyor_2_Parts Conveyor_2_Parts.PRE Conveyor_2_Parts.ACC Conveyor_2_Parts.CU Conveyor_2_Parts.DN Conveyor_1_Sensor Conveyor_2_Sensor Conveyor_3_Parts Manual_Conveyor_Reset Figure 15-82  Program used as part of a parts tracking system. Conveyor_1_Parts 250 30 Conveyor_2_Parts 250 70 Conveyor_1_Parts.ACC 30 Conveyor_2_Parts.ACC 70 Conveyor_3_Parts CU DN CU DN 100 Conveyor_2_Parts RES Conveyor_1_Parts RES { . . . } 250 30 0 0 { . . . } 250 70 0 0 0 Decimal Decimal Decimal Decimal Decimal Decimal Decimal Decimal Decimal COUNTER DINT DINT BOOL BOOL COUNTER DINT DINT BOOL BOOL BOOL 0 100 0 Decimal Decimal Decimal BOOL DINT BOOL it is logically false. In this example Value_1 (1420) is greater than Value_2 (1200) so the Greater_Than_PL is energized. The compare (CMP) instruction performs a comparison on the arithmetic operations specified by the expression. The expression may contain arithmetic operators, comparison operators, and tags. The execution of a CMP instruction CMP Bit LIM MEQ EQU NEQ LES GRT Timer/Counter Input/Output Compare Figure 15-83  Compare toolbar for the ControlLogix controller. Math, Comparison, and Move Instructions  Part 5 377


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above