Delta DVP-ES2 User Manual
Page 502
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g
3 - 3 8 6
API Mnemonic
Operands
Function
168
D MVM P
Transfer Designated Bits
Controllers
ES2/EX2 SS2 SA2
SE
SX2
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S
K H
KnX
KnY KnM KnS T C D E F
S
1
*
*
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
*
*
*
*
D
*
*
*
*
*
*
*
*
*
MVM, MVMP: 7 steps
DMVM,DMVMP:
13 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S
1
: Source device 1 S
2
: Bits to be masked (OFF) D: D =( S
1
& S
2
) | ( D & ~ S
2
)
Explanations:
1.
The instruction conducts logical AND operation between S
1
and S
2
first, logical AND operation
between D and ~S
2
secondly, and combines the 1
st
and 2
nd
results in D by logical OR
operation.
2.
Rule of Logical AND operation: 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0, 1 AND 1 = 1
3.
Rule of Logical OR operation: 0 OR 1= 1, 1 OR 0 = 1, 0 OR 0 = 0, 1 OR 1 = 1.
Program Example 1 :
When X0 = ON, MVM instruction conducts logical AND operation between 16-bit register D0 and
H’FF00 first, logical AND operation between D4 and H’00FF secondly, and combines the 1
st
and 2
nd
results in D4 by logical OR operation.
MVM
X0
D0
HFF00
D4
0 1 0 1 0 1 0 1
1
1 0 1 0 1 0
1 1 1
1 1
1 0 0
0
0 0
1
1
0 0
0
1 0 1
1 0
0 0 0 0 0 0
0 0
1
0
AND
b15
b0
執行前
執行後
D0=HAA55
HFF00
D4=HAA34
HAA00
0 0 1 1 0 1 0 0
0
0 1 0 0 1 0
0 0 0
0 0
0 1 1
1
1 1
0
0
1 1
1
0 0 0
0 0
0 0 0 1 1 0
0 0
0
1
AND
b15
b0
D4=H1234
H00FF
H0034
OR
1 0 1
1 0
0 0 0 1 1 0
0 0
1
1
Program Example 2 :
Simplify instructions:
WAND
X0
HFF00
D110
D110
MVM
X0
D110
HFF00
D120
WAND H00FF
D120
D120
WOR
D100
D120
D120
=