Timer instructions
337
Part II IEC Instructions
MUL_TIME_REAL
Multiply TIME by REAL
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
PLC types
Availability of MUL_TIME_REAL (see page 1328)
Data type I/O Function
TIME 1st input multiplicand
REAL 2nd input multiplicator
TIME output result
Description
MUL_TIME_REAL multiplies the value of the first input variable of the data type TIME by the value
of the second input variable of the data type REAL. The REAL value is rounded off to the nearest
whole number. The result is written into the output variable.
Data types
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
The constant T#1h30m is multiplied by the value 3.5. The result is written in mul_result. By
clicking on the
(Monitoring) icon while in the online mode, you can see the result
T#5h15m0s0.00ms immediately.
LD
ST
When programming with structured text, enter the following:
mul_result:=MUL_TIME_REAL(T#1h30m, 3.5);