Converting Bit Type To Word (Unsigned)/16-Bit String, Double Word (Unsigned)/32-Bit String Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Converting bit type to word (unsigned)/16-bit string, double word
(unsigned)/32-bit string type
BOOL_TO_WORD(_E), BOOL_TO_DWORD(_E)
High
Basic
Process
performance
Structured ladder/FBD
BOOL_TO_WORD_E
EN
ENO
s
The following function(s) can go in the dotted squares.
BOOL_TO_WORD, BOOL_TO_WORD_E, BOOL_TO_DWORD, BOOL_TO_DWORD_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• BOOL_TO_WORD, BOOL_TO_WORD_E
Converts bit type data input to (s) into word (unsigned)/16-bit string type data, and outputs the operation result from (d).
When the input value is FALSE, 0H is output in word (unsigned)/16-bit string type data.
When the input value is TRUE, 1H is output in word (unsigned)/16-bit string type data.
s
FALSE
TRUE
Bit type
• BOOL_TO_DWORD, BOOL_TO_DWORD_E
Converts bit type data input to (s) into double word (unsigned)/32-bit string type data, and outputs the operation result from
(d).
When the input value is FALSE, 0H is output in double word (unsigned)/32-bit string type data.
When the input value is TRUE, 1H is output in double word (unsigned)/32-bit string type data.
s
FALSE
TRUE
Bit type
5 APPLICATION FUNCTIONS
28
5.1 Type Conversion Functions
Redundant Universal
LCPU
ST
ENO:=
BOOL_TO_WORD_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_BOOL)
Input
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
Word (unsigned)/16-bit string type
Double word (unsigned)/32-bit string type
(EN, s, d);
d
0
H
1
H
d
0
H
1
H
Data type
Bit
Bit
Bit
Word (unsigned)/16-bit string, double word
(unsigned)/32-bit string

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents