Converting String Type To Bit Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Converting string type to bit type

STR_TO_BOOL(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
STR_TO_BOOL_E
EN
ENO
s
d
The following function(s) can go in the dotted squares.
STR_TO_BOOL, STR_TO_BOOL_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_STRING)
Output argument
ENO
d
Processing details
■Operation processing
Converts string type data input to (s) into bit type data, and outputs the operation result from (d).
When the input value is 0, FALSE is output in bit type data.
When the input value is other than 0, TRUE is output in bit type data.
s
' 0 '
' 1 '
String type
■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.
LCPU
ST
ENO:=
(EN, s, d);
STR_TO_BOOL_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
Execution result (TRUE: Normal, FALSE: Error)
Output
d
FALSE
TRUE
Bit type
ENO
TRUE
*1
FALSE
Data type
Bit
String (1)
Bit
Bit
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents