Subroutine Call/Start Step - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Subroutine call/start step

Name
Subroutine call/start step
Processing details
• Calls/starts the Motion SFC program of the specified program name.
• Control varies with the type of the transition coupled next to the subroutine call/start step.
■WAIT (Subroutine Call)
When the subroutine call step is executed, control transits to the specified program as shown below, and when END of the
called program is executed, control returns to the call source program.
■Except WAIT (Subroutine Start)
When the subroutine start step is executed, control starts the specified program and then shifts to the next as shown below.
Since, the start source and destination Motion SFC programs are executed in parallel. The started program ends at END
execution.
MAIN
SUB
(1)
(3)
SUB
(2)
(5)
WAIT
END
(4)
END
WAIT
(Subroutine call)
Operation error
• When the specified Motion SFC program does not exist at a subroutine call/start, the minor error (SFC) (error code: 32F5H)
will occur and stops to execute the Motion SFC program at the error detection.
• When the called/started Motion SFC program is already starting at a subroutine call/start, the minor error (SFC) (error code:
32F6H) will occur and stops to execute the Motion SFC program at the error detection.
• When the self program is started at a subroutine call/start, the minor error (SFC) (error code: 33FAH) will occur and stops to
execute the Motion SFC program at the error detection.
• When the subroutine to be called/started at a subroutine call/start in the Motion SFC program 2 running which was called/
started from the Motion SFC program 1 is the Motion SFC program 1 (call source/start program), the minor error (SFC)
(error code: 33FBH) will occur and the call/start source Motion SFC program 2 running is stopped at the point of error
detection.
Precautions
• There are no restrictions on the depth of subroutine call/start nesting.
• For a subroutine start, the start source Motion SFC program continues processing if the start destination Motion SFC
program stops due to an error.
• For a subroutine call, the call source Motion SFC program stops running as soon as the call destination Motion SFC
program stops due to an error.
Symbol
Program name
MAIN
SUB
(1)
(3)
SUB
(2)
END
Shift
(2)
END
Except WAIT
(Subroutine start)
Setting range
The registered program name
3 MOTION SFC PROGRAMS
3
101
3.5 Steps

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents