Applied Functions; Type Conversion Functions; Bool_To_Int(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
5.

Applied Functions

This chapter explains the operation outline of each applied function, symbols, I/O data type, equivalent circuit
in sequence instructions, target models, cautions and program examples.
Refer to the following manual for variables, operators, data types and program languages:
5.1

Type Conversion Functions

5.1.1

BOOL_TO_INT(_E)

Outline
This function coverts bit data into word [signed] data, and outputs the data obtained by conversion.
1. Format
Function name
BOOL_TO_INT
BOOL_TO_INT_E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
_BOOL (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts bit data stored in a device specified in
data obtained by conversion to a device specified in
When the input value is "FALSE", this function outputs "0" as the word [signed] data value.
When the input value is "TRUE", this function outputs "1" as the word [signed] data value.
FALSE
TRUE
Bit data
Cautions
Use the function having "_E" in its name to connect a bus.
36
FX
3U(C)
Expression in each language
Structured ladder
BOOL_TO_INT
M0
_BOOL
X000
BOOL_TO_INT_E
EN
ENO
M0
_BOOL
Execution condition
Conversion source bit data
)
s
Execution status
Word [signed] data after conversion
(
)
d
0
1
Word [signed] data
→ Q/FX Structured Programming Manual (Fundamentals)
FX
FX
FX
3G
2N(C)
1N(C)
BOOL_TO_INT(_BOOL);
Example:
D0:=
*1
D0
BOOL_TO_INT(M0);
BOOL_TO_INT_E(EN,_BOOL,
Output label
Example:
BOOL_TO_INT_E(X000,M0,
*1
D0
D0);
Description
into word [signed] data, and outputs the
s
.
d
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
FX
1S
U
2C
ST
Data type
Bit
Bit
Bit
Word [signed]
FX
0N
0(S)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents