
!
286
The following diagram illustrates program execution flow for various execution
conditions for two SBS(91).
SBS(91)
000
SBS(91)
001
SBN(92)
000
RET(93)
SBN(92)
001
RET(93)
END(001)
Main
program
Subroutines
A
B
C
D
E
A
A
A
A
B
B
B
B
C
C
C
C
D
D
E
E
OFF execution conditions for
subroutines 000 and 001
ON execution condition for
subroutine 000 only
ON execution condition for
subroutine 001 only
ON execution conditions for
subroutines 000 and 001
Note
A non-fatal error (error code 8B) will be generated if a subroutine’s execution
time exceeds 10 ms.
Flags
ER:
A subroutine does not exist for the specified subroutine number.
A subroutine has called itself.
An active subroutine has been called.
Caution
SBS(91) will not be executed and the subroutine will not be called when ER is
ON.
5-23-4 SUBROUTINE DEFINE and RETURN – SBN(92)/RET(93)
N
: Subroutine number
000 to 255
Ladder Symbols
Definer Data Areas
SBN(92) N
RET(93)
Limitations
Each subroutine number can be used in SBN(92) once only.
Description
SBN(92) is used to mark the beginning of a subroutine program; RET(93) is
used to mark the end. Each subroutine is identified with a subroutine number, N,
that is programmed as a definer for SBN(92). This same subroutine number is
used in any SBS(91) that calls the subroutine (see 5-23-3 SUBROUTINE EN-
TER – SBS(91)). No subroutine number is required with RET(93).
Subroutines and Interrupt Control
Section 5-23
Содержание SYSMAC C200HE
Страница 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Страница 2: ......
Страница 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 380: ......
Страница 410: ......
Страница 438: ......
Страница 464: ......
Страница 474: ......
Страница 522: ......
Страница 538: ......
Страница 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 554: ......
Страница 560: ......
Страница 584: ......
Страница 585: ......
Страница 586: ...W303 E1 09 ...