Fnc02 (Call): Subroutine Call, Fnc03 (Ret): Subroutine Return; Fnc04 (Jmp): Unconditional Jump - Mitsubishi FX2N-10GM Hardware / Programming Manual

Melsec-f
Hide thumbs Also See for FX2N-10GM:
Table of Contents

Advertisement

FX Series Positioning Controllers
5.10.3

FNC02 (CALL): Subroutine call, FNC03 (RET): Subroutine return

FNC 02
CALL
FNC 03
RET
Applicable
devices
Drive
and basic
format
X02
FNC 02
N300
FNC 03
5.10.4

FNC04 (JMP): Unconditional jump

FNC 04
JMP
JUMP
Applicable
devices
and basic
format
N400
N410
Subroutine call/Subroutine return
16-bit operation
3 steps : CALL
: Pointers P0 to P127 (in the 10GM)
P0 to P255 (in the 20GM)
Pointers used for CALL instructions should
not be used for JUMP instructions.
input
FNC 02
CALL
Call
destination
P 100
CALL
m02
Progam
END
end
P 100
Subroutine
program
RET
Unconditional jump
16-bit operation
JMP
1 steps
: Pointers P0 to P127 (in the 10GM)
P0 to P255 (in the 20GM)
Drive
input
FNC 04
JUMP
Jump
destination
·
FNC 04
When FNC 04 (JMP) instruction is driven, program execution jumps
P 40
JMP
unconditionally to the line marked with label P40.
·
If this instruction is skipped by another JUMP instruction, this
P 40
Label
instruction is not executed.
1 steps
: RET
The subroutine
program whose
No. is equivalent
·
to
S
is executed.
·
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.
Pointers used for CALL instructions should not
be used for JUMP instructions.
Program execution jumps to the label specified by
without regard to condition.
Applicable models
Series name
FX
FX
No applicable devices
Do not nest more than 15 levels of CALL
instructions from subroutines called by a
CALL instruction.
FNC 03
The program from the label
to the RET instruction is
RET
regarded as a subroutine
program.
Applicable models
Series name
FX
FX
Program format 5
Remarks
-10GM
2N
-20GM
2N
).
Remarks
-10GM
2N
-20GM
2N
5-48

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx2n-20gm

Table of Contents