Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 855

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

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.
Value of (s)
1
2
3
• 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)
(d)
(d)+1
(d)+2
(d)+3
(d)+4
ZPUSH
K1
D0
(Data in the Z and LZ
(d)+16
are saved.)
(d)+17
(d)+18
(d)+19
(d)+20
(d)+25
(d)+26
(d)+27
(d)+28
(d)+29
ZPUSH
K3
D0
(Data in the LZ
are saved.)
(d)+36
(d)+37
(d)+38
Z and LZ saved
Total range of Z and LZ
Total range of Z
Total range of LZ
Number of saves
Reserved for the system
(2 words)
Z0
Z1
Z13
LZ0
LZ1
LZ4
Z, LZ save type = 1
LZ0
LZ4
Z, LZ save type = 3
1st nesting
(25 words)
2nd nesting
(11 words)
3rd nesting
7 APPLICATION INSTRUCTIONS
7.11 Index Register Instructions
7
853

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents