PLC Program to Measure the Scan Cycle of PLC
This is a PLC Program to Measure the Scan Cycle of PLC.
Problem Description
Measure the scan cycle of a PLC using Ladder Diagram programming language.
Problem Solution
Use toggling output which toggles every time scan cycle is completed.
This can be done by connecting an XIO contact and an output in series with the same addresses.
Use this toggling bit as an input to up counter to increment number of times the bit toggles.
Use 1sec timer to stop the counter from counting, because the bit is toggling continuously and it might
unnecessarily increment counter value even after 1sec is over.
Reset counter to clear the accumulator data to measure the scan cycle again.
PLC Program
Here is PLC program to Measure the Scan Cycle of PLC, along with program explanation and run time
test cases.
List
of Inputs and Outputs
O:2/0
= Toggling output
(Output)
B3:0/0 =
Latching Bit
(Bit)
I:1/0
= Start measurement PB
(Input)
I:1/1
=
Reset Counter PB
(Input)
T4:1
= 1sec time delay
(Timer)
C5:0
= Up counter
to increment each toggle
(Counter)
O:6
= Display address
(Output)
TOD
=
Hex to BCD conversion
(Compute)
T4:0/DN = Stop counting
(Timer)
-(RES)- =
Reset Counter coil
(Output)