7 APPLICATION INSTRUCTION
7.9 Index register operation instruction
469
7
Saving the selected data of the index register and long index
register
ZPUSH(P)
These instructions save the contents of index registers and long index registers within the range specified by (s) in the devices
specified by (d) and later.
■Descriptions, ranges, and data types
■Applicable devices
• These instructions save the contents of index registers and long index registers within the range specified by (s) in the
devices specified by (d) and later. The type of the index register or long index register saved is stored in the end of the
saved data.
• When the contents of the index registers and long index registers are saved, "1" is added to (d).
• The following shows values specified by (s) and the index register or long index register to be saved.
• The selected data of index register/long index register return instructions (ZPOP(P) instructions) are used to return the
data. The selected data of index register/long index register save instructions (ZPUSH(P) instructions) and the selected
data of index register/long index register return instructions (ZPOP(P) instructions) can be used in pairs and to adopt a
nesting structure. (Page 471 Returning the selected data of the index register and long index register)
• When a nesting structure is adopted, the areas to be used are added to (d) and later every time the selected data of index
register/long index register save instructions (ZPUSH(P) instructions) are executed. Check the number of index registers
and long index registers by SD300 and SD302, and secure the areas for the number of instructions to be used in advance.
Ladder diagram Structured text
ENO:=ZPUSH_2(EN,s,d);
ENO:=ZPUSHP_2(EN,s,d);
Operand Description Range Data type Data type (label)
(s) Type of the index register or long index register to be saved 0 to 2 16-bit unsigned binary ANY16
(d) Head device number for saving the data of index registers 16-bit signed binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s)
(d)
(s) value Z or LZ to be saved
0 Z, LZ (whole range)
1 Z (whole range)
2 LZ (whole range)