Chapter 5 Application Functions; Type Conversion Functions; Converting Bit Type To Word (Signed), Double Word (Signed) Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

5
APPLICATION FUNCTIONS
5.1

Type Conversion Functions

Converting bit type to word (signed), double word (signed) type

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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents