114 Programmable Logic Controllers: Hardware and Programming
Figure 6-19 illustrates one scan cycle for a PLC ladder diagram.
Each PLC operational cycle has three separate scan parts: (1) input
scan, (2) program scan, and (3) output scan.
These three PLC scan sections can be described as follows:
1. Input scan—the processor reads the input ports and updates the
input status table.
Data from input ports input status table.
2. Program scan—the processor executes the PLC program and
updates the output status table.
Find the answer output status table.
3. Output scan—output status table values are transferred to the
output terminals.
Data from output status table output ports.
Instruction Instruction Full Name Description
Examines a normally open bit for an
ON condition
Examine if Closed XIC
Examines a normally closed bit for an
OFF condition
Examine if Open XIO
Turns ON a bit or an output port
(non-retentive)
Output Energize OTE
Latches a bit (retentive) Output Latch OTL
Unlatches a bit (retentive) Output Unlatch OTU
OSR One-Shot Rising Turns ON a bit for one scan only
Table 6-3. Single-bit instructions for controlling input and output data.
0000
0001
0002
Stop Start Motor
Motor
Green light
O:2
O:2
I:1 I:1
O:2
0
1 0 0
Motor
O:2
0
1
End
Figure 6-18. PLC ladder logic diagram for the relay logic diagram shown in Figure 6-13.