5-6
5.1 Type Conversion Functions
5.1.2 Bit type
→
string type conversion
BOOL_TO_STR(_E)
Operation result
(1) Function without EN/ENO
An operation is executed and the operation value is output from .
(2) Function with EN/ENO
The following table shows the executing conditions and operation results.
*1 When FALSE is output from ENO, the data output from is undefined.
In this case, create a program so that the data output from is not used.
Operation Error
No operation error occurs in the execution of the BOOL_TO_STR(_E) function.
Program Example
The program which converts bit type data input to into string type data, and outputs the
operation result from .
(a) Function without EN/ENO (BOOL_TO_STR)
[Structured ladder]
[ST]
g_string1 := BOOL_TO_STR (g_bool1);
EN ENO
TRUE (Operation execution) TRUE Operation output value
FALSE (Operation stop)
FALSE
*1
Undefined value
d
d
d
d
s
d