Arithmetic instructions
392
Part III FP Instructions
F31_DMUL
32-bit multiplication, destination can be specified
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Instead of using this FP instruction, we recommend using the related IEC instruction MUL (see
page 63). Please refer also to Advantages of the IEC instructions in the online help.
PLC types
Availability of F31_DMUL (see page 1324)
Variable Data type Function
s1 multiplicand
s2
ANY32
multiplier
d ARRAY [0..1] of
ANY32
result
The variables s1, s2 and d have to be of the same data type.
For Relay T/C Register Constant
s1, s2 DWX DWY DWR DWL DSV DEV DDT DLD DFL dec. or hex.
d - DWY DWR DWL DSV DEV DDT DLD DFL -
Access to the result is possible with output_value[0] and output_value[1].
Description
Multiplies the 32-bit data or 32-bit equivalent constant specified by s1 and the one specified by s2 if
the trigger EN is in the ON-state. The result is stored in d[0], d[1] (64-bit area). All 32-bit values are
treated as double integer values.
Data types
Operands
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out.
LD