Parker Hannifin
•
Use the
RETURN
command to indicate the end of the
subroutine.
•
Do not put a
REM
command on the same line as a label.
Example
_START
GOSUB Label1
GOTO START
_Label1
PRINT “Inside Label1 subroutine”
RETURN
Remarks
You can add comments to a program. You can put a
REM
statement by itself on a line, or you can place it on the same line
after a program statement.
When following a program statement with a
REM
statement, observe
the following: place a space, a colon (:), then another space
between the program statement and the
REM
statement.
Comments consume memory on the controller, and can affect
processing speed. By using an apostrophe (‘) in place of REM, the
controller strips comments on downloading the program. Unlike
REM
,
when using the apostrophe for comments, the comment must
appear on its own line.
REM this is a comment
‘ this is another comment
ACC 10000 : REM this comment follows a valid program statement
Command Syntax
The AcroBASIC programming language accommodates a wide
range of needs by providing basic motion control building blocks, as
well as sophisticated motion and program flow constructs.
The language comprises simple ASCII mnemonic commands, with
each command separated by a command delimiter (carriage
return, colon, or line feed). The command delimiter indicates that a
command is ready for processing.
The AcroBASIC programming language uses a parent daughter
approach. A parent can have daughter statements; a daughter
statement is considered a sub-statement of the parent.
You can issue many parent statements alone—some provide the
current status related to that particular command, others perform
an action. For example, issuing the
DIM
command at the system
level provides you with a report of the system dimensions.
Conversely, issuing the
CLEAR
command at the system level frees the
memory allocated to all programs.
8 Programmer’s Guide