AKD BASIC User Guide | 3 AKDBASICLanguage
IF...THEN...ELSE statements control program execution based on the evaluation of numeric
expressions. The IF...THEN...ELSE decision structure permits the execution of program state-
ments or allows branching to other parts of the program based on the evaluation of the expres-
sion.
There are two structures of IF... THEN...ELSE statements, single line and block formats.
3.5.11 $Include
$include inclfile
$include include-file-name
Textually include inclfile at this point in the compilation. There can be no space between $ and
include. The $include directive must start at the beginning of the line.
3.5.12 Input
input [prompt-string][,|;]input-variable
Input reads a character string received by the console tab in the program view, terminated by a
carriage return.
As an option, the prompt message is transmitted when the Input statement is encountered. If
the prompt string is followed by a semicolon, a question mark is printed at the end of the prompt
string. If a comma follows the prompt string, no question mark is printed. This input statement
is typically used for debugging purposes.
3.5.13 Interrupt … End Interrupt
interrupt {Interrupt-Source-Name}
...program statements...
end interrupt
Interrupt handlers can be located anywhere in the program text (e.g., before main).
3.5.14 MOVE.ABORT
MOVE.ABORT stops motor motion and allows continued program execution. Deceleration is
determined by the controlled stop deceleration rate (CS.DEC).
3.5.15 MOVE.GOABS
MOVE.GOABS (Go Absolute) moves the motor to the position specified by MOVE.TA-
RGETPOS. This position is based on a zero position at electrical home.
The motor speed follows a velocity profile as specified by MOVE.ACC, MOVE.RUNSPEED,
and MOVE.DEC . Direction of travel depends on current position and target position only
(MOVE.DIR has no effect). After the program initiates MOVE.GOABS, it immediately goes to
the next instruction.
Change MOVE.ACC, MOVE.RUNSPEED, and MOVE.DEC during a move using
MOVE.GOUPDATE.
3.5.16 MOVE.GOHOME
MOVE.GOHOME moves the motor shaft to the electrical home position (PL.FB = 0).
31 Kollmorgenâ„¢ | March 30, 2012