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

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

Advertisement

Converting word (signed) type, word (unsigned)/16-bit string
type, double word (signed) type, double word (unsigned)/32-bit
string type to bit array
INT_TO_BITARR(_E), DINT_TO_BITARR(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
INT_TO_BITARR_E
EN
ENO
s
d
n
The following function(s) can go in the dotted squares.
INT_TO_BITARR, INT_TO_BITARR_E, DINT_TO_BITARR, DINT_TO_BITARR_E
■Argument
Input/output
Name
argument
Input argument
EN
s
n
Output argument
ENO
d(_BitArr)
Processing details
■Operation processing
• INT_TO_BITARR, INT_TO_BITARR_E
Outputs low-order n bits of word (signed) type or word (unsigned)/16-bit string type data specified for (s) to (d).
Only a constant 4, 8, 12 or 16 can be specified for n.
The output bits higher than the specified number of bits do not change.
• DINT_TO_BITARR, DINT_TO_BITARR_E
Outputs low-order n bits of double word (signed) type or double word (unsigned)/32-bit string type data specified for (s) to (d).
Only a constant 4, 8, 12, 16, 20, 24, 28 or 32 can be specified for n.
The output bits higher than the specified number of bits do not change.
■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);
INT_TO_BITARR_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
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 (Variables are applicable to element
specification.)
ENO
TRUE
*1
FALSE
Data type
Bit
ANY16, ANY32
Word (signed)
Bit
Bit
(d)
Operation output value
Undefined value
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
111

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents