Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 302 of 909
The Ba bit is reset by any of the following methods:
l
Power reset
l
Z command (total reset of software)
l
Z(0,5) command
l
ZS command
l
Zh command
EXAMPLE: (Subcomponent of system check routine)
IF Bh
PRINT("MOTOR TOO HOT") 'Inform host
GOSUB123 'Deal with condition
ENDIF
C123 'Some code to deal with condition
EXAMPLE:
PRINT(#13,"Default value of TH = ",TH) 'default=85
PRINT(#13,"Motor Temperature = ",TEMP)
PRINT(#13,"START MOTION")
ADT=222 'Set accel/decel
VT=44444
MV 'Set velocity mode
G 'Start motion
TH=TEMP-5 'Force an overheat condition
'units are degrees Celsius
'TH maximum setting is 85
a=CLK
WHILE Bh==0 LOOP 'Loop while Bh is 0
WHILE Bt LOOP
b=CLK
PRINT(#13,"Servo OFF after ",b-a," milliseconds")
EXAMPLE: (Subroutine finds and prints errors)
C10 'Subroutine label
IF Be 'Check for position error
PRINT("Position Error", #13)
ENDIF
IF Bh 'Check for overtemp error
PRINT("Overtemp Error",#13)
ENDIF
IF Ba 'Check for overcurrent error
PRINT("Overcurrent Error",#13)
ENDIF
RETURN 'Return to subroutine call
Part 2: Commands: Bh