MUL_TIME¶
Scales a time duration by a numeric factor.
Signature¶
┌─────────┐
IN1 ─┤ │
│MUL_TIME ├─ OUT
IN2 ─┤ │
└─────────┘
FUNCTION MUL_TIME : TIME
VAR_INPUT
IN1 : TIME;
IN2 : ANY_NUM;
END_VAR
END_FUNCTION
The return type is TIME. IN2 may be any numeric type.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The duration to scale. |
|
|
The numeric factor to multiply by. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
IN1 multiplied by IN2. |
Description¶
Returns IN1 multiplied by the numeric value IN2. The result is
a TIME value. When IN2 is a floating-point type (REAL or
LREAL), the result is truncated to whole milliseconds.
Example¶
result := MUL_TIME(T#2s, 3); (* result = T#6s *)