Data Sheet
Commands Reference
236 Advanced Digital Motor Controller User Manual V1.8, August 28, 2017
Syntax Scripting: setcommand(_VAR, nn, mm)
setcommand(_VAR, nn, mm)
Number of Arguments: 2
Argument 1: VarNbr
Min: 1 Max: Total nbr of User Variables
Argument 2: Value Type: Signed 32-bit
Min: -2147M Max: 2147M
Where:
nn = Variable number
mm = Value
Runtime Queries
Runtime queries can be used to read the value of real-time measurements at any time
during the controller operation. Real-time queries are very short commands that start with
“?” followed by one to three letters. In some instances, queries can be sent with or with-
out a numerical parameter.
Without parameter, the controller will reply with the values of all channels. When a numer-
ical parameter is sent, the controller will respond with the value of the channel selected
by that parameter.
Example:
Q:?T
R: T=20:30:40
Q: ?T2
R: T=30
All queries are stored in a history buffer that can be made to automatically recall the
past 16 queries at a user-selectable time interval. See “Query History Commands” on
page 271.
Routine queries can be sent from within a MicroBasic Script using the getvalue() function.
TABLE 19-2. Runtime Queries
Command Argument Description
A Channel Read Motor Amps
AI InputNbr Read Analog Inputs
AIC InputNbr Read Analog Input after Conversion
ANG Channel Read Rotor Angle
ASI Channel Read Raw Sin/Cos sensor
B VarNbr Read User Boolean Variable
BA Channel Read Battery Amps
BCR Channel Read Brushless Count Relative