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