Mitsubishi Electronics QCPU Welding System User Manual


  Open as PDF
of 1204
 
3-12
3.3 Indexing
(1) Overview of indexing
(a) Indexing is an indirect setting made by using an index register.
When an Indexing is used in a sequence program, the device to be used will become
the device number specified directly plus the contents of the index register.
For example, if D2Z2 has been specified, the specified device is calculated as
follows: D(2+3) = D5 and the content of Z2 is 3 become the specified device.
(b) Indexing with 16-bit index registers and indexing with 32-bit index registers are possible
only for Universal model QCPU.
(2) Indexing with 16-bit index registers
(a) Example of indexing
Each index register can be set between 32768 and 32767.
Indexing is performed in the way shown below:
(b) Devices to which indexing can be used
With the exception of the restrictions noted below, Indexing can be used with devices
used with contacts, coils, basic instructions, and application instructions.
1) Devices to which indexing can not be used
*1: SFC transfer devices and SFC block devices are devices for SFC use.
Refer to the manual below for how to use these devices.
QCPU (Q mode)/QnACPU Programming Manual (SFC)
Device Meaning
K, H 32-bit constant
E Floating decimal point data
$ Character string data
.
Bit designated for word device
FX, FY, FD Function devices
P Pointers used as labels
I Interrupt pointers used as labels
Z Index register
S Step relay
TR SFC transfer devices*1
BL SFC block devices*1
X0
MOV
K
Z0
X0
MOV D10Z0
D0
Indexing
Stores -1 at Z0.
Stores the data of D10Z0=
D{10+(-1)} = D9 at D0.
1