Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 682 of 909
RUN
Run Program
APPLICATION: Program execution and flow control
DESCRIPTION: Execute user EEPROM program beginning at initial command
EXECUTION: Immediate
CONDITIONAL TO: No effect if no EEPROM program exists
LIMITATIONS: Valid EEPROM stored program commands
READ/REPORT: N/A
WRITE: N/A
LANGUAGE ACCESS: N/A
UNITS: N/A
RANGE OF VALUES: N/A
TYPICAL VALUES: N/A
DEFAULT VALUE: RUN at power recycle or software reset
FIRMWARE VERSION: 5.x and later
COMBITRONIC: RUN:3
where ":3" is the motor address — use the actual address or a
variable
DETAILED DESCRIPTION:
The RUN command starts a stored (downloaded) user EEPROM program. Issuing a RUN
command does not reset any motion, variable or I/O state. However, it does reset the
program-execution pointer (stack pointer) to zero, and resets the internal GOSUB stack.
NOTE: To test your program with a truly fresh start, use the Z command to
completely reset the motor as if it were just powered up. For details, see Z on page
806.
If a program exists within the SmartMotor™ user EEPROM, it will automatically run every time
the motor is turned on. To prevent this, make RUN? the first command of your user program.
Or, if you wish, place a RUN? command further down in your program. At power up, the
program will automatically execute only down to the RUN? statement. The program execution
will stop at that point.
NOTE: Programs that are deliberately started with the RUN command (usually
from the serial terminal), will start from the top of the program and skip over the
RUN? command.
Because user programs start automatically, it is possible to write a program that prevents
SMI communications with the motor. For instance, a Z (reset) or CCHN command at the
beginning of the program can make it difficult to connect to the motor.
NOTE: If you get locked out and are unable to communicate with the SmartMotor,
you may be able to recover communications using the SMI software's
Part 2: Commands: RUN