5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-143
API
Applicable model
20PM
259
MMOV
P
P
Converting a 16-bit value into a
32-bit value
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
* *
* * * * * * * * *
D
* * * * * * * *
Note: Please refer to specifications for more information about device
ranges.
16-bit instruction (5 steps)
MMOV
Continuity
instruction
MMOVP
Pulse
instruction
32-bit instruction
- - - -
Flag: None
Explanation
The value in the 16-bit device S is transferred to the 32-bit device D. The sign
bit in S is duplicated, and stored in D.
S: Source device (16-bit device); D: Destination device (32-bit device)
Example
When X23 is ON, the value in D4 is transferred to D6 and D7.
X23
MMOV D4
D6
0011 1
0
0
0
11
1
1000
b15
b0
00 0 00
1111
D7, D6
1
1
1111111
b31
b16
1
b0
b15
D4
0
1
1
00
1
111
1
11
11
"" +
sign
0
1
"" -
sign
Bit 15 is D4 is transferred to bit 15~ bit 31 in (D7, D6). The value in (D7, D6)
becomes a negative value. (The value in D4 is also a negative value.)