2-451
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
Unite8Bit_**
Unite8Bit_**
The Unite8Bit_** instructions join bytes of data into a bit string.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The Unite8Bit_** instructions join elements of array to join In[] to create a bit string in joined result Out.
Number of bytes to join Num specifies the number of array elements to join. First, In[0] to In[Num−1] are
joined to create a bit string with Num bytes. To this, 16#00 is added to the upper bytes for the number of
bytes of Out minus the value of Num. The result is stored in Out.
The name of the instruction is determined by the data type of Out. For example, if Out is the DWORD
data type, the instruction is Unite8Bit_DWORD.
Instruction Name FB/FUN Graphic expression ST expression
Unite8Bit_** Byte Data Join
Group
FUN Out:=Unite8Bit_**(In, Num);
"**" must be a bit string data
type.
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) Array to join
Input
Array to join Depends on data type.
---
*
Num Number of
bytes to join
Number of bytes to join 0 to No. of bytes in Out 1
Out Joined result Output Bit string with joined result Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In[] (array) OK
Num OK
Out OKOKOKOK
Function
(@)Unite8Bit_**
EN ENO
In Out
Num
"**" must be a bit string data type.