Program instructions
7.1 Bit logic
S7-200 SMART
176
System Manual, V2.3, 07/2017, A5E03822230-AF
Logic Stack example: LAD networks transformed into STL code
LAD
STL
Network 1
LD I0.0
LD I0.1
LD I2.0
A I2.1
OLD
ALD
= Q5.0
Network 2
LD I0.0
LPS
LD I0.5
O I0.6
ALD
= Q7.0
LRD
LD I2.1
O I1.3
ALD
= Q6.0
LPP
A I1.0
= Q3.0
7.1.5
NOT
LAD
FBD
STL
Description
NOT
The Not instruction (NOT) inverts the state of the power flow input.
LAD: The NOT contact changes the state of power flow input. When
power flow reaches the NOT contact, it stops. When power flow does
not reach the NOT contact, it supplies power flow.
FBD: The NOT instruction is represented as a graphical negation (bub-
ble) symbol on Boolean box input connectors and functions as a logic
state inverter.
STL: The NOT instruction changes the value on the top of the stack
from 0 to 1, or from 1 to 0.
See also
Bit logic input examples (Page 182)