5-84
5.1 Type Conversion Functions
5.1.27 String type
→
bit type conversion
STR_TO_BOOL(_E)
Operation Error
No operation error occurs in the execution of the STR_TO_BOOL(_E) function.
Program Example
The program which converts string type data input to into bit type data, and outputs the
operation result from .
(a) Function without EN/ENO (STR_TO_BOOL)
[Structured ladder]
[ST]
g_bool1 := STR_TO_BOOL (g_string1);
(b) Function with EN/ENO (STR_TO_BOOL_E)
[Structured ladder]
[ST]
g_bool3 := STR_TO_BOOL_E (g_bool1, g_string1, g_bool2);
s
d