And And Andn - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions

AND and ANDN

AND:
Takes the logical AND of the value of a BOOL variable and the execution condition.
ANDN:
Takes the logical AND of the inverse of the value of a BOOL variable and the execution
condition.
Instruction
Name
AND
AND
ANDN
AND NOT
Variables
None
Function
 AND
The AND instruction takes the logical AND of the value of a specified BOOL variable and the execution
condition and outputs it to the next instruction. Use the AND instruction for a NO bit connected in series
with the previous instruction.
 ANDN
The ANDN instruction takes the logical AND of the inverse of the value of a specified BOOL variable
and the execution condition and outputs it to the next instruction. Use the ANDN instruction for a NC bit
connected in series with the previous instruction.
The following figure shows a programming example of the AND instruction. It takes the logical AND of
variable A and variable B and outputs it to variable C.
B
A
LD
AND
instruction
instruction
A
B
It takes the logical AND of variable A and
variable B and outputs the result to variable C.
2-18
FB/FUN
Graphic expression
---
Variable
Upward
differentiation
---
Variable
Upward
differentiation
C
Out
instruction
C
result:=vBool1 AND vBOOL2;
Variable
result:=vBool1 & vBool2;
Variable
Downward
differentiation
result:=vBool1 AND NOT
Variable
vBool2;
Variable
Downward
differentiation
NY-series Instructions Reference Manual (W560)
ST expression

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents