Or And Orn - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions

OR and ORN

OR:
Takes the logical OR of the value of a BOOL variable and the execution condition.
ORN:
Takes the logical OR of the inverse of the value of a BOOL variable and the execution condi-
tion.
Instruction
Name
OR
OR
ORN
OR NOT
Variables
None
Function
 OR
The OR instruction takes the logical OR of the value of a specified BOOL variable and the execution
condition and outputs it to the next instruction. Use the OR instruction for a NO bit connected in parallel
with the previous instruction. Use the OR instruction to configure a logical OR between an NO bit and
one of the following: a LD or LDN instruction connected directly to the bus bar, or the logic block starting
with a LD or LDN instruction and ending with the instruction immediately before the OR instruction.
 ORN
The ORN instruction takes the logical OR of the inverse of the value of a specified BOOL variable and
the execution condition and outputs it to the next instruction. Use the ORN instruction for a NC bit con-
nected in parallel with the previous instruction. Use the ORN instruction to configure a logical OR
between an NC bit and one of the following: a LD or LDN instruction connected directly to the bus bar,
or the logic block starting with a LD or LDN instruction and ending with the instruction immediately
before the ORN instruction.
The following figure shows a programming example of the OR instruction. It takes the logical OR of vari-
able A and variable B and outputs it to variable C.
LD instruction
A
B
Out instruction
OR instruction
2-20
FB/FUN
---
Variable
Variable
Variable
---
Variable
C
Graphic expression
Variable
Variable
Variable
Variable
Variable
Variable
Upward
Upward
Upward
Downward
Downward
Downward
differentiation
differentiation
differentiation
differentiation
differentiation
differentiation
Variable
Variable
Upward
Downward
differentiation
differentiation
NY-series Instructions Reference Manual (W560)
ST expression
result:=vBool1 OR vBool2;
result:=vBool1 OR NOT
vBool2;

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents