3.1 Basic Functionality
3.1.2 Registers
3-25
3
CPU Module Functionality
Index Registers (i, j)
There are two special registers, i and j, that are used to modify relay and register addresses.
The functions of i and j are identical. They are used to handle register addresses like variables.
There are subscript registers for each program type, as shown in the following figure.
*
Motion programs and sequence programs have separate i and j registers for each task.
Note: Functions reference the i and j registers that belong to the calling drawing.
For example, a function called by DWG.H will reference the i and j registers for DWG.H.
We will describe this with examples for each register data type.
Attaching an Index to a Bit Register
Using an index is the same as adding the value of i or j to the register address.
For example, if i = 2, MB00000000i is the same as MB00000002.
Attaching an Index to an Integer Register
Using an index is the same as adding the value of i or j to the register address.
For example, if j = 30, MW0000001j is the same as MW0000031.
DWG.H
DWG.L
DWG.A
DWG.I
Motion
program
*
S
equence
program
*
i and j regi
s
ter
s
i and j regi
s
ter
s
i and j regi
s
ter
s
i and j regi
s
ter
s
i and j regi
s
ter
s
i and j regi
s
ter
s
i = 2;
DB000000 = MB00000000i;
DB000000 = MB00000002;
Equivalent
DW00000 = MW0000031;
DW00000 = MW0000001j;
j = 30;
Equivalent