Specifications

Table Of Contents
5 - 8
5.5.3 Subroutine call/start step
Call/start the SFC program of designated program name.
Program name
(1) Description of operation
(a) The designated SFC program is called and started.
(b) The control may differ depending on the type of transition connected after
the subroutine call/start step.
WAIT ......................... Subroutine call
Other than WAIT ........ Subroutine start
MAIN
SUB
WAIT
END
SUB
END
(1)
(2)
(5)
(3)
(4)
MAIN
SUB
Shift
END
SUB
END
(1)
(2)
(2)
(3)
In case of WAIT (subroutine call) In case of other than WAIT (subroutine start)
(2) Error
In the following case, an error will occur and execution of the SFC program will
stop.
(a) When the designated SFC program does not exist in the called or started
subroutine.
(b) When the called/started SFC program has already been started in a calling/
starting subroutine.
(c) When the local program is called or started in a called or started subroutine.
(3) Precautions
(a) The depth of nesting for subroutine call/start is not limited.
(b) For subroutine start, the start source SFC program is executed continuously
even if the start destination SFC program is stopped due to error.
(c) When the call destination SFC program is stopped due to error in case of
subroutine call, the execution of calling source SFC program is interrupted at
the error.