Mitsubishi Electronics 13JW55 Network Card User Manual


 
5 - 44
5.5 Index Register and File Register
5.5.1 How to use index register Z
The index register (Zn) is used to indirectly specify the device number. The
result of an addition of data in the index register and the directly specified device
number can be specified as the device number.
Example
D0Z0 Can be interpreted as D (0+Z0)
For example, when Z0 is 0, the device number becomes D0.
when Z0 is 50, the device number becomes D50.
Z0 to Z19 can be used as the index register.
The index register (Zn) is a word device which consists of 16 bits. Therefore, the
available data size range is -32768 to +32767.
The following devices can be used for the indexing.
Bit device ········X, Y, M, L, S, B, F, Jn\X, Jn\Y, Jn\B, Jn\SB (such as K4Y40Z0)
Word device···· T
(Note)
, C
(Note)
, D, R, W, Jn\W, Jn\SW, Jn\G (such as D0Z0)
Constant ·········K, H (such as K100Z0)
Pointer ············ P
(Note) Only the current value can be used for timer and counter.
The following restrictions are provided for using the index register for contact or
coil.
Device Description Application example
T
Only Z0 and Z1 are available for a
contact and coil of a timer.
K100
T1Z1
T0Z0
C
Only Z0 and Z1 are available for a
contact and coil of a counter.
K100
C1Z0
C0Z1
REMARK
When the index register is used with 32-bit data instructions
Zn and Zn+1 are targets to be processed.
The lower 16 bits correspond to the specified index register number (Zn), and the
higher 16 bits correspond to the specified index register number + 1.
32-bit indexing
(Only for Universal model QCPU (except for Q00UJCPU))
A method for specifying index registers for 32-bit indexing can be selected from
following two methods.
Specifying the index range used for 32-bit indexing
Specifying the 32-bit indexing using "ZZ" specification
Refer to appendix 8 for the detail of indexing.
Device number