Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 64 of 909
l
Specific communication ports can be selected using the tabs.
l
Commands can be entered in the white text box or directly on the blue screen. If data is
flooding back from the motor, then the white text box will be more convenient, as the
incoming data may cause the text to scroll out of view.
l
When motor power is activated, there is a 500 ms timeout before the motor will accept
commands on the serial port. Any commands sent during that time are buffered and
then accepted once the 500 ms timeout expires. Because incoming commands take
priority over the internal program, buffered commands run before the internal program
begins.
l
Because multiple SmartMotors are on a single communication port are individually
addressed, commands can be routed to any or all of them by making the appropriate
selection from the drop-down list, which is located just below the tabs. The SMI
program automatically sends the appropriate codes to the network to route the data to
the specified motor(s).
l
You can double-click a previous command to resend the command (see the following
figure). However,
l
If that command has a motor address in it (for example, 1RPA, where "1" = serial
bus Motor 1), the command will resend to that motor.
l
If that command does not have an address, the command will be sent to the last-
addressed motor. For example, if you previously sent the command 2RPA, which
addresses serial bus Motor 2, an un-addressed command that you double-click (or
issue) will go to serial bus Motor 2, even if it's on the list before the point where
you started addressing Motor 2.
An example of commands sent to
the last-addressed motor. Notice
that double-clicking the first RPA
command reports the position of
motor 3 because it was the last-
addressed motor.
l
PRINT commands containing data can be sprinkled in programs to send data to the
Terminal window as an aid in debugging.
l
What is typed on the screen is not what goes to the motor. For example, 1RPAdoes not
send a "1" to the motor — it is sending an Extended ASCII code for "1"(Hex 0x81). Then
it sends ASCII "R", 'P" and "A", and a SPACE (Hex 20) as the delimiter (not a carriage
return). Note that the terminal window uses a space as the delimiter; the motor uses a
carriage return (Hex 0x0D) as the delimiter.
Part 1: Programming: Terminal Window