■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
Operation error
• An operation error occurs in the following case.
Error
Description
code
4100
The value to be input to (s2) is 0. (Division by 0)
Program example
■DIV_TIME(_E)
The program which performs division ((s1) (s2)) on time type data input to (s1) and the word (signed) type data input to (s2),
and outputs the quotient of the operation result from (d) in time type.
• Function without EN/ENO (DIV_TIME)
[Structured ladder/FBD]
[ST]
g_time2 := DIV_TIME(g_time1, g_int1);
• Function with EN/ENO (DIV_TIME_E)
[Structured ladder/FBD]
[ST]
g_bool3 := DIV_TIME_E(g_bool1, g_time1, g_int1, g_time2);
5 APPLICATION FUNCTIONS
172
5.8 Functions of Time Data Type
ENO
TRUE
*1
FALSE
(d)
Operation output value
Undefined value
Q00J/
QnH
QnPH
Q00/
Q01
QnPRH
QnU
LCPU