209
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.7 FNC 06 – Main Routine Program End
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
2. In the case of CALL instruction
Cautions
1. When FEND instruction is programmed twice or more
Put a subroutine program or interrupt routine program between last FEND instruction and END instruction.
2. When CALL or CALLP instruction is used
Put a label after FEND instruction. And the SRET instruction is required in every case.
3. When CALL or CALLP instruction is used
If FEND instruction is executed after CALL or CALLP instruction was executed and before SRET instruction is
executed, an error is caused.
4. When FOR instruction is used
If FEND instruction is executed after FOR instruction was executed and before NEXT instruction is executed,
an error is caused.
5. When the interrupt function (I) is used
Make sure to program an interrupt label (pointer) after FEND instruction. And IRET instruction is required in
every case.
I100
P21
0
W
hen X011
is O
N
W
hen X011 i
s
OFF
X011
Main routine
program
Main routine
program
Subroutine
program
Interrupt routine
program
FNC 01
CALL
P 21
FNC 06
FEND
END
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......