beautypg.com

How to use subroutines – IAI America XSEL-KET User Manual

Page 324

background image

305

Appendix

INTELLIGENT ACTUATOR

14. How to Use Subroutines


[Description]

When the same processing occurs multiple times in the same program, the applicable steps can be
combined into a group and the group of steps can be called and executed. This group of steps is called a
subroutine. Subroutines are used to make programs easier to read. Up to 99 subroutines can be used in
one program. Also, up to 15 subroutine calls can be nested.

[How to use]

Use the following commands to declare and call subroutines:
EXSR Call

subroutine

BGSR Declare start of subroutine (declare start of group of steps)
EDSR Declare end of subroutine (declare end of group of steps)

[Use example]
























[Note]

Using a GOTO command to jump to TAG from within a subroutine is prohibited.

The same tasks are gathered in
one location.

Subroutine

This manual is related to the following products: