Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
17 Applied Instructions (Data Transfer 2)
17.1 ZPUSH / Batch Store of Index Register
435
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
Function and operation explanation
1. 16-bit operation (ZPUSH/ZPUSHP)
1) Contents of index registers V0 to V7, Z0 to Z7 are temporarily retracted in and after the device specified
by . When the contents of index registers are retracted, the number of retracting of the device
specified by is incremented by +1.
2) To restore the data, use ZPOP instruction.
Use ZPUSH, ZPOP instructions in pair.
3) By specifying by the same device, ZPUSH and ZPOP instructions can be used as nesting. In this
case, every time the ZPUSH instruction is executed, the region to be used after the device specified by
is added by 16 points each. Hence, you must preliminarily reserve the region for the number of
times to be used by nesting.
4) The composition of the data to be retracted after the device specified by is as shown below.
Related instructions
Cautions
Without action of nesting, please clear the number of retraction of the device specified by before
execution of ZPUSH instruction.
With action of nesting, please clear the number of retraction of the device specified by before first
execution.
The instruction is provided in the FX
3UC PLC Ver. 2.20 or later.
Error
It is an operation error in the following case, and error flag M8067 is turned ON, and error code is stored in
D8067.
When the range of the number of points used after the device specified by by ZPUSH exceeds the
range of the corresponding device.
(Error code: K6706)
In ZPUSH instruction execution, when the number of retraction of the device specified by is negative.
(Error code: K6707)
Instruction Content
ZPOP This instruction restores the index registers V0 to V7, Z0 to Z7 once retracted by ZPUSH instruction.
Command
input
ZPUSH
EN ENO
d
Head device for retracting
the contents of index registe
r
No action of nesting
Index
register
Retraction
data
Z0
V0
Z1
V1
Z2
V2
Z7
V7
Times of retraction
+1
+0
+3
+2
+5
+4
+6
+16
+15
With action of nesting
Index
register
Retraction
data
Z0
V0
Z1
V1
Z2
Z7
V7
Times of retraction
+1
+0
+3
+2
+5
+4
+16
+15
1) ZPUSH instruction
4) ZPOP
instruction
Z0
V0
Z1
V1
+17
+19
+18
+20
2) ZPUSH instruction
3) ZPOP
instruction
Z0
V0
Z1
V1
Z2
V2
Z7
V7
Z0
V0
Z1
V1
Z2
Z7
V7
Portion of
one nesting:
16 points
First time of nesting
Times of retraction
Times of retraction
Second time of nesting
Times of retraction
+1 to number
of times of
retraction
by ZPUSH
instruction
1)
d
2) -1 to number
of times of
retraction
by ZPOP
instruction
d
d
:01
d
:10
d
:12
d
:21
d
=2
d
=1
d
d