EasyManua.ls Logo

Mitsubishi FX2N-10GM - FNC02 (CALL): Subroutine Call, FNC03 (RET): Subroutine Return; FNC04 (JMP): Unconditional Jump

Mitsubishi FX2N-10GM
274 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FX Series Positioning Controllers Program format 5
5-48
5.10.3 FNC02 (CALL): Subroutine call, FNC03 (RET): Subroutine return
5.10.4 FNC04 (JMP): Unconditional jump
FNC 02
CALL
Applicable models
Series name
16-bit operation
3 steps : CALL
Remarks
Applicable
devices
and basic
format
FNC 02
CALL
Pointers used for CALL instructions should
not be used for JUMP instructions.
FX
2N
-10GM
FX
2N
-20GM
Drive
input
Subroutine call/Subroutine return
Call
destination
FNC 03
RET
1 steps : RET
No applicable devices
Do not nest more than 15 levels of CALL
instructions from subroutines called by a
CALL instruction.
FNC 03
RET
The subroutine
program whose
No. is equivalent
to is executed.
S
·
The program from the label
to the RET instruction is
regarded as a subroutine
program.
: Pointers
P0 to P127 (in the 10GM)
P0 to P255 (in the 20GM)
FNC 02
CALL
P 100
P 100
X02
N300
m02
END
FNC 03
RET
Progam
end
Subroutine
program
When FNC 02 (CALL) instruction is driven, program execution
jumps to the line marked with label P100 (Operation
).
The subroutine program that starts at P100 is executed, then
program execution returns to the former line No. N300 by FNC
03 (RET) instruction (Operation
).
The program from label (P) after m02 (m102 for a subtask) to
FNC 03 instruction is regarded as a subroutine program.
·
·
·
FNC 04
JMP
Applicable models
Series name
16-bit operation
1 steps
Remarks
Applicable
devices
and basic
format
FNC 04
JUMP
Pointers used for CALL instructions should not
be used for JUMP instructions.
FX
2N
-10GM
FX
2N
-20GM
JUMP
Drive
input
Unconditional jump
JMP
Jump
destination
Program execution jumps to the label specified by
without regard to condition.
: Pointers
P0 to P127 (in the 10GM)
P0 to P255 (in the 20GM)
When FNC 04 (JMP) instruction is driven, program execution jumps
unconditionally to the line marked with label P40.
FNC 04
JMP
P 40
P 40
N400
N410
Label
If this instruction is skipped by another JUMP instruction, this
instruction is not executed.
·
·

Table of Contents

Other manuals for Mitsubishi FX2N-10GM

Related product manuals