6 Application Instructions API 00-49 Before the execution, assume D10 = K1234 and D20 = K5678. After the execution, D10 will remain unchanged and D20 will become K5128. Program Example 2: When M1168 = On (in BIN mode) and SMOV instruction is in use, D10 and D20 will not be converted in BCD format but be moved in BIN format (4 digits as a unit). M1000 X0 Digit 4 Digit 3 Digit 2 Digit 1 D10(BIN 16 bits) Moving digits Digit 4 Digit 3 Digit 2 Digit 1 D20(BIN 16 bits) Unchanged U nchanged Before the execution, assume D10 = H1234 and D20 = H5678. After the execution, D10 will remain unchanged and D20 will become H5128. Program Example 3: 1.
This instruction can be used to combine the DIP switches connected to the input terminals with interrupted No. 2. Move the 2 nd right digit of the DIP switch to the 2 nd right digit of D2, and the 1 st left digit of the DIP switch to the 1 st right digit of D1. 3. Use SMOV instruction to move the 1 st digit of D1 to the 3 rd digit of D2 and combine the two DIP switches into one. 10 1 10 0 10 2 M1001 M1168 M1000 (X20~X27)BCD (X10~X13)BCD 2 digits D2(BIN) 1 digit D1(BIN) DVP-PLC Application Manual 6-24 M 1168 S MOV D10 K4 K2 D20 K3 6 4 2 8 8 8 4 2 8 X13~X10 X27~X20 PLC BIN K2X20 D2 BIN K1X10 D1 SMOV D1 K1 K1 D2 K3