3. Instruction Set

API

 

Mnemonic

Operands

Function

 

 

 

 

 

 

 

122

 

D

EMUL

P

 

Floating point multiplication

 

 

 

 

 

 

 

Controllers

ES2/EX2 SS2 SA2 SX2

SE

Type

Bit Devices

 

 

 

 

Word devices

 

 

 

 

 

 

Program Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP

X

Y

M

S

K

H

KnX

KnY

KnM

KnS

T

C

D

E

 

F

 

DEMUL, DEMULP: 13

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

steps

 

 

S1

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

S2

 

 

 

 

*

*

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-bit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

 

 

 

 

 

 

 

 

SE

SE

 

SE

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Multiplicand

S2: Multiplicator D: Multiplication result

 

 

 

 

 

 

 

 

 

 

 

Explanations:

1.S1 S2 = D. The floating point value in S1 is multiplied with the floating point value in S2 and the result is D. The multiplication is conducted in binary floating point format

2.If S1 or S2 is designated as constant K or H, the instruction will convert the constant into a binary floating point value before the operation

3.S1 and S2 can designate the same register. In this case, if the instruction is specified as “continuous execution instruction” (generally DEMULP instruction) and the drive contact is ON, the register will be multiplied once in every scan.

4.Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag)

If absolute value of the result exceeds max. floating point value, carry flag M1022 = ON.

If absolute value of the result is less than min. floating point value, borrow flag M1021 = ON. If the conversion result is 0, zero flag M1020 = ON.

Program Example 1:

When X1 = ON, binary floating point (D1, D0) multiplies binary floating point (D11, D10) and the result is stored in (D21, D20).

X1

DEMUL D0 D10 D20

Program Example 2:

When X2 = ON, K1234 (automatically converted into binary floating point value) multiplies binary floating point (D1, D0) and the result is stored in (D11, D10).

X2

DEMUL K1234 D0 D10

3 - 3 0 5

Page 421
Image 421
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Emul, DEMUL, Demulp