5 Applied Instructions and Basic Usage
Example 3
The two digits of the value of the DIP switch on the right are transferred to the
the two digits of the value in D2 which start from the second digit of the value in
D2, and the one digit of the value of the DIP switch on the left is transferred to
the the first digit of the value in D1. The instruction SMOV can be used to
transfer the first digit of the value in D1 to the third digit of the value in D2. In
other words, the two DIP switches can be combined into one DIP switch by
means of the instruction SMOV.
X13~X10 X27~X20
20PM
642
81 81
81
10
2
10
1
10
0
M1000
BIN K2X20 D2
BIN
K1X10 D1
SMOV D1 K1 K1 D2 K3
(X20~X27) Binary-code decimal value
2 digits D2 (Binary value)
(X10~X13) Binary-code decimal value
1 digit D1 ( )Binary value
M1001
M1168
DVP-20PM Application Manual
5-28