17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

122 D EMUL P Floating point multiplication<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type<br />

Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F<br />

S 1 * * *<br />

S 2 * * *<br />

D *<br />

Operands:<br />

S 1 : Multiplicand S 2 : Multiplicator D: Multiplication result<br />

Explanations:<br />

DEMUL, DEMULP: 13<br />

steps<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

1. S 1 × S 2 = D. The floating point value in S 1 is multiplied with the floating point value in S 2 and the<br />

result is D. The multiplication is conducted in binary floating point format<br />

2. If S 1 or S 2 is designated as constant K or H, the instruction will convert the constant into a<br />

binary floating point value before the operation<br />

3. S 1 and S 2 can designate the same register. In this case, if the instruction is specified as<br />

“continuous execution instruction” (generally DEMULP instruction) and the drive contact is ON,<br />

the register will be multiplied once in every scan.<br />

4. Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag)<br />

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

If absolute value of the result is less than min. floating point value, borrow flag M1021 = ON.<br />

If the conversion result is 0, zero flag M1020 = ON.<br />

Program Example 1:<br />

When X1 = ON, binary floating point (D1, D0) multiplies binary floating point (D11, D10) and the<br />

result is stored in (D21, D20).<br />

X1<br />

DEMUL<br />

D0<br />

D10<br />

D20<br />

Program Example 2:<br />

When X2 = ON, K1234 (automatically converted into binary floating point value) multiplies binary<br />

floating point (D1, D0) and the result is stored in (D11, D10).<br />

X2<br />

DEMUL K1234 D0 D10<br />

3-305

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!