Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

Order specifies the order to join the elements of In[]. The data type of Order is enumerated type
_eBYTE_ORDER. The meaning of the enumerators are as follows:
Enumerators
_LOW_HIGH
_HIGH_LOW
When the Data Type of OutVal Is Two Bytes or Larger
If the data type of OutVal is two bytes or larger, elements from In[] are joined so that the result is just
large enough for the size of the data type of OutVal. The result is stored in OutVal. The following data
types have two bytes or more.
Classification
Bit strings
Integers
Real numbers
Times, durations, dates, and
text strings
Others
The processing procedure is as follows:
1
In[0] and In[1] are joined according to the value of Order to create one word (two bytes) of data.
If Order is _LOW_HIGH, the higher byte is stored in In[1] and the lower byte is stored in In[0]. If
Order is _HIGH_LOW, the higher byte is stored in In[0] and the lower byte is stored in In[1].
2
In the same way elements that start from In[2] and In[3] are joined to make more words of data.
3
The words of data are joined to match the size of the data type of OutVal. For example, if OutVal
is DWORD data, four individual words of data are joined.
4
The resulting data is stored in OutVal.
The following example is for when OutVal is DWORD data, Size is UINT#4, and Order is _LOW_HIGH.
LD
abc[1]
UINT#4
_LOW_HIGH
In[0]=abc[1]
In[1]=abc[2]
Size = UINT#4
In[2]=abc[3]
In[3]=abc[4]

NJ-series Instructions Reference Manual (W502)

Meaning
Lower byte first, higher byte last
Higher byte first, lower byte last
WORD, DWORD, and LWORD
UINT, UDINT, ULINT, INT, DINT, and LINT
REAL and LREAL
TIME, DATE, TOD, DT, and STRING types of two bytes or more
An enumeration, an array for which the total for all elements is 2 bytes or more,
an array element that is 2 bytes or more, a structure for which the total for all
members is 2 bytes or more, or a structure member that is 2 bytes or more
AryByteTo
EN
ENO
In
Size
Order
OutVal
def
BYTE#16#67
BYTE#16#45
BYTE#16#23
BYTE#16#01
Data type
ST
AryByteTo(abc[1], UINT#4, _LOW_HIGH, def);
def
OutVal=def
DWORD#16#01234567
2 Instruction Descriptions
2
2-459

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents