S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
227
Bit logic operations
8.1.1
LAD and FBD are very effective for handling Boolean logic. While SCL is especially effective
for complex mathematical computation and for project control structures, you can use SCL
for Boolean logic.
Table 8- 1 Normally open and normally closed contacts
Statement;
ELSE
Statement;
Normally open and normally closed contacts: You can connect contacts
to other contacts and create your own combination logic. If the input bit
you specify uses memory identifier I (input) or Q (output), then the bit
value is read from the process-image register. The physical contact sig-
nals in your control process are wired to I terminals on the PLC. The CPU
scans the wired input signals and continuously updates the correspond-
ing state values in the process-image input register.
You can perform an immediate read of a physical input using ":P" follow-
ing the I offset (example: "%I3.4:P"). For an immediate read, the bit data
values are read directly from the physical input instead of the process
image. An immediate read does not update the process image.
Statement;
ELSE
Statement;
END_IF;
Table 8- 2 Data types for the parameters
● The Normally Open contact is closed (ON) when the assigned bit value is equal to 1.
● The Normally Closed contact is closed (ON) when the assigned bit value is equal to 0.
● Contacts connected in series create AND logic networks.
● Contacts connected in parallel create OR logic networks.