Word Logic Operations; And, Or, And Xor Instructions - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents
100BBasic instructions

7.9 Word logic operations

GetError and GetErrorID can be used to send error information from the currently executing
block (called block) to a calling block. Place the instruction in the last network of the called
block program to report the final execution status of the called block.
7.9
Word logic operations
7.9.1

AND, OR, and XOR instructions

Table 7- 125 AND, OR, and XOR instruction
LAD / FBD
SCL
out := in1 AND in2;
out := in1 OR in2;
out := in1 XOR in2;
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
1
To remove an input, right-click on an input stub for one of the existing IN parameters (when
there are more than the original two inputs) and select the "Delete" command.
Table 7- 126 Data types for the parameters
Parameter
IN1, IN2
OUT
The data type selection sets parameters IN1, IN2, and OUT to the same data type.
1
The corresponding bit values of IN1 and IN2 are combined to produce a binary logic result at
parameter OUT. ENO is always TRUE following the execution of these instructions.
226
To add an input, click the "Create" icon or right-click on an input stub for one of the
existing IN parameters and select the "Insert input" command.
Data type
Byte, Word, DWord
Byte, Word, DWord
Description
AND: Logical AND
OR: Logical OR
XOR: Logical exclusive OR
Description
Logical inputs
Logical output
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents