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

2 Instruction Descriptions
The following example is for when Size is UINT#2.
LD
abc[1]
def[2]
UINT#2
In[0]=abc[1]
Size=UINT#2
In[1]=abc[2]
Additional Information
• If the data types of In[] and AryOut[] are the same, the MemCopy instruction is faster.
• You can specify the same array for In[] and AryOut[]. Also, the move source and destination data can
overlap. The following example is for when In[0] is A[2], AryOut[0] is A[4], and Size is UINT#3.
Size=UINT#3
AryOut=A[4]
Precautions for Correct Use
• The data types of In[] and AryOut[] can be different as long as they are both in one of the following
groups. The valid range of AryOut[] must include the valid range of In[].
• BYTE, WORD, DWORD, and LWORD
• USINT, UINT, UDINT, ULINT, SINT, INT, DINT, LINT, REAL, and LREAL
• If In[] is an array of structures, use the same data types for In[] and AryOut[].
• If the value of Size is 0, the value of Out will be TRUE and AryOut[] will not change.
• Return value Out is not used when the instruction is used in ST.
• An error occurs in the following case. ENO will be FALSE, and AryOut[] will not change.
• The value of Size exceeds the size of In[] or AryOut[].
• In[] and AryOut[] are STRING arrays and one of the elements to move does not end in a NULL
character.
• In[] or AryOut[] is a STRING array and the length of a text string in an element to move exceeds
the size of the element in AryOut[].
2-336
AryMove
EN
ENO
In
AryOut
def[2]
Size
Moved
A[0]
1234
A[1]
2345
In=A[2]
3456
A[3]
4567
5678
A[5]
6789
A[6]
7890
ST
AryMove(abc[1], def[2], UINT#2);
AryOut[0]=def[2]
AryOut[1]=def[3]
A[0]
1234
A[1]
2345
In=A[2]
3456
A[3]
4567
AryOut=A[4]
3456
A[5]
4567
A[6]
5678

NJ-series Instructions Reference Manual (W502)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents