Bool_To_Word(_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.1.4

BOOL_TO_WORD(_E)

Outline
This function converts bit data into word [unsigned]/bit string [16-bit] data, and outputs the data obtained by
conversion.
1. Format
Function name
BOOL_TO_WOR
D
BOOL_TO_WOR
D_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
and outputs the data obtained by conversion to a device specified in
When the input value is "FALSE", this function outputs "0H" as the word [unsigned]/bit string [16-bit] data
value.
When the input value is "TRUE", this function outputs "1H" as the word [unsigned]/bit string [16-bit] data
value.
FALSE
TRUE
Bit data
Cautions
Use the function having "_E" in its name to connect a bus.
42
FX
3U(C)
Expression in each language
Structured ladder
BOOL_TO_WORD
M0
_BOOL
X000
BOOL_TO_WORD_E
EN
M0
_BOOL
Execution condition
Conversion source bit data
)
s
Execution status
Word [unsigned]/bit string [16-bit] data after conversion
(
)
d
0H
1H
Word [unsigned]/
bit string [16-bit] data
FX
FX
FX
3G
2N(C)
1N(C)
ST
BOOL_TO_WORD(_BOOL);
Example:
D0:=
*1
D0
BOOL_TO_WORD(M0);
BOOL_TO_WORD_E(EN,
_BOOL, Output label);
Example:
ENO
BOOL_TO_WORD_E(X000,
*1
D0
M0,D0);
Description
into word [unsigned]/bit string [16-bit] data,
s
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
FX
1S
U
2C
0N
Data type
Bit
Bit
Bit
Word [unsigned]/
Bit String [16-bit]
.
d
FX
0(S)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents