M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.6 Logical Operation Instructions
Operation errors
There are no arithmetic errors associated with the WAND(P) or DAND(P) instructions.
Program example
The following program masks the digit in the 10s place of the BCD 4-digit value at D10 (second digit from the end) to 0
when XA turns ON.
XA
0
4
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
D10 BCD1234
1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1
HFF0F
D10 BCD1204
0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0
The following program performs a logical product operation on the data from X10 to X1B and the data at D33 when XA is
ON, and outputs the results to D50.
XA
0
5
0 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1
X1B〜X10
Seen as "0"
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
D33
D50
0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0
IB-1501667-B
[Ladder mode]
WANDP H0FF0F D10
END
AND
[Ladder mode]
WAND K3X10 D33 D50
END
X1B
X18X17
X14X13
AND
Steps
0
1
3
4
Steps
0
1
5
X10
266
[List mode]
Inst.
Device
LD
X0A
WANDP
H0FF0F
D10
END
[List mode]
Inst.
Device
LD
XA
WAND
K3X10
D33
D50
END