Mitsubishi Electric M800VW Series Programming Manual page 300

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 WXNR(P) or DXNR(P) instructions.
 Program example
 The following program performs a non-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
1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1
 The following program conducts a non-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
1 1 1
0 0 1 0 0
 The following program compares the bit patterns of the 32-bit data located from X20 to X3F with the bit patterns of the data
at D16 and D17 when X6 is ON, and stores the same number of bits at D18.
X6
0
8
[Ladder mode]
WXNR D20 D10
END
XNR
[Ladder mode]
WXNR K3X10 D33 D100
END
X1B
X18X17
X14X13
XNR
1 1 1 1 1 0
[Ladder mode]
DXNRP
K8X20 D16
DSUMP
D16
D18
END
Steps
0
1
4
Steps
0
1
5
X10
0
0
Steps
0
1
4
7
279
[List mode]
Inst.
Device
LD
X0A
WXNR
D20
D10
END
[List mode]
Inst.
Device
LD
XA
WXNR
K3X10
D33
D100
END
[List mode]
Inst.
Device
LD
X6
DXNRP
K8X20
D16
DSUMP
D16
D18
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents