And, Or, And Exclusive Or Instructions - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual

AND, OR, and Exclusive OR Instructions

AND Byte, AND Word, and AND Double Word
The AND Byte (ANDB), AND Word (ANDW), and AND
Double Word (ANDD) instructions AND the corresponding
bits of two input values IN1 and IN2 and load the result in a
memory location OUT.
OR Byte, OR Word and OR Double Word
The OR Byte (ORB), OR Word instruction (ORW), and OR
Double Word (ORD) instructions OR the corresponding bits
of two input values IN1 and IN2 and load the result in a
memory location OUT.
Exclusive OR Byte, Exclusive OR Word, and
Exclusive OR Double Word
The Exclusive OR Byte (XROB), Exclusive OR Word
(XORW), and Exclusive OR Double Word (XORD)
instruction XOR the corresponding bits of two input values
IN1 and IN2 and load the result in a memory location OUT.
SM Bits and ENO
For all of the instructions described on this page, the
following conditions affect SM bits and ENO.
Error conditions that set ENO = 0
H 0006 (indirect address)
SM bits affected:
H SM1.0 (zero)
Table 6-52
Valid Operands for the AND, OR, and Exclusive OR Instructions
Inputs/Outputs
IN1, IN2
OUT
162
Data Types
Operands
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
WORD
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Constant
DWORD
ID, QD, VD, MD, SMD, SD, LD, AC, HC, *VD, *LD, *AC, Constant
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
WORD
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, *VD, *AC, *LD
DWORD
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *AC, *LD

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents