Fnc 01 - Call / Call Subroutine - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
8.2
FNC 01 – CALL / Call Subroutine
Outline
This instruction calls and executes a program which should be processed commonly in a sequence program.
This instruction reduces the number of program steps, and achieves efficient program design.
For creating a subroutine program, FEND (FNC 06) and SRET (FNC 02) instructions are required.
1. Instruction format
FNC 01
CALL
2. Set data
Operand type
Pn
For the pointer
P0 to P62 and P64 to P2047 can be specified in FX
Because P63 is dedicated to CJ (FNC 00) instruction (for jump to END step), it cannot be used as a pointer for CALL
(FNC 01) instruction.
3. Applicable devices
Bit Devices
Oper-
System User
and
Type
X Y M T C S D .b KnX KnY KnM KnS T
Pn
Explanation of function and operation
1. 16-bit operation
While the command input is ON, CALL instruction is executed and the program execution jumps to a step with a label
.
Pn
Then, a subroutine program with the label
When SRET (FNC 02) instruction is executed, the program execution returns to the step after CALL instruction.
• At the end of the main program, put FEND instruction.
• Put a label (P) for CALL instruction after FEND instruction.
Command
Label
M8000
Pn
RUN monitor
(normally ON)
222
Series
Mnemonic
16-bit Instruction
P
CALL
3 steps
CALLP
Pointer number (P) indicating the label number for the jump destination
(FX
/FX
: P0 to P62 and P64 to P4095, FX
3U
3UC
in the CALL instruction, P0 to P62 and P64 to P4095 can be specified in FX
Pn
Digit Specification
User program
User program
User program
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
/FX
: P0 to P62 and P64 to P2047)
3G
3GC
/FX
PLCs.
3G
3GC
Word Devices
Special
System User
Unit
C D R U \G
is executed.
Pn
FNC 01
Pn
Pn
CALL
FNC 06
FEND
FNC 02
SRET
8 Program Flow – FNC 00 to FNC 09
8.2 FNC 01 – CALL / Call Subroutine
Mnemonic
32-bit Instruction
3U
Con-
Real
Index
stant
Number
V
Z Modify K H
E
Main program
Program area from the step 0 to FEND
instruction
Subroutine program
Program area from a label
instruction
Operation Condition
Data type
Pointer number
/FX
PLCs, and
3UC
Others
Charac-
Pointer
ter String
" "
P
Pn
to SRET

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents