2-295
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Bit String Processing Instructions
2
AryAnd, AryOr, AryXor, and AryXorN
z AryXor
If both bits are the same, then the processing result is FALSE. If one bit is TRUE and the other is
FALSE, then the processing result is TRUE.
z AryXorN
If both bits are the same, then the processing result is TRUE. If one bit is TRUE and the other is FALSE,
then the processing result is FALSE.
The following example shows the AryAnd instruction when Size is UINT#3.
• The data types of In1[], In2[], and AryOut[] must be the same.
• Use an AryOut[] array that has at least as many elements as the value of Size.
• The values in AryOut[] do not change if the value of Size is 0.
• Return value Out is not used when the instruction is used in ST.
• An error occurs in the following cases. ENO will be FALSE, and AryOut[] will not change.
• In1[], In2[], and AryOut[] have different data types.
• The value of Size exceeds the number of elements in In1[], In2[], or AryOut[].
Bit of ele-
ment in In1[]
Bit of ele-
ment in In2[]
Bit of Ary-
Out[]
FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE FALSE
Bit of ele-
ment in In1[]
Bit of ele-
ment in In2[]
Bit of Ary-
Out[]
FALSE FALSE TRUE
FALSE TRUE FALSE
TRUE FALSE FALSE
TRUE TRUE TRUE
Precautions for Correct Use
AryAnd(abc[1], def[2], UINT#3, ghi[3]);
LD ST
UINT#3
abc[1]
def[2]
ghi[3]
ghi[3]
AryAnd
EN ENO
In1
In2
Size
AryOut
In1[0]=abc[1]
In1[1]=abc[2]
In1[2]=abc[3]
Size=UINT#3
TRUE
FALSE
FALSE
In2[0]=def[2]
In2[1]=def[3]
In2[2]=def[4]
AND
AND
AND
AryOut[0]=ghi[3]
AryOut[1]=ghi[4]
AryOut[2]=ghi[5]
TRUE
TRUE
FALSE
TRUE
FALSE
FALSE