When Stop PB with address I:1/1 is pressed, Position is reset to 0 and all the outputs are de-energized.
Runtime Test Cases
PLC Program to Measure Time Taken by an Event
This is a PLC Program to Measure Time Taken by an Event.
Problem Description
There are certain objects moving on conveyor belt. Time of an object to reach from one end to another
end of the conveyor is to be measured. Implement this in PLC using
Ladder Diagram programming
language.
Problem Diagram
Problem Solution
Install two proximity switches, one at the head end and another at the tail end.
When first proximity detects an object, it latches and output starting timer.
When another proximity placed at the tail end detects the same object, timer is stopped.
Move preset value to any register or output displays.
This shows time taken by an event.
Similar phenomena can be applied to measure time taken to fill an empty tank.
PLC Program
Here is PLC program to Measure Time Taken by an Event, along with program explanation and run time
test cases.
List
of Inputs and Outputs
I:1/0
=
Start Measurement
(Input)
I:1/1
=
Stop Measurement
(Input)
I:1/2
=
Head proximity
(Input)
I:1/3
=
Tail Proximity
(Input)
T4:0
= Retentive Timer to measure time (Timer)
N7:0
= Register to store measured time (Register)
O:6
= (Display)
To display measured time
(Output)
-(RES)- =
Reset Retentive timer
(Reset)