EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #502 background imageLoading...
Page #502 background image
2 Instruction Descriptions
2-454
NJ-series Instructions Reference Manual (W502)
If the data type of In is two bytes or larger, In is separated into bytes and stored in AryOut[]. The follow-
ing data types have two bytes or more.
The processing procedure is as follows:
1
First, the value in In is separated into words (two bytes).
2
The lowest word is separated into bytes.
3
If Order is _LOW_HIGH, the lower byte is stored in AryOut[0] and the higher byte is stored in
AryOut[1]. If Order is _HIGH_LOW, the higher byte is stored in AryOut[0] and the lower byte is
stored in AryOut[1].
4
The next word is separated into bytes and stored in AryOut[2] and AryOut[3] in the same way.
5
This process is repeated to the end of the value of In. If In is an array, the same process is
repeated to the last element in In.
The following example is for when In is a DWORD array with three elements and Order is _LOW_HIGH.
When the Data Type of In Is Two Bytes or Larger
Classification Data type
Bit strings WORD, DWORD, and LWORD
Integers UINT, UDINT, ULINT, INT, DINT, and LINT
Real numbers REAL and LREAL
Times, durations, dates,
and text strings
TIME, DATE, TOD, DT, and STRING types of two bytes or more
Others 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
ghi:=ToAryByte(abc, _LOW_HIGH, def[1]);
LD ST
def[1] def[1]
ghi
abc
_LOW_HIGH
ToAryByte
EN ENO
In
Order
AryOut
Out = ghi = UINT#12
In[0]=abc[0]
DWORD#16#01234567
In[2]=abc[2]
DWORD#16#89ABCDEF
DWORD#16#CCDDEEFF
:
In[1]=abc[1]
AryOut[0]=def[1]
16#67
16#45
AryOut[11]=def[12]
16#23
16#01
16#EF
16#CD
16#AB
16#89
16#FF
16#EE
16#DD
16#CC
AryOut[10]=def[11]
AryOut[9]=def[10]
AryOut[8]=def[9]
AryOut[7]=def[8]
AryOut[6]=def[7]
AryOut[5]=def[6]
AryOut[4]=def[5]
AryOut[3]=def[4]
AryOut[2]=def[3]
AryOut[1]=def[2]

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals