P
ar
t
1: P
rog
ra
m
ming
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 182 of 909
Introduction
Program commands are like tasks. Whether the task is to turn on an output, set a velocity or
start a move, a program is a list of these tasks. When a programmed SmartMotor is powered-
up or is reset with the Z command, it executes its program (list of tasks) from top to bottom,
with or without a host PC connected. This section covers the commands that control the flow
of the program.
SmartMotor programs are written in the SMI software editor, which is opened by selecting
File > New
from the SMI software toolbar. For details, see Opening the SMI Window
The following program example shows an infinite loop. It causes the motor to move back and
forth forever.
Simple Move Program Example
NOTE:
Programs execute at rates of thousands of lines per second.
Flow Commands
After a program starts, there are a variety of commands that can redirect program flow, and
most of those can do so based on certain conditions. How these conditional decisions are set
up determines what the programmed SmartMotor will do and how "smart" it will actually be.
Flow commands are described in the following sections. A later section describes Interrupt
commands, which are used to execute subroutines based on the change in a status bit. For
more details, see Part 2: SmartMotor Command Reference on page 238.
Part 1: Programming: Introduction