Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1969

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
■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).
Ex.
When (s1)=T#1d2h33m44s55ms (1 day, 2 hours, 33 minutes, 44 seconds, 55 milliseconds) and (s2)=2
(s1)
T#1d2h33m44s55ms
×
TIME
• 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.)
Ex.
Overflow
(s1)
T#24d20h31m23s647ms
×
(7FFFFFFFH)
(00000002H)
A negative time value results because the most significant bit is 1.
Ex.
Underflow
(s1)
T#-24d20h31m23s648ms
×
(80000000H)
(00000002H)
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.
Execution condition
EN
TRUE (executed)
FALSE (not executed)
*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.
Operation error
• When (s2) is of LREAL data type
Error code
Description
(SD0)
3402H
The value input to (s2) is out of the following range:
1024
-2
<(s2)-2
(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.
(s2)
2
T#2d5h7m28s110ms
INT
(s2)
2
T#-2ms
(FFFFFFFEH)
(s2)
2
T#0ms
(00000000H)
Operation result
ENO
TRUE
*1
FALSE
-1022
-1022
1024
(s2)<2
, 0, 2
(d)
TIME
(d)
(d)
(d)
Operation result output value
Undefined value
33 TIME DATA TYPE FUNCTIONS
33.3 Multiplication
33
1967

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents