EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 855

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
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...
7 APPLICATION INSTRUCTIONS
7.11 Index Register Instructions
853
7
Processing details
These instructions save the contents of the index register and long index register in the device specified by (s) to the device
specified by (d) or array label element and later. The instructions also save the type of the saved index register and long
index register to the end of the saved data.
When the contents of the index register and long index register are saved, the number of saves (d) is incremented by 1.
The following table lists the values specified by (s) and the index registers and long index registers to be saved.
The ZPOP(P) instructions (restoring the selected data of the index register and long index register) are used to restore
data. The ZPUSH(P) and ZPOP(P) instructions are used in pairs and can be nested to be used as a stack.
Page 855 ZPOP(P)
A nesting structure can be created by specifying the area specified by (d) of the ZPUSH(P) instruction in (d) of the
ZPUSH(P) instruction again. The number of saves (d) is incremented by 1 every time the ZPUSH(P) instruction is
executed.
When another area is specified in (d) of the ZPUSH(P) instruction in the nesting structure, the content of the index register
or long index register is saved to the specified another area.
In the nesting structure, every time the ZPUSH(P) instruction is executed, saved data is added. Therefore, check the
numbers of points assigned to the index register and long index register according to SD300 and SD302, and secure in
advance the areas necessary for the number of times the instruction is executed.
The following figure shows the configuration of the areas used after (d). (Z0 to Z23 and LZ0 to LZ4)
Value of (s) Z and LZ saved
1 Total range of Z and LZ
2 Total range of Z
3 Total range of LZ
Z0
Z1
Z13
LZ0
LZ1
LZ4
LZ0
LZ4
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)+16
(d)+17
(d)+18
(d)+19
(d)+20
(d)+25
(d)+26
(d)+27
(d)+28
(d)+29
(d)+36
(d)+37
(d)+38
ZPUSH K1 D0
ZPUSH K3 D0
Number of saves
Reserved for the system
(2 words)
1st nesting
(25 words)
Z, LZ save type = 1
Z, LZ save type = 3
2nd nesting
(11 words)
3rd nesting
(Data in the Z and LZ
are saved.)
(Data in the LZ
are saved.)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals