Mitsubishi Electronics FX3G User Manual

Page of 964
483
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
17 Data Transfer 2 – FNC100 to FNC109
17.1 FNC102 – ZPUSH/Batch Store of Index Register
11
FN
C30
-FN
C3
9
R
ota
tion and 
Shi
ft
12
FN
C40-FN
C49
D
ata O
perati
on
13
FNC
50-FNC
59
High-Speed
 
Proc
essing
14
FM
C60-FN
C69
H
andy 
In
struction
15
FN
C70-FN
C79
E
xternal
 F
X
 I/O
 
De
vice
16
FNC
80-FNC
89
External
 FX 
Dev
ice
17
FNC1
00-
FNC10
9
Dat
Transfer 2
18
FNC1
10-
FNC139
Fl
oati
ng Poi
nt
19
FNC14
0-F
N
C
149
Da
ta
 
Operation 2
20
FNC1
50-
FNC159
Pos
itioning 
Control
Program example
In the program shown below, the contents of the index registers Z0 to Z7 and V0 to V7 before execution of subroutine
program are batch-stored in D0 and later when index registers are used in the subroutine after the pointer P0.
X005
M8002
Label
P 0
M8000
RUN monitor
M8000
K 5
D 0
RST
FNC102
ZPUSH
D 0
END
FNC103
ZPOP
FNC 02
SRET
FNC 12
MOVP
X005
K10
FNC 12
MOVP
X000 V0
Y000
FNC 06
FEND
X000
FNC 01
CALL
P 0
Program using index
registers
X006
K 5
FNC 12
MOVP
X006
K10
FNC 12
MOVP
X030
T0
D100V0
V 0
V 0
V 0
V 0
V 0