Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 685 of 909
EXAMPLE: (user program with possible halt)
In Class 5, issuing the RUNcommand causes top-down execution through the entire program
no matter where the RUN? command is placed.
PRINT(" EnterRUN to start",#13) 'Prompt user for RUN
RUN? 'Run command requested; stop program
'execution until "RUN" command is received
PRINT(" LOADING TRAJECTORY",#13)
ADT=100 'Set target accel/decel
VT=1000000 'Set target velocity
PT=1000000 'Set target position
MP 'Mode Position
PRINT(" EXECUTING TRAJECTORY",#13)
G 'Begin motion.
END 'Required END
Program output is:
Enter RUN to start
LOADINGTRAJECTORY
EXECUTING TRAJECTORY
RELATED COMMANDS:
END End Program Code Execution (see page 431)
GOSUB(label) Subroutine Call (see page 463)
GOTO(label) Branch Program Flow to a Label (see page 465)
LOAD Download Compiled User Program to Motor (see page 518)
LOCKP Lock Program (see page 521)
PAUSE Pause Program Execution (see page 617)
RESUME Resume Program Execution (see page 672)
RUN? Halt Program Execution Until RUN Received (see page 684)
UP Upload Compiled Program and Header (see page 758)
UPLOAD Upload Standard User Program (see page 760)
Part 2: Commands: RUN?