P
ar
t
1: P
rog
ra
m
ming
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 209 of 909
Introduction
The SmartMotor System Status is divided among 16-bit status words. Many status bits are
predefined and offer information about the state of the SmartMotor operating system or the
motor itself. However, there are status words that contain user bits and have been set aside
for use by the programmers and their specific applications.
NOTE:
Status bits may not be cleared or reset if the condition that set it still exists
(for example, the Bh bit).
Status bits can be used to cause interrupts within an application program. The state of a status
bit can also be tested by IF and WHILE instructions. Therefore status bits can determine the
flow or path of execution of an application program.
In addition to the information in this chapter, see Status Words on page 879. Also, the Moog
Animatics website contains a useful tool for working with status bits, the
SmartMotor
Developer's Worksheet
, which is available at:
http://www.animatics.com/tools
Retrieving and Manipulating Status Words/Bits
The following commands are used in retrieving and manipulating status words and bits.
=W(word)
Gets the 16-bit status word.
=B(word,bit)
Gets status bit, word=Word#, bit=Bit#.
Z(word,bit)
Clears status bit, word=Word#, bit=Bit#.
=B@
Gets a status bit through direct addressing, where @ is replaced
with a lower case alpha character.
Z@
Clears a status bit through direct addressing, where @ is
replaced with a lower case alpha character.
ZS
Clears a defined set of status bits; its intent is to clear the faults
of a motor allowing motion to continue from a G command.
For more details, see Part 2: SmartMotor Command Reference on page 238.
System and Motor Status Bits
There are many system and motor status bits available to govern the application program and
motor behavior. The following list shows many of the useful, directly-addressed status bits.
Note that the following is not the complete list of status bits. You should also refer to Status
Words on page 879.
General System Directly-Addressed Status Bits
Bk
Program check sum/EEPROM failure
Bs
Syntax error occurred
Part 1: Programming: Introduction