134 VIX IM MICROSTEPPER INDEXER DRIVE USER GUIDE
GOTO
GO TO routine
Syntax Units Range of ‘n’ Default See also
aGOTO(label) - - - GOSUB
Description The GOTO command continues user program execution from the label
specified.
Program execution does not return to the original place in the program (use
GOSUB if command execution is required to return).
Properties
Immediate or buffered, can be used in labelled block, not saved by SV
Example 2DECLARE(MOVE1) ; declare move 1
2DECLARE(MOVE2) ; declare move 2
2START: ; code run after power on
2PROFILE1(360,360,400000,20) ; define some move profiles
2PROFILE2(360,360,400000,45)
2GOTO(MOVE1) ; perform move 1
2END
2MOVE1:
2USE(1) ; use the move profile 1
2G
2GOTO(MOVE2)
2END
2MOVE2:
2USE(2) ; use the move profile 2
2G
2GOTO(MOVE1)
2END
Note
If a sequence that is being looped, executes a GOTO command, the loop is
terminated.
The example shown above will give endless motion, only a FAULT condition
or an immediate KILL or STOP command via comms. would stop this
program.