How to use subroutines – IAI America TT-C3 User Manual

Page 274

Advertising
background image

264

INTELLIGENT ACTUATOR

Appendix

Appendix

14. How to Use Subroutines

Description

If the same processing is performed multiple times in one program, the applicable operation is defined
in a separate group of steps so that these steps can be called every time the operation is required.
These steps are called a subroutine. Subroutines are used to shorten and simplify the program steps.
Up to 99 subroutines can be used in a single program, and a maximum of 15 subroutine calls can be
nested.

How to Use

Declare/call a subroutine using the following commands:
EXSR: Call a subroutine.
BGSR: Declare the start of a subroutine (declaration of the start of a group of steps).
EDSR: Declare the end of a subroutine (declaration of the end of a group of steps).

Example of Use

Note

Jumping from within a subroutine to a TAG outside the subroutine using a GOTO command is
prohibited.

The steps that perform the same
operation are defined in a single
location.

Subroutine

Advertising
This manual is related to the following products: