PLC Program to Simply Latch and Unlatch an Output
This is a PLC Program to Simply Latch and Unlatch an Output.
Problem Description
Perform Latching and Unlatching of an output (Pilot Light, Motor, Solenoid Coil etc.).
Problem Solution
Almost all the PLCs come along with Latch and Unlatch instructions inbuilt.
They all must be used in two rungs in order to operate an output.
Different manufactures have provided different names to these Instructions.
Allen Bradley PLCs have -(L)- for Latching and -(U)- for Unlatching instructions, Siemens PLCs have (S) for
Set and (R) for Reset instructions. Similarly, Omron PLCs have KEEP instruction for latching.
All these instructions perform the same task of Latching when one input is pressed and Unlatching when
another input is pressed.
Two Push Buttons are required to perform this task.
Any output to be Latched is required which is connected physically as an output device.
PLC Program
Here is PLC program to Simply Latch and Unlatch an Output, along with program explanation and run
time test cases.
List of Inputs & Outputs
SW1 = Switch1
I:1/0 & 0.00
(Input to Latch)
SW2 = Switch2
I:1/1 & 0.01
(Input to Unlatch)
Bit
stored to latch
100.00
(Stored Bit Address)
Output
O:2/0 & 200.00
(Output Light)