EasyManua.ls Logo

Omron CJ - PROGRAMMING MANUAL 12-2009 - Page 332

Omron CJ - PROGRAMMING MANUAL 12-2009
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
292
Index Registers Section 6-2
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
BREAK
=
+4,IR0
#9999
GETR
&1
IR0
D00000
Adds 5 to the PLC memory address in IR0 to
move to the beginning of the next record.
Defines record table 1 with 1,000 records of
5 words each.
Stores the PLC memory address of table
number 1's first record (record 0) in IR0.
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.

Table of Contents

Related product manuals