Basic instructions
8.1 Bit logic operations
S7-1200 Programmable controller
228 System Manual, V4.2, 09/2016, A5E02486680-AK
FBD AND, OR, and XOR boxes
In FBD programming, LAD contact networks are transformed into AND (&), OR (>=1), and
EXCLUSIVE OR (x) box networks where you can specify bit values for the box inputs and
outputs. You may also connect to other logic boxes and create your own logic combinations.
After the box is placed in your network, you can drag the "Insert input" tool from the
"Favorites" toolbar or instruction tree and then drop it onto the input side of the box to add
more inputs. You can also right-click on the box input connector and select "Insert input".
Box inputs and outputs can be connected to another logic box, or you can enter a bit
address or bit symbol name for an unconnected input. When the box instruction is executed,
the current input states are applied to the binary box logic and, if true, the box output will be
true.
Table 8- 3 AND, OR, and XOR boxes
in2;
All inputs of an AND box must be TRUE for the output to be
TRUE.
Any input of an OR box must be TRUE for the output to be
TRUE.
in2;
An odd number of the inputs of an XOR box must be TRUE for
the output to be TRUE.
1
For SCL: You must assign the result of the operation to a variable to be used for another statement.
Table 8- 4 Data types for the parameters