Mitsubishi Electronics FX3G User Manual

Page of 964
231
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.2 FNC 01 – CALL / Call Subroutine
1
Introdu
ction
2
Ov
ervi
ew
3
Instruction 
Li
st
4
D
evices 
in Det
ai
l
5
Specifi
ed the
De
vice
 &
 
C
onst
ant
6
Bef
ore
 
Pr
og
ra
mmi
ng
7
Bas
ic 
Instruction
8
FN
C00-FN
C0
9
Program Fl
ow
9
FNC
10-FN
C19
Mov
e & Com
pare
10
FNC
20-FNC
29
Arith. & Lo
gi
Operati
on
Example for resetting held outputs (countermeasures)
1) Program example
2) Timing chart
X000
X000
FNC 01
CALLP
RST
C0
X002
P0
FNC 06
FEND
RST
C0
FNC 02
SRET
P0
RST
Y007
Y007 is reset at an arbitrary timing.
The preceding RST C0 instruction is
deactivated in the subroutine.
B
M8001
RUN monitor
(normally OFF)
A
Y007
X001
C0
K10
Execution of P0 is
triggered by X000
X001
Current
value of C0
1
2
3
Y007 is reset.
RST
C0
Y007
Subroutine is
executed.
1
2
3
4
X002
Counter reset instruction is deactivated
(part  B  in above program).
Counter is reset (part
 A  in above program).