Page 72

Petruzella_ProgrammableLogicControllers__5e

Input Ladder logic program Output L1 L2 Timer_Button Timer_Button <Local:1:I.Data.0> Pilot_Light_Timer.EN TON TIMER ON DELAY Timer Preset Accum Pilot_Light_Timer Pilot_Light_Timer.DN Pilot_Light_Timer Figure 15-54  Pilot light TON timer. Green_PL <Local:2:O.Data.3> L • Momentary detection of the target by the SOL_ Deenergize_Sensor causes the opening of its contacts and resets the program to its original state. Figure 15-54 shows a program that uses a TON timer to illuminate a green pilot light for 20 seconds each time a momentary button is pressed. In addition to the TON timer this program uses multiple outputs on one rung, output latch and unlatch instructions, as well as a timer reset instruction. The operation of the program can be summarized as follows: • Initially closing the Timer_Button sets (latches) the Green_PL on and enables the Pilot_Light_Timer. Green_ PL 20000 0 Green_PL EN DN <Local:2:O.Data.3> RES U • When the button is then opened the timer rung remains true through the logic path created by the Pilot_Light_Timer.EN bit. • After 20000 ms (20 s) have elapsed the timer DN bit is set to reset the timer to its original state and unlatch the Green_PL and switch it off. The ControlLogix program of Figure 15-55 shows three TON timers cascaded (connected together) for traffic light control. The ladder logic used is the same as that used to program the traffic lights using the SLC 500 controller. The different tags created to fit the program are Ladder logic program Amber_Light_Timer.DN Red_Light_Timer.DN TON TIMER ON DELAY Timer Preset Accum Red_Light_Timer Green_Light_Timer.DN Red_Light_Timer.EN Green_Light_Timer.EN Amber_Light_Timer.EN TON TIMER ON DELAY Timer Preset Accum TON TIMER ON DELAY Timer Preset Accum Red_Light_Timer.DN 30000 0 Green_Light_Timer 25000 0 Amber_Light_Timer 5000 0 EN DN EN DN EN DN <Local:2:O.Data.0> Green_Light_Timer.DN Amber_Light_Timer.DN <Local:2:O.Data.1> <Local:2:O.Data.2> Figure 15-55  ControlLogix traffic control program. Red_Light Outputs Red_ Light Amber_ Light Green_ Light L2 Green_Light Amber_Light Programming Timers  Part 3 361


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above