Data Sheet

Runtime Queries
Advanced Digital Motor Controller User Manual 255
FS - Read Status Flags
Alias: STFLAG HexCode: 14 CANOpen id: 0x6405
Description:
Report the state of status flags used by the controller to indicate a number of internal
conditions during normal operation. The response to this query is the single number for all
status flags. The status of individual flags is read by converting this number to binary and
look at various bits of that number.
Syntax Serial: ?FS
Argument: None
Syntax Scripting: result = getvalue(_FS, 1)
result = getvalue(_STFLAG, 1)
Reply:
FS = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 8-bit Min: 0 Max:
255
Where:
f1 = Serial mode
f2 = Pulse mode
f3 = Analog mode
f4 = Power stage off
f5 = Stall detected
f6 = At limit
f7 = Unused
f8 = MicroBasic script running
Note:
On controller models supporting Spektrum radio mode f4 is used to indicate Spektrum.
f4 to f6 are shifted to f5 to f7
HS - Read Hall Sensor States
Alias: HSENSE HexCode: 31 CANOpen id: 0x2123
Description:
Reports that status of the hall sensor inputs. This function is mostly useful for trouble-
shooting. When no sensors are connected, all inputs are pulled high and the value 7 will
be replied. All inputs high and all inputs low (0) are invalid combinations. In normal condi-
tions, all values from 1 to 6 should appear at one time or the other as the motor shaft is
rotated
Syntax Serial: ?HS [cc]