Subroutine Call/Start Step - Mitsubishi Electric Melsec Q Series Programming Manual

Motion controller (sv13/sv22)
Hide thumbs Also See for Melsec Q Series:
Table of Contents

Advertisement

4 MOTION SFC PROGRAMS

4.5.3 Subroutine call/start step

[Operations]
[Errors]
Name
Subroutine
Program name
call/start step
(1) Calls/starts the Motion SFC program of the specified program name.
(2) Control varies with the type of the transition coupled next to the subroutine
call/start step.
(a) 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.
(b) 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
1)
3)
SUB
2)
WAIT
5)
4)
END
WAIT
(Subroutine call)
(1) When the specified Motion SFC program does not exist at a subroutine call/start,
the Motion SFC error (error code: 16005) will occur and stops to execute the
Motion SFC program at the error detection.
(2) When the called/started Motion SFC program is already starting at a subroutine
call/start, the Motion SFC error (error code: 16006) will occur and stops to execute
the Motion SFC program at the error detection.
(3) When the self program is started at a subroutine call/start, the Motion SFC error
(error code: 16110) will occur and stops to execute the Motion SFC program at
the error detection.
(4) 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 Motion SFC error
(error code: 16111) will occur and the call/start source Motion SFC program 2
running is stopped at the point of error detection.
Symbol
Calls/starts the Motion SFC program of the specified
program name.
SUB
MAIN
1)
SUB
2)
END
Shift
2)
END
Except WAIT
(Subroutine start)
4 - 12
Function
SUB
3)
END

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents