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 In is INT#120 and Size is UINT#3.
LD
EN
INT#120
In
abc[1,2]
Table
UINT#3
Size
AryOut
def[3]
Table[0,0]=abc[1,2]
Table[1,0]=abc[2,2]
Size=UINT#3
Table[2,0]=abc[3,2]
Precautions for Correct Use
• Use the same data type for In and Table[]. Otherwise, a compiling error will occur.
• Use a two-dimensional array for Table[]. A compiling error will occur if you use any other size of array.
• If an array with more than two dimensions is used for Table[], the elements in the third and higher
dimensions are ignored.
• If the AryOut[] array is larger than the value of Size, the comparison results will be stored in AryOut[0]
to AryOut[Size
• Signed integers (SINT, INT, DINT, and LINT) cannot be compared to unsigned integers (USINT, UINT,
UDINT, and ULINT).
• If real numbers are compared, error may cause unexpected processing results. This can occur, for
example, when they contain non-terminating decimal numbers.
• If the value of Size is 0, the value of Out will be FALSE and AryOut[] will not change.
• If this instruction is used in a ladder diagram, the value of Out changes to FALSE if an error occurs in
the previous instruction on the rung.
• An error occurs in the following cases. Out will be FALSE.
• If the value of Size exceeds the size of the AryOut[] array.
• If the value of Size exceeds the size of the first dimension of the Table[] array.
• The size of the second dimension of Table [] is 1.
2-104
ghi
TableCmp
def[3]
0
Table[0,1]=abc[1,3]
100
Table[1,1]=abc[2,3]
200
Table[2,1]=abc[3,3]
1]. Other elements of the array will not change.
ST
ghi:=TableCmp(INT#120, abc[1,2], UINT#3, def[3]);
In=INT#120
99
199
299

NJ-series Instructions Reference Manual (W502)

FALSE
AryOut[0]=def[3]
TRUE
AryOut[1]=def[4]
FALSE
AryOut[2]=def[5]
FALSE
Out=ghi

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents