Mitsubishi MELSEC-q Programming Manual page 192

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

6 IEC FUNCTIONS
6.1.3 Boolean type (BOOL)
Boolean type (BOOL) data is converted into character string type (STRING) data.
Function definition
Function definition
6 - 5
character string type (STRING) conversion BOOL_TO_STR
STRING(2) BOOL_TO_STR ( BOOL S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
STRING (2)
Conversion result (character string data)
Remarks: When the data to be converted (bit data) is 0, the return value is "0".
When the data to be converted (bit data) is 1, the return value is "1".
Example of use
Argument Type
BOOL
s_ary1 :=
BOOL_TO_STR(b_data1);
BOOL BOOL_TO_STR_E( BOOL EN, BOOL S1, STRING(2) D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
D1
OUT
Return value
Return Value
BOOL
Execution condition
Example of use
(*
When execution condition X0 turns ON, the Boolean type (BOOL) data in
(*
bData is converted into the character string type, and the result is stored into
(*
Result.
M0 := BOOL_TO _STR _E ( X0, bData, Result ) ;
Data to be converted (bit data)
ST Program
Conversion Result
LD
MOV
LDI
MOV
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (bit data)
Conversion result (character string data)
BOOL_TO_STR_E
Description
Description
Used Instruction
b_data1
LD, MOV, LDI
K49
s_ary1
b_data1
K48
s_ary1
Description
Description
*)
*)
*)
6 - 5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents