12.5
Converting BOOL to TIME
BOOL_TO_TIME
This function converts a value from BOOL data type to TIME data type.
Structured text
d:=BOOL_TO_TIME(s);
Setting data
■Description, type, data type
Argument
s (IN)
d
Processing details
■Operation processing
• This function converts the value input to (s) from BOOL data type to TIME data type, and output the converted value from
(d).
• When the input value is FALSE, 0 (TIME data type) is output.
• When the value is TRUE, 1 (TIME data type) is output.
(s)
FALSE
TRUE
BOOL
• Input a BOOL data type value to (s).
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
There is no operation error.
12 TYPE CONVERSION FUNCTIONS
130
12.5 Converting BOOL to TIME
Description
Input
Output
T#0ms
T#1ms
TIME
(d)
Type
Data type
Input variable
BOOL
Output variable
TIME