2-461
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
AryByteTo
If the data type of OutVal is BOOL (one bit), data is stored in OutVal as described below.
The following example is for when OutVal is a BOOL array with 21 elements, Size is UINT#3, and Order
is _LOW_HIGH.
When OutVal Is BOOL Data
Value of
Order
OutVal
(array or not)
Storage method in OutVal
_LOW_HIGH
Not an array Value of bit 0 of In[0] is stored in OutVal.
Array Value of In[0] is separated and stored in OutVal[0] to OutVal[7]. Value
of In[1] is separated and stored in OutVal[8] to OutVal[15]. The same
process is repeated to store the rest of the data.
Remaining bits are discarded.
_HIGH_LOW
Not an array Value of bit 0 of In[1] is stored in OutVal.
Array Value of In[0] is separated and stored in OutVal[8] to OutVal[15]. Value
of In[1] is separated and stored in OutVal[0] to OutVal[7]. The same
process is repeated to store the rest of the data.
Remaining bits are discarded.
OutVal[0]
Size = UINT#3
TRUE
OutVal[2]
FALSE
FALSE
OutVal[1]
OutVal[3]
TRUE
OutVal[5]
FALSE
FALSE
OutVal[4]
OutVal[6]
FALSE
OutVal[7]
TRUE
OutVal[9]
TRUE
FALSE
OutVal[8]
OutVal[10]
OutVal[12]
FALSE
TRUE
FALSE
OutVal[11]
OutVal[13]
FALSE
OutVal[14]
TRUE
OutVal[16]
FALSE
FALSE
OutVal[15]
OutVal[17]
FALSE
OutVal[18]
TRUE
OutVal[20]
FALSE
FALSE
OutVal[19]
In[0]
In[1]
In[2]
BYTE#16#89
BYTE#16#45
BYTE#16#04