Siemens SIMATIC S7 System Manual page 164

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

100BBasic instructions
7.1 Bit logic
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 7- 3
AND, OR, and XOR boxes
FBD
SCL
out := in1 AND
in2;
out := in1 OR
in2;
out := in1 XOR
in2;
For SCL: You must assign the result of the operation to a variable to be used for another statement.
1
Table 7- 4
Data types for the parameters
Parameter
IN1, IN2
164
Description
1
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.
An odd number of the inputs of an XOR box must be TRUE for the output
to be TRUE.
Data type
Bool
Description
Input bit
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents