Chapter 8 Logic Instructions
8.12 Data Type Conversion Instructions
8.12.1 BOOL_TO_***
FB/FC
Explanation
FC
BOOL_TO_*** instructions convert boolean data into the data of basic data
types. “***” can be any basic data type.
DVP15MC11T
Parameters
Meaning Input/ Output
Description Valid range
In Data to convert Input Data to convert
Depends on the data type of the
variable that the input parameter is
Out Conversion result
Output Conversion result
Depends on the data type of the
variable that the output parameter is
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In
●
The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
BOOL to Bit String
Relevant instructions:
8-149