8 Application Instructions API 100-149 Operands: S 1 : Multiplicand S 2 : Multiplicator D : Product Explanations: 1. In 16-bit instruction, D occupies one device. 2. In 32-bit instruction, D occupies 2 consecutive devices. 3. See the specifications of each model for their range of use. 4. Flag: M1022 (carry flag) 5. This instruction multiplies S 1 by S 2 in BIN format and stores the result in D . Be careful with the positive/negative signs of S 1 , S 2 and D when doing 16-bit and 32-bit operations. 6. The instruction supports EH3/EH3L/SV2 series PLCs whose version is 1.82 or above. 7. In 16-bit BIN multiplication, S 1 D S 2 b15................ b0 X = b15................
b0 b15................ b0 b15 is a symbol bit. b15 is a symbol bit. b15 is a symbol bit. 16 bits x 16 bits = 16 bits Symbol bit = 0 refers to a positive value. Symbol bit = 1 refers to a negative value. When D serves as a bit device, it can designate K1 ~ K4 and construct a 16-bit result, occupying 16-bit data. 8. In 32-bit BIN multiplication, S 1 S 1 +1 S 2 S 2 +1 D D +1 b31.......b16 b15.........b0 b31.......b16 b15.........b0 X = b31 is a symbol bit b31 is a symbol bit b31 is a symbol bit 32 bits x 32 bits = 32 bits Symbol bit = 0 refers to a positive value. Symbol bit = 1 refers to a negative value.
When D serves as a bit device, it can designate K1 ~ K8 and construct a 32-bit result, occupying consecutive 32-bit data. Program Example 1: If M0 is On, the 16-bit D0 is multiplied by the 16-bit D10 and a 16-bit product is produced. The 16-bit data is stored in DVP-PLC Application Manual 8-26 API Mnemonic Operands Function 114 MUL16 MUL32 P 16-bit Multiplication 32-bit Multiplication Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F MUL, DMULP: 7 steps DMUL, DMULP:
13 steps S 1 * * * * * * * * * * S 2 * * * * * * * * * * D * * * * * * * PULSE 16-bit 32-bit SA SX SC EH SV EH3 ES EX SS SA SX SC EH SV EH3 ES EX SS SA SX SC EH SV EH3 ES EX SS SV2 SV2 SV2 b31.......b16 b15.........b0