5 Categories and Use of Basic Application Instructions API 122 Operands: S 1 : Multiplicand S 2 : Multiplicator D : Multiplication result Explanations: 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 result is D . The multiplication is conducted in binary floating point format 2. F refers to floating point input. Be sure to add a decimal point when using it. 3. Only 32-bit instructions DEMUL and DEMULP are applicable. 4. If S 1 or S 2 is specified with floating point value F, the instruction will operate in binary floating point 5. S 1 and S 2 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 6. Flags: every scan. a) If the absolute value of the result exceeds the max floating point value, carry flag will be ON. b) If the absolute value of the result is less than min. floating point value, borrow flag will be ON. c) If the conversion result is 0, zero flag will be 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 Program Example 2:
When X2 = ON, F1234.0 (automatically converted into binary floating point value ) multiplies binary floating point (D1, D0) and the result is stored in (D11, D10). X2 Points to note: For floating point operations, see “5.3 Numeric Values for Data Processing”. DVP-PM Application Manual 5-101 Mnemonic Operands Function Controllers 20PM 10PM D EMUL P Binary Floating Point Multiplication Type OP Bit Devices Word Devices Program Steps X Y M S F H KnX KnY KnM KnS T C D V Z D S 1 * * S 2 * * D * OX O100 Zero flag M1808 M1968 Borrow flag M1809 M1969 Carry flag M1810 M1970 DEMUL D0 D10 D20 DEMUL F1234.0 D0 D10