![background image](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489281.webp)
260
Index Registers
Section 6-2
BREAK
0000
01
ON
JMP
&1000
DIM
1
&5
&1000
E0_00000
FOR
&1000
JME
&1000
NEXT
+L
IR0
&5
IR0
SETR
1
&0
IR0
=
,IR0
#1234
=
+2,IR0
#ABCD
=
+4,IR0
#9999
GETR
&1
IR0
D00000
Defines record table 1 with 1,000 records of
5 words each.
Jumps past the FOR-NEXT loop if the pro-
cessing conditions haven't been set.
Controls the FOR-NEXT loop for a maximum
of 1,000 repetitions (1,000 records).
Compares the contents of word 1 to #1234,
word 3 to #ABCD, and word 5 to #9999.
If words 1, 3, and 5 contain the comparison
data, the record number is stored in D00000
and BREAK interrupts the loop.
Returns execution to FOR to continue the loop.
Jump destination if the processing conditions
haven't been set.
Increments IR0 by five with each repetition and compares the first, third,
and fifth words in each record to the comparison data. Writes the record
number to D00000 and breaks the loop if matching data is found.
Stores the PLC memory address of table
number 1's first record (record 0) in IR0.
Adds 5 to the PLC memory address in IR0 to
move to the beginning of the next record.
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...