Friday, 3 February 2012
A PLC works by continually scanning a program. We can think of this scan cycle
as consisting of 3 important steps. There are typically more than 3 but we can focus on
the important parts and not worry about the others. Typically the others are checking the
system and updating the current internal counter and timer values. The first type of
scanning, as shown in the diagram below, is not as common as the type that will be
The first step is to check the input status. This step is therefore generally referred
to as the “Check Input Status” stage. First the PLC takes a look at each input to determine
if it is on or off. In other words, is the sensor connected to the first input on? How about
the second input? How about the third? This goes on and on through the entire program.
It records this data into its memory to be used during the next step.
Next the Programmable logic controllers executes your program one instruction at a time, called the
Execute Program stage. For example, if your program said that if the first input was on
then it should turn on the first output. Since it already knows which inputs are on/off
from the previous step it will be able to decide whether the first output should be turned
on based on the state of the first input. It will store the execution results for use later
during the next step
Finally the PLC updates the status of the outputs. It updates the outputs based on
which inputs were on during the first step and the results of executing your program
during the second step. Based on the example in step 2 it would now turn on the first
output because the first input was on and your program said to turn on the first output
www.pacontrol.comwhen this condition is true.
A new style of scanning has been implemented in the more recent years, called
“rung scanning”. This type basically scans each ladder rung individually in the entire
ladder logic program, updating the outputs on that rung after scanning through the inputs.
This changes the type of programming that will be used as well. If an output is in a rung
above the inputs it depends on, you will not get the output updated until the next scan, as
the program will keep scanning down until the last rung, then start over. This style is very
advantageous in certain situations. If you want your outputs updated at the soonest
possible moment, this is the style of scanning that you want to use
Posted by remotechengineers at 03:40