Monitoring Index Registers - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

5 Understanding Programming
5-7-4

Monitoring Index Registers

It is possible to monitor Index Registers as follows:
• To use the CX-Programmer to monitor the final Index Register values for each task.
• To monitor the Index Register values using Host Link commands or FINS commands, write a pro-
gram to store Index Register values from each task to another area (e.g., DM area) at the end of each
task, and to read Index Register values from the storage words (e.g., DM area) at the beginning of
each task. The values stored for each task in other areas (e.g., DM area) can then be edited using
the CX-Programmer, Host Link commands, or FINS commands.
Example
Note Be sure to use PLC memory addresses in Index Registers.
a
a
Task 2
a
a
Peripheral servicing
5-92
Task 1
MOVL
D01001 and D01000
stored in IR0
Dφ1000
IR0
or
MOVR
Actual memory address of CIO
0000
0000 (0000C000 Hex) stored in
IR0
IR0
MOVL
Contents of IR0 stored in
D01001 and D01000
IR0
Dφ1000
MOVL
D02001 and D02000
Dφ2000
stored in IR0
IR0
or
MOVR
Actual memory address CIO
0005
0005 (0000C005 Hex) stored in
IR0
IR0
MOVL
Contents of IR0 stored in
IR0
D02001 and D02000
Dφ2000
IR storage words
for task 1
Dφ1000
Dφ1001
IR0
or
0000C000Hex
IR0
Dφ1000
C 0 0 0
Dφ1001
0 0 0 0
IR0
IR storage words
for task 2
Dφ2000
Dφ2001
IR0
or
0000C005Hex
IR0
Dφ2000
C 0 0 5
Dφ2001
0 0 0 0
IR0
Read D02001
Read D01001
and D02000
and D01000
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents