Converting Bit Array To Word (Signed) Type, Word (Unsigned)/16-Bit String Type, Double Word (Signed) Type, 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 array to word (signed) type, word (unsigned)/16-bit
string type, double word (signed) type, double word (unsigned)/
32-bit string type
BITARR_TO_INT(_E), BITARR_TO_DINT(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
BITARR_TO_INT_E
EN
ENO
s
d
n
The following function(s) can go in the dotted squares.
BITARR_TO_INT, BITARR_TO_INT_E, BITARR_TO_DINT, BITARR_TO_DINT_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_BitArr)
n
Output argument
ENO
d
Processing details
■Operation processing
• BITARR_TO_INT, BITARR_TO_INT_E
Converts number of bits specified for n starting from the bit array element input to (s) into word (signed) type or word
(unsigned)/16-bit string type data, and outputs the operation result from (d).
Only a constant 4, 8, 12 or 16 can be specified for n.
0 is set for the output bits higher than the specified number of bits.
• BITARR_TO_DINT, BITARR_TO_DINT_E
Converts number of bits specified for n starting from the bit array element input to (s) into double word (signed) type or double
word (unsigned)/32-bit string type data, and outputs the operation result from (d).
Only a constant 4, 8, 12, 16, 20, 24, 28 or 32 can be specified for n.
0 is set for the output bits higher than the specified number of bits.
■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
LCPU
ST
ENO:=
(EN, s, n, d);
BITARR_TO_INT_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input (Variables are applicable to element
specification.)
Input (Only a constant 4, 8, 12, 16, 20, 24, 28 or 32
can be specified)
Execution result (TRUE: Normal execution, FALSE:
Error or stop)
Output
ENO
TRUE
*1
FALSE
Data type
Bit
Bit
Word (signed)
Bit
ANY16, ANY32
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
109

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents