Mitsubishi Electric M800VW Series Programming Manual page 296

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

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 WXOR(P) or DXOR(P) instructions.
 Program example
 The following program performs an exclusive OR operation on the data at D10 and D20 when XA is ON, and stores the
result at D10.
XA
0
5
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
D10
0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1
D20
D10
0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0
 The following program conducts an exclusive OR operation on the data from X10 to X1B and the data at D33 when XA is
ON, and outputs the result to D100.
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
D100
0 0 0 1
 The following program compares the bit pattern of the 32-bit data from X20 to X3F with the bit patterns of the data at D9
and D10 when X6 is ON, and stores the number of differing bits at D16.
X6
0
8
[Ladder mode]
WXOR D20 D10
END
XOR
[Ladder mode]
WXOR K3X10 D33 D100
END
X1B
X18X17
X14X13
XOR
1
0
1 1
0 0
0 0
[Ladder mode]
DXORP K8X20 D9
DSUMP D9
D16
END
Steps
0
1
4
Steps
0
1
5
X10
0 1
1 1
Steps
0
1
4
7
275
[List mode]
Inst.
Device
LD
X0A
WXOR
D20
D10
END
[List mode]
Inst.
Device
LD
XA
WXOR
K3X10
D33
D100
END
[List mode]
Inst.
Device
LD
X6
DXORP
K8X20
D9
DSUMP
D9
D16
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents