1968
33 TIME DATA TYPE FUNCTIONS
33.4 Division
33.4 Division
DIV_TIME(_E)
These functions output the quotient ((s1)(s2)) of the TIME data type input values.
■Description, type, data type
■Operation processing
• These functions perform division 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). The remainder is rounded down.
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). (Note that the value input to (s2) shall be other than 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.
Ladder, FBD/LD Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=DIV_TIME(s1,s2);
[With EN/ENO]
d:=DIV_TIME_E(EN,ENO,s1,s2);
Argument Description Type Data type
EN Execution condition (TRUE: Executed, FALSE: Not executed) Input variable BOOL
s1 (IN1) Input Input variable TIME
s2 (IN2) Input Input variable ANY_NUM
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable TIME
Execution condition Operation result
EN ENO (d)
TRUE (executed) TRUE Operation result output value
FALSE (not executed) FALSE
*1
Undefined value
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
EN ENO
ds1
s2
(d)(s2)(s1)
T#1ms
÷
2 T#13h16m63s27msT#1d2h33m44s55ms
INT TIMETIME
Quotient Remainder
The value is
rounded down.