33 TIME DATA TYPE FUNCTIONS
33.3 Multiplication
1967
33
■Operation processing
• These functions perform multiplication between the TIME data type values input to (s1) and (s2) ((s1)(s2)), and output the
operation result, in the TIME data type, from (d).
When (s1)=T#1d2h33m44s55ms (1 day, 2 hours, 33 minutes, 44 seconds, 55 milliseconds) and (s2)=2
• Input a TIME data type value to (s1).
• Input an INT, DINT, REAL, or LREAL data type value to (s2).
• Even if an underflow or overflow occurs in the operation result, no operation error is issued. The following is output to (d).
When MUL_TIME_E is used, ENO outputs TRUE. (In this case, the output value is of TIME data type with the upper 32 bits
deleted although the operation result is 64-bit data.)
Overflow
A negative time value results because the most significant bit is 1.
Underflow
A positive time value results because the most significant bit is 0.
■Operation result
1. Function without EN/ENO
The operation processing is performed. The operation result is output from (d).
2. Function with EN/ENO
The execution conditions and operation results will be as follows.
*1 If the value FALSE is output from ENO, the output data from (d) will be undefined. Create a program so that the undefined value will not
be used in operations.
• When (s2) is of LREAL data type
Execution condition Operation result
EN ENO (d)
TRUE (executed) TRUE Operation result output value
FALSE (not executed) FALSE
*1
Undefined value
Error code
(SD0)
Description
3402H The value input to (s2) is out of the following range:
-2
1024
<(s2)-2
-1022
, 0, 2
-1022
(s2)<2
1024
(E-1.7976931348623157+308 to E-2.2250738585072014-308, 0, E2.2250738585072014-308 to E1.7976931348623157+308)
The value input to (s2) is -0, a subnormal number, NaN (not a number), or .
3405H The single-precision real number input to (s2) is out of the range, -2147483648 to 2147483647.
(d)(s2)(s1)
× 2 T#2d5h7m28s110msT#1d2h33m44s55ms
INT TIMETIME
(d)(s2)(s1)
× 2 T#-2msT#24d20h31m23s647ms
(00000002H) (FFFFFFFEH)(7FFFFFFFH)
(d)(s2)(s1)
× 2 T#0msT#-24d20h31m23s648ms
(00000002H) (00000000H)(80000000H)