Roboteq Controllers User Manual v3.2-225-488
Roboteq Controllers User Manual v3.2-225-488
SECTION 16 Commands
Reference
This section lists all the commands accepted by the controller. Commands are typically
sent via the serial (RS232, RS485, TCP or USB) ports (See “Serial (RS232/RS485/TCP/
USB) Operation” in Section 14) Except for a few maintenance commands, they can also be
issued from within a user script written using the MicroBasic language (See “MicroBasic
Scripting Manual”).
Commands Types
The controller will accept and recognize four types of commands:
Runtime commands
These start with “!” when called via the serial communication (RS232, RS485, TCP or
USB), or using the setcommand() MicroBasic function. These are usually motor or oper-
ation commands that will have immediate effect (e.g. to turn on the motor, set a speed
or activate digital output). Most of Runtime commands are mapped inside a respective
Object Directories in order to be accessed by the network interfaces, CAN/CANOpen,
EtherCAT and Profinet (See “CAN/EtherCAT Networking Manual” or “Profinet Networking
Manual” respectively) See “Runtime Commands” on page 188 for the full list and descrip-
tion of these commands.
Runtime queries
These start with “?” when called via the serial communication (RS232, RS485, TCP or
USB), or using the getvalue() Microbasic function. These are used to read operating values
at runtime (e.g. read Amps, Volts, power level, counter values). Most of Runtime queries
are mapped inside a respective Object Directories in order to be accessed by the net-
work interfaces, CAN/CANOpen, EtherCAT and Profinet (See “CAN/EtherCAT Networking
Manual” or “Profinet Networking Manual” respectively). See Runtime commands are
commands that can be sent at any time during controller operation and are taken into
consideration immediately. Runtime commands start with “!” and are followed by one to
three letters. Runtime commands are also used to refresh the watchdog timer to ensure
safe communication. Runtime commands can be called from a MicroBasic script using the
setcommand() function.
Maintenance commands
These are only available trough serial (RS232, RS485, TCP or USB) and start with “%”.
They are used for all of the maintenance commands such as (e.g. set the time, save con-
figuration to EEPROM, reset, load default, etc.).
Configuration commands
These start with “~” for read and “^” for write when called via the serial communication
(RS232, RS485, TCP or USB), or using the getconfig() and setconfig() MicroBasic func-
tions. They are used to read or configure all the operating parameters of the controller
(e.g. set or read amps limit). See “Set/Read Configuration Commands” on page 303 for
the full list and description of these commands.
Runtime Commands
Runtime commands are commands that can be sent at any time during controller oper-
ation and are taken into consideration immediately. Runtime commands start with “!”
and are followed by one to three letters. Runtime commands are also used to refresh the
watchdog timer to ensure safe communication. Runtime commands can be called from a
MicroBasic script using the setcommand() function.
226 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
AC - Set Acceleration
Alias: ACCEL HexCode: 07 CANOpen id: 0x2006
Description:
Set the rate of speed change during acceleration for a motor channel. This command is
identical to the MACC configuration command but is provided so that it can be changed
rapidly during motor operation. Acceleration value is in 0.1 * RPM per second. When using
controllers fitted with encoder, the speed and acceleration value are actual RPMs. Brush-
less motor controllers use the hall sensor for measuring actual speed and acceleration will
also be in actual RPM/s. When using the controller without speed sensor, the acceleration
value is relative to the Max RPM configuration parameter, which itself is a user-provided
number for the speed normally expected at full power. Assuming that the Max RPM pa-
rameter is set to 1000, and acceleration value of 10000 means that the motor will go from
0 to full speed in exactly 1 second, regardless of the actual motor speed. In Closed Loop
Torque mode acceleration value is in 10 * miliAmps per second. This command is not ap-
plicable if either of the acceleration (MAC) or deceleration (MDEC) configuration value is
set to 0.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Example:
!AC 1 2000 : Increase Motor 1 speed by 200 RPM every second if speed is measured by
encoder
!AC 2 20000 : Time from 0 to full power is 0.5s if no speed sensors are present and Max
RPM is set to 1000
AX - Next Acceleration
Alias: NXTACC HexCode: 14 CANOpen id: 0x2012
Description:
This command is used for chaining commands in Position Count mode. It is similar to
AC except that it stores an acceleration value in a buffer. This value will become the next
acceleration the controller will use and becomes active upon reaching a previous desired
position. If omitted, the command will be chained using the last used acceleration value.
This command is not applicable if either of the acceleration (MAC) or deceleration (MDEC)
configuration value is set to 0.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Acceleration value in 0.1 * RPM/s
Description:
Set the state of user boolean variables inside the controller. These variables can then be
read from within a user MicroBasic script to perform specific actions.
Syntax Serial: !B nn mm
228 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Number of Arguments: 2
Argument 1: VarNbr
Min: 1 Max: Total nbr of Bool Vars
Where:
nn = Variable number
mm = 0 or 1
Note:
The total number of user variables depends on the controller model and can be found in
the product datasheet.
Description:
This command is used to override the automatic engage/release of the brake. The Digital
Out action must be configured as “Motor is On”.
Number of Arguments:
Argument 1: PWM Brake Channel
Min: 1 Max: Total Number of Motors
Where:
nn =
0: Auto. Brake is controlled by Motor is On action.
1: Brake Release. Brake is released ignoring the Motor is On action.
2: Brake Engage. Brake is engaged ignoring the Motor is On action.
Example:
!BRK 1 1: will release the PWM brake.
Important Note
This command overrides the automatic brake control. This also means that if the
motor is running and the user sends a Force brake command, the brake WILL be en-
gaged.
Description:
This command loads the encoder counter for the selected motor channel with the value
contained in the command argument. Beware that changing the counter value while oper-
ating in closed-loop mode can have adverse effects.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Encoders
Where:
cc = Motor channel
nn = Counter value
Example:
!C 2 -1000 : Loads -1000 in encoder counter 2
!C 1 0 : Clears encoder counter 1
Description:
This command loads the Internal Sensor counter with the value contained in the com-
mand argument. Beware that changing the controller value while operating in closed-loop
mode can have adverse effects.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
230 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Where:
cc = Motor channel
nn = Counter value
Example:
!CB 1 -1000 : Loads -1000 in brushless counter 1
!CB 2 0 : Clears brushless counter 2
Description:
Sets the Current PI’s Integral Gain. The value is set as the gain multiplied by 10^4. On
brushless motor controller operating in sinusoidal mode, two gains can be set for each
motor channel, in order to control the Flux and Torque current. On DC brushed controllers
or in brushless motor controllers when operating in trapezoidal mode the gains for the
Torque current are used only.
Number of Arguments: 2
Where:
cc (single channel) =
1: Flux Integral Gain
2: Torque Integral Gain
cc (dual channel) =
1: Flux Integral Gain for motor 1
2: Flux Integral Gain for motor 2
3: Torque Integral Gain for motor 1
4: Torque Integral Gain for motor 2
Example:
!CIG 1 2300 : will set Flux Integral Gain of Motor 1 to 0.23
Description:
This command is identical to the G (GO) command except that it is meant to be used for
sending motor commands via CANOpen. See the G command for details.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Command value
Description:
Sets the Current PI’s Proportional Gain. The value is set as the gain multiplied by 10^4. On
brushless motor controller operating in sinusoidal mode, two gains can be set for each
motor channel, in order to control the Flux and Torque current. On DC brushed controllers
or in brushless motor controllers when operating in trapezoidal mode the gains for the
Torque current are used only.
Number of Arguments: 2
Where:
cc (single channel) =
232 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
cc (dual channel) =
Example:
!CPG 1 2300 : will set Flux Proportional Gain of Motor 1 to 0.23
CS - CAN Send
Alias: CANSEND HexCode: 18 CANOpen id:
Description:
This command is used in CAN-enabled controllers to build and send CAN frames in the
RawCAN mode (See RawCAN section in manual). It can be used to enter the header,
bytecount, and data, one element at a time. The frame is sent immediately after the byte-
count is entered, and so it should be entered last.
Number of Arguments: 2
Argument 1: Element
Min: 1 Max: 10
Where:
ee =
1 : Header
2 : Bytecount
3 to 10 : Data0 to data7
nn = value
Example:
!CS 1 5 : Enter 5 in header
!CS 3 2 : Enter 2 in data 0
!CS 4 3 : Enter 3 in data 1
!CS 2 2 : Enter 2 in bytecount and send CAN frame
Description:
This command loads the SSI Sensor counter with the value contained in the command
argument. Beware that changing the controller value while operating in closed-loop mode
can have adverse effects. This command is not applicable if the respective sensor’s use
has been set as absolute feedback.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI sensors
Where:
cc = SSI sensor channel
nn = Counter value
Example:
!CSS 1 -1000 : Loads -1000 in SSI sensor counter 1
!CSS 2 0 : Clears SSI sensor counter 2
Description:
This command is used to build and send Raw frames in serial interfaces (See Raw Re-
direct section in manual). It can be used to enter the outport (RS232 or RS485), frame
length, and data, one element at a time. The frame is sent immediately after the frame
length is entered, and so it should be entered last.
Number of Arguments: 2
Argument 1: Element
Min: 1 Max: 18
234 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
2 = frame length
3 to 18 = data0 to data15
nn = value
Description:
The D0 command will turn off the single digital output selected by the number that fol-
lows.
Number of Arguments: 1
Where:
nn = Output number
Example:
!D0 2 : will deactivate output 2
Note:
Digital Outputs are Open Collector. Activating an outputs will force it to ground. Deactivat-
ing an output will cause it to float.
Description:
The D1 command will activate the single digital output that is selected by the parameter
that follows.
Number of Arguments: 1
Where:
nn = Output number
Example:
!D1 1 : will activate output 1
Note:
Digital Outputs are Open Collector. Activating an outputs will force it to ground. Deactivat-
ing an output will cause it to float.
DC - Set Deceleration
Alias: DECEL HexCode: 08 CANOpen id: 0x2007
Description:
Set the rate of speed change during decceleration for a motor channel. This command is
identical to the MDEC configuration command but is provided so that it can be changed
rapidly during motor operation. Decceleration value is in 0.1 * RPM per second. When
using controllers fitted with encoder, the speed and decceleration value are actual RPMs.
Brushless motor controllers use the hall sensor for measuring actual speed and deccel-
eration will also be in actual RPM/s. When using the controller without speed sensor,
the decceleration value is relative to the Max RPM configuration parameter, which itself
is a user-provided number for the speed normally expected at full power. Assuming that
the Max RPM parameter is set to 1000, and decceleration value of 10000 means that
the motor will go from full speed to 0 in exactly 1 second, regardless of the actual motor
speed. In Closed Loop Torque mode deceleration value is in 0.1 * miliAmps per second.
This command is not applicable if either of the acceleration (MAC) or deceleration (MDEC)
configuration value is set to 0.
236 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Deceleration value in 0.1 * RPM/s
Example:
!DC 1 2000 : Reduce Motor 1 speed by 200 RPM every second if speed is mea-
sured by encoder
!DC 2 20000 : Time from full power to stop is 0.5s if no speed sensors are present and
Max RPM is set to 1000
Description:
Sets the PID’s Derivative Gain. The value is set as the gain multiplied by 10^6. This value is
used for both speed and position derivative gains.
Number of Arguments: 2
Where:
cc (single channel) =
1: Speed Derivative Gain
2: Position Derivative Gain
cc (dual channel) =
Example:
!DG 1 10.000 : will set Speed Derivative Gain of Motor 1 to 0.01
Description:
The D command will turn ON or OFF one or many digital outputs at the same time. The
number can be a value from 0 to 255 and binary representation of that number has 1bit
affected to its respective output pin.
Number of Arguments: 1
Where:
nn = Bit pattern to be applied to all output lines at once
Example:
!DS 03 : will activate outputs 1 and 2. All others are off
Note:
Digital Outputs are Open Collector. Activating an outputs will force it to ground. Deactivat-
ing an output will cause it to float.
DX - Next Deceleration
Alias: NXTDEC HexCode: 15 CANOpen id: 0x2013
Description:
This command is used for chaining commands in Position Count mode. It is similar to
DC except that it stores a decceleration value in a buffer. This value will become the next
decceleration the controller will use and becomes active upon reaching a previous desired
position. If omitted, the command will be chained using the last used decceleration value.
This command is not applicable if either of the acceleration (MAC) or deceleration (MDEC)
configuration values is set to 0 (bypass command ramp).
Number of Arguments: 2
238 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Acceleration value
Description:
This command causes any changes to the controller’s configuration to be saved to Flash.
Saved configurations are then loaded again next time the controller is powered on. This
command is a duplication of the EESAV maintenance command. It is provided as a
Real-Time command as well in order to make it possible to save configuration changes
from within MicroBasic scripts.
Number of Arguments: 0
Note:
Do not save configuration while motors are running. Saving to EEPROM takes several mil-
liseconds, during which the control loop is suspended.
Number of EEPROM write cycles are limited to around 10000. Saving to EEPROM must
be done scarcely.
EX - Emergency Stop
Alias: ESTOP HexCode: 0E CANOpen id: 0x200C
Description:
The EX command will cause the controller to enter an emergency stop in the same
way as if hardware emergency stop was detected on an input pin. The emergency stop
condition will remain until controller is reset or until the MG release command is received.
Number of Arguments: 1
Where:
cc =
1: All channels
2: Channel 1
3: Channel 2
4: Channel 3
Example:
!EX 3: Will trigger Emergency stop only for channel 2.
Description:
The G command is the primary command used to activate the motors. The value ranges
from -1000 to +1000, mapping the input across the full operational range of the motor. The
specific effect of the G command depends on the operating mode:
• Open Loop Speed Mode: The command value represents the desired PWM duty
cycle voltage ratio to be applied to the motor, scaled from -100% to 100%. Minus
symbol indicates the reverse direction.
• Closed Loop Speed Mode: The command value is scaled relative to the maximum
speed, as defined by the MXRPM configuration parameter.
• Closed Loop Position Relative Mode and Closed Loop Tracking Mode: The com-
mand value indicates the desired relative destination position, ranging between the
minimum and maximum values of the sensor in use.
• Position Count Mode: The G command has no effect in this mode.
• Torque Mode in BLDC and DC Motors: The command value represents the desired
motor current, scaled from 0 to the value set by the Amps Limits parameter.
• Torque Mode in ACIM Motors: The command value represents the desired torque,
scaled from 0 to the peak torque parameter.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
240 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Where:
cc = Motor channel
nn = Command value
Example:
!G 1 500 : In Open Loop Speed mode, applies 50% PWM duty cycle voltage to motor
channel 1
!G 1 500 : In Closed Loop Speed mode, assuming that 3000 is set in Max RPM parameter
(MXRPM), the command will drive the motor to 1500 RPM
!G 1 500 : In Closed Loop Relative or Closed Loop Tracking modes, the motor will move to
75% of the total sensor range, from -1000 to +1000.
!G 1 500 : In Torque mode, assuming that Amps Limit is 60A, and peak torque is 15 Nm,
the motor voltage will increase until 30 A are reached for BLDC and DC motors and 7.5
Nm for AC motors.
Description:
GIQ is the command for the torque amps in closed loop torque mode only in sinusoidal
mode. In other cases it is void. The value is set in Amps*10. After the motor stops or at
power up the target flux amps is set by the TID value.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Amps
Type: Signed 32
Where:
cc = Motor channel
nn = Amps*10
Example:
!GIQ 1 500 : In Closed Loop Torque mode, applies 50,0A torque amps command.
Description:
GID is the command for the flux amps in closed loop torque mode only in sinusoidal
mode. In other cases it is void. The value is set in Amps*10. A non-zero value creates field
weakening and can be used to achieve higher rotation speed
Number of Arguments: 2
Argument 1: Channel
Argument 2: Amps
Type: Signed 32
Where:
cc = Motor channel
nn = Amps*10
Example:
!GID 1 -200: In Closed Loop Torque mode, applies -20,0A flux amps command (field weak-
ening).
Description:
This command loads the Home count value into the Encoder, SSI Sensor, or Brushless
Counters. The Home count can be any user value and is set using the EHOME, SHOME
and BHOME configuration parameters. When SSI sensors are used as absolute encoders
(Absolute Feedback) then this command loads to the Home count value the SSI sensor
counter. In this case the Home count value is used as offset to the SSI sensor Counter.
Beware that loading the counter with the home value while the controller is operating in
closed loop can have adverse effects.
Number of Arguments: 1
242 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Where:
cc = Motor channel
Example:
!H 1: Loads encoder counter 1, SSI sensor counter 1 and brushless counter 1 with their
preset home values.
Description:
Sets the PID’s Integral Gain. The value is set as the gain multiplied by 10^6. This value is
used for both speed and position integral gains.
Number of Arguments: 2
Where:
cc (single channel) =
1: Speed Integral Gain
2: Position Integral Gain
cc (dual channel) =
Example:
!IG 1 100.000 : will set Speed Integral Gain of Motor 1 to 0.1
Description:
The MG command will release the emergency stop condition or any other fault and allow
the controller to return to normal operation. Always make sure that the fault condition has
been cleared before sending this command. Please be aware that MG is handled as a
motor command, and therefore, it will reset the watchdog timer. If sent repeatedly, it may
conflict with other command sources.
Number of Arguments: 0
Description:
The MS command will stop the motor for the specified motor channel.
Number of Arguments: 1
Where:
cc = Motor channel
Description:
This command is used in order to perform motor and/or sensor setup, in cases of DC
brushless motor controllers, when working in Sinusoidal mode. This command will make
the motor spin slowly and will configure accordingly the respective fields in order to have
a smooth motor spin and alignment between the motor and the sensor directions. During
setup no motor command can be applied to the motors. For more details see Section 8.
244 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Number of Arguments: 1
Where:
cc = Motor channel
Description:
This command is used in the Position Count mode to make the motor move to a specified
feedback sensor count value. Take into consideration that in case of DS402 enabled, then
this command is not active. POS command should be used instead.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Absolute count destination
Example:
!P 1 10000 : make motor go to absolute count value 10000.
Description:
Sets the PID’s Proportional Gain. The value is set as the gain multiplied by 10^6. This value
is used for both speed and position proportional gains.
Number of Arguments: 2
Where:
cc (single channel) =
1: Speed Proportional Gain
2: Position Proportional Gain
cc (dual channel) =
Example:
!PG 1 100.000 : will set Speed Proportional Gain of Motor 1 to 0.1
Description:
This command is used in the Position Count mode to make the motor move to a feedback
sensor count position that is relative to its current desired position.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Relative count position
246 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Example:
!PR 1 10000 : while motor is stopped after power up and counter = 0, motor 1 will go to
+10000
!PR 2 10000 : while previous command was absolute goto position !P 2 5000, motor will
go to +15000
Note:
Beware that counter will rollover at counter values +/-2’147’483’648.
Description:
This command is similar to PR except that it stores a relative count value in a buffer. This
value becomes active upon reaching a previous desired position and will become the next
destination the controller will go to. See Position Command Chaining in manual.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Relative count position
Example:
!P 1 5000 followed by !PRX 1 -10000 : will cause motor to go to count position 5000 and
upon reaching the destination move to position -5000.
Description:
This command is similar to P except that it stores an absolute count value in a buffer. This
value will become the next destination the controller will go to and becomes active upon
reaching a previous desired position. See Position Command Chaining in manual.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Absolute count position
Example:
!P 1 5000 followed by !PX 1 -10000 : will cause motor to go to count position 5000 and
upon reaching the destination move to position -10000.
Description:
With this command the motor speed decelerates to zero according to the fault decelera-
tion speed ramp. This command can be used when the user wants to decelerate the mo-
tor speed to zero at all modes. A safe stop flag will be generated during the deceleration
and it will be reseted when the motor command will be idle (0 in speed modes or equal to
feedback in position modes) and the speed 0.
Please note that Quick Stop will switch the system to Speed mode to decelerate the mo-
tor. For proper operation, the Speed mode must be configured with the appropriate PID
gains.
Number of Arguments: 1
Where:
Example:
!QST 1: The motor 1 will start decelerate its speed according to deceleration speed ramp.
R - MicroBasic Run
Alias: BRUN HexCode: 0C CANOpen id: 0x2018
Description:
This command is used to start, stop and restart a MicroBasic script if one is loaded in the
controller.
248 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Number of Arguments: 1
Where:
nn =
None : Start/resume script
0 : Stop script
1 : Start/resume script
2 : Reinitialize and restart script
Description:
In the Closed-Loop Speed mode, this command will cause the motor to spin at the de-
sired RPM speed. In Closed-Loop Position modes, this commands determines the speed
at which the motor will move from one position to the next. It will not actually start the
motion.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Speed value in RPM
Example:
!S 2500 : set motor 1 position velocity to 2500 RPM
Description:
With this command the STO Self-Test process is executed in order to check whether
there is a fault. This process is applicable only on motor controllers with STO circuit im-
plemented on their board. The result of the test is taken back using the STT query. Along
with the STO self-test an extra test is also taken place in order to detect whether either
of the power MOSFETs are shorted (so damaged) or not. This test takes place even if the
STO feature is disabled and during power-up. In case of STO fault the Respective STO
Fault bit in the Fault Flags is set. The STO fault is triggered when:
In case of MOSFET fault the MOSFail and Estop bits in fault flags and the FETs Off bit in
status flags are set. This fault is cleared only when the STT runs again and the MOSFET
failure goes away.
Number of Arguments: 0
SX - Next Velocity
Alias: NXTVEL HexCode: 17 CANOpen id: 0x2014
Description:
This command is used in Position Count mode. It is similar to S except that it stores a ve-
locity value in a buffer. This value will become the next velocity the controller will use and
becomes active upon reaching a previous desired position. If omitted, the command will
be chained using the last used velocity value. See Position Command Chaining in manual.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Velocity value
250 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Description:
This command is used to set the value of user variables inside the controller. These vari-
ables can be then read from within a user MicroBasic script to perform specific actions.
The total number of variables depends on the controller model and can be found in the
product datasheet. Variables are signed 32-bit integers.
Number of Arguments: 2
Argument 1: VarNbr
Min: 1 Max: Total nbr of User Variables
Where:
nn = Variable number
mm = Value
TABLE 15-2.
Description:
This command controls the Power Drive System-Finite State Automation (PDS-FSA),
which is the state machine as defined by the DS402 standard. Bits 9, 6, 5, and 4 of the
ControlWord are operation mode specific. The halt function (bit 8) behavior is operation
mode specific. If the bit is 1, the commanded motion shall be interrupted (the motor will
start slowing down until it stops), after releasing the halt function, the commanded motion
shall be continued if possible, see Table 15-5.
15 11 10 9 8 7 6 4 3 2 1 0
R R OMS H FR OMS EO QS EV SO
MSB LSB
R Reserved, OMS Operation mode specific, H Halt, FR Fault reset,
EO Enable operation QS Quick stop, EV Enable voltage, and SO Switch on
252 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
15 10 9 8 7 6 5 4 3 0
see Table see Change Set New Set
Reserved Halt Abs/rel see Table 15-3
15-3 Table 15-3 Immediately Point
MSB LSB
In Profile Position Mode the operation specific bits are mapped in Table 15-7. With bits 4
and 5, user can define when the command for next Position (0x607A - POS) will be pro-
cessed. Bit 6 defines whether the command is absolute or relative to the current position.
Velocity Mode
TABLE 15-8. Control Word Mapping in Velocity Mode
15 9 8 7 6 5 4 3 0
see Table Reference see Table
see Table 15-3 Halt Unlock Ramp Enable Ramp
15-3 Ramp 15-3
MSB LSB
In Velocity Mode the operation specific bits are mapped on Table 15-9. With bits 4, 5 and
6, user can configure the available ramp related options as shown in Table 15-9.
Homing Mode
TABLE 15-9b. control word mapping in homing mode
15 10 9 8 7 6 5 4 3 0
see Table 15-8 Halt see Table 15-8 Reserved Reserved Start Homing see Table 15-8
MSB LSB
In Homing Mode, the operation specific bits are mapped in Table 15-9b. With bit 4 the the
homing mode will be started and with bit 8 it will be halted.
Other Modes
Those modes use some bits of the controlword. Table 15-10 shows the structure of the
controlword. Table 15-11 defines the values for bit 8 of the controlword.
254 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total number of motors
Argument 2: Value
Type: Unsigned 16-bit
Where:
cc = Motor channel
nn = Control word value
Description:
This command indicates the configured range of the tolerated position values symmet-
rically to the position demand value. If the position actual value is out of the following
error window, a following error occurs. If the value of the following error window is FFFF
FFFFh, the following control is disabled. Based on DS402 standard this command is only
applicable is position modes.
Arguments: 2
Where:
cc = Motor channel
nn = Following Error Window (counts)
Description:
This command shall indicate the configured time for a following error condition, after that
the bit 13 of the statusword shall be set to 1. When the following error occurs, the control-
ler goes to quick stop operation mode. The value is given in ms.
Arguments: 2
Where:
cc = Motor channel
Description:
This parameter selects the Homing Method that will be used. Supported methods are 17-
30 and 35. For more details go to DS402 standard.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
256 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Where:
cc = Motor Channel
nn =Homing Method
Example:
!HMD 1 18: Selects Homing Method 18 for Motor channel 1
Description:
This parameter sets the speed that will be used during the homing procedure. Each chan-
nel has 2 speed settings. The first is the speed during search for Home switch and the
second is the speed during search for Index pulse (currently not supported).
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors
Where:
cc=
1: Homing speed during search for Home switch for ch1
2: Homing speed during search for Index pulse (currently not supported) for ch1
3: Homing speed during search for Home switch for ch2
4: Homing speed during search for Index pulse (currently not supported) for ch2
nn =Homing Speed
Example:
!HSP 1 200: Selects Homing Speed (search for Home Switch) 200 (RPM) for Motor
channel 1.
!HSP 3 250: Selects Homing Speed (search for Home Switch) 250 (RPM) for Motor
channel 2.
Description:
This command indicates the configured interpolation cycle time. The interpolation time
period value is given in (interpolation time base)x10^(interpolation time index) s(seconds).
The interpolation time index is dimensionless. The default value of the interpolation time is
0.001 s (1 millisecond, meaning Interpolation Time Base = 1 and Interpolation Time Index
= -3).
Arguments: 2
Where:
ee =
1: nn = Interpolation time base channel 1
2: nn = Interpolation time index channel 1
3: nn = Interpolation time base channel 2
4: nn = Interpolation time index channel 2
Description:
This command indicate the configured maximal allowed speed for the motor in either di-
rection. The value is given in rotations per minute (r/min).
258 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Arguments: 2
Where:
cc = Motor channel
nn = Speed command in RPM
Description:
This command is used to set the configured acceleration in 10×RPM/second.
Arguments: 2
Where:
cc = Motor channel
nn = Profile acceleration in 10×RPM/second
Description:
This command is used to set the configured deceleration in 10×RPM/second.
Arguments: 2
Where:
cc = Motor channel
Description:
This command indicates the configurated maximal and minimal software position limits.
These parameters define the absolute position limits for the position demand value and
the position actual value. Every new target has been checked against these limits. To dis-
able the software position limits, the min position limit (1st element) and the max position
limit (2nd element) shall be set to 0. The positions limits is given in same position units as
the target position.
Arguments: 2
Where:
ee =
260 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Description:
This runtime command is used to set an offset in the position command. In relative posi-
tion modes the allowed offset values are between -1000 and 1000.
Number of Arguments: 2
Where:
cc = Channel
nn = Position counts
Example:
!POF 1 230000: Set motor channel 1 position offset to 230000.
Description:
This command is used to set the commanded position that the drive should move to in
position profile mode using the current settings of motion control parameters such as ve-
locity, acceleration, deceleration, motion profile type etc. The value is interpreted as abso-
lute or relative depending on the abs/rel flag in the Control Word. Take into consideration
that this command is active only when DS402 mode is enabled.
Arguments: 2
Where:
cc = Motor channel
nn = Target position
Description:
This command is used to set the velocity in RPM, normally attained at the end of the ac-
celeration ramp during a profiled motion and is valid for both directions of motion.
Arguments: 2
Where:
cc = Motor channel
nn = Profile velocity
Description:
This command configures the modes of operation.
Arguments: 2
Where
cc = Motor channel
nn = Modes of operation (see the table below)
262 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Description:
Initiating this command resets the controller, mirroring the effects of a power cycle:
firmware reinitializes, runtime variables clear, and temporary settings are lost. Exercise
caution due to these substantial impacts. The command is similar to the %RESET mainte-
nance command.
Syntax Scripting:
setcommand(_RST, 1)
Number of Arguments: 0
Description:
Sets the required velocity of the system in RPM. Positive values shall indicate forward
direction and negative values shall indicate reverse direction. It is applicable to velocity
mode.
Arguments: 2
Where:
cc = Motor channel
nn = Target velocity in RPM
Description:
This command configures the velocity acceleration.
Arguments: 2
Where:
ee =
264 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Description:
This command configures the velocity deceleration.
Arguments: 2
Where:
ee =
1: Delta speed in 10×RPM for channel 1
2: Delta time in seconds for channel 1
3: Delta speed in 10×RPM for channel 2
4: Delta time in seconds for channel 2
…
2 × (m - 1) + 1: Delta speed in 10×RPM for channel m.
2 × (m - 1) + 1: Delta time in seconds for channel m.
nn = Delta speed/time
Description:
Sets the required velocity of the system in RPM. Positive values shall indicate forward di-
rection and negative values shall indicate reverse direction. This command is applicable to
profile velocity and cyclic synchronous velocity modes.
Arguments: 2
Where:
cc = Motor channel
nn = Speed command in RPM
Description:
This command configures the minimum and maximum amount of velocity in RPM. The
vl velocity max amount is mapped internally to the vl velocity max positive and vl velocity
max negative values. The vl velocity min amount is be mapped internally to the vl velocity
min positive and vl velocity min negative values as shown in Figure 15-1. It is applicable to
Velocity mode.
Arguments: 2
Where:
ee =
266 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands
Description:
This command configures the target torque command, applicable when the controller
operates in torque mode. Its value is expressed in thousandths of rated torque, which
means that a torque command of 1000 will drive the motor up to the rated torque. Be-
ware that in order to have correct results, the configuration commands nominal current
(NOMA) and torque constant (TNM) must be set appropriately.
Arguments: 2
Where:
cc = Motor channel
nn = Torque input value in thousandths of rated torque
Description:
This runtime command is used to set an offset in the commanded torque. Commanded
torque could be either directly from user (in torque mode), or produced from speed or
position control loops. The value is in miliNm (Nm * 1000). Beware in order to have correct
values make sure to have configured appropriately configuration command TNM (torque
constant).
Number of Arguments: 2
Where:
cc = Channel
nn = Torque offset in Nm * 1000.
Example:
Description:
This command is used to set the rate of change of command. Beware in order to have
correct values make sure to have configured appropriately configuration command TNM.
Arguments: 2
Where:
cc = Motor channel
nn = Torque slope in (miliNm*10)/ sec.
Description:
This runtime command is used to set an offset in the velocity command. Velocity
command could be either directly set from user, in speed mode operation, or produced
from position control loop.
.
Syntax Serial: !VOF cc nn
Number of Arguments: 2
Argument 1: Motor Type: Unsigned 8-bits
Min: 1 Max: Total Number of Motors
268 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Example:
!VOF 1 250: Set motor channel 1 velocity offset to 250 RPM.
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 nu-
merical parameter is sent, the controller will respond with the value of the channel select-
ed 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 295.
Routine queries can be sent from within a MicroBasic Script using the getvalue() function.
270 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
Measures and reports the motor Amps, in Amps*10, for all operating channels. For brush-
less controllers this query reports the RMS value. Note that the current flowing through
the motors is often higher than this flowing through the battery.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
A = aa Type: Signed 16-bit Min: 0
Where:
cc = Motor channel
aa = Amps *10 for each channel
Example:
Q: ?A
R: A=100:200
Q: ?A 2
R: A=200
Note:
Single channel controllers will report a single value. Some power board units measure the Mo-
tor Amps and calculate the Battery Amps, while other models measure the Battery Amps and
calculate the Motor Amps. The measured Amps is always more precise than the calculated
Amps. See controller datasheet to find which Amps is measured by your particular model.
Description:
Reports the estimated 3-phase AC-side output power of the controller in x10W, calculated
from the applied motor voltages and measured motor currents. This parameter is applica-
ble only to AC induction motor controllers.
Reply:
ACP = nn Type: Signed 32-bit Min: -65535 Max: 65535
272 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
where:
cc =Motor channel
nn = Estimated motor power in Watts x10 units.
Example: ?ACP 1 585: The estimated controller AC-side output power is 58.5 Watts.
Description:
Reports the raw value in mV of each of the analog inputs that are enabled. Input that is
disabled will report 0. The total number of Analog input channels varies from one control-
ler model to another and can be found in the product datasheet.
Argument: InputNbr
Min: 1 Max: Max Number of Analog Inputs
Reply:
AI=nn Type: Signed 16-bit Min: 0 Max: 5300
Where:
cc = Analog Input number
nn = Millivolt for each channel
Description:
Returns value of an Analog input after all the adjustments are performed to convert it to a
command or feedback value (Min/Max/Center/Deadband/Linearity). If an input is disabled,
the query returns 0. The total number of Analog input channels varies from one controller
model to another and can be found in the product datasheet.
Argument: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Reply:
AIC=nn Type: Signed 16-bit Min: -1000 Max: 1000
Where:
cc = Analog Input number
nn = Converted analog input value +/-1000 range
Description:
On brushless controller operating in sinusoidal mode, this query returns the real time val-
ue of the rotor’s electrical angle of brushless motor. This query is useful for verifying trou-
bleshooting sin/cos and SPI/SSI sensors. Angle are reported in 0-511 degrees.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
ANG=nn Type: Unsigned 16-bit Min: 0 Max: 511
Where:
cc = Motor channel
nn = Rotor electrical angle
Description:
Returns real time raw values of ADC connected to sin/cos sensors of each motor or the
real time values of the raw data reported by the SSI sensor of the motor. This query is
useful for verifying troubleshooting sin/cos sensors and SSI sensors.
Argument: Channel
Min: 1 Max: 2 * Number of Motors
Reply:
ASI=nn Type: Unsigned 16-bit Min: 0 Max: 65535
Where:
cc =
1 : Sin input 1/SSI input 1
2 : Cos input 1
3 : Sin input 2/SSI input 2
4 : Cos input 2
nn = ADC value
274 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
Read the value of boolean internal variables that can be read and written to/from within
a user MicroBasic script. It is used to pass boolean states between user scripts and a
microcomputer connected to the controller. The total number of user boolean variables
varies from one controller model to another and can be found in the product datasheet.
Argument: VarNbr
Min: 1 Max: Total Number of Bool Variables
Reply:
B=bb Type: Boolean Min: 0 Max: 1
Where:
nn = Boolean variable number
bb = 0 or 1 state of the variable
Description:
Measures and reports the Amps flowing from the battery in Amps * 10. Battery Amps are
often lower than motor Amps.
Argument: Channel:
Min: 1 Max: Total Number of Motors
Syntax Scripting: result = getvalue(_BA, cc)
result = getvalue(_BATAMPS, cc)
Reply:
BA=aa Type: Signed 16-bit Min: 0
Where:
cc = Motor channel
aa = Amps *10 for each channel
Example:
Q: ?BA
R: BA=100:200
Note:
Some controller models measure the Motor Amps and Calculate the Battery Amps, while
other models measure the Battery Amps and calculate the Motor Amps. The measured
Amps is always more precise than the calculated Amps. See controller datasheet to find
which Amps is measured by your particular model.
Description:
Returns the amount of Internal sensor (Hall, SinCos, Resolver) counts that have been
measured from the last time this query was made. Relative counter read is sometimes
easier to work with, compared to full counter reading, as smaller numbers are usually
returned. If the query is used via RoboCAN, the query will be refreshed by default every
20ms, reseting the counter. Therefore a second argument has been introduced dictating
the refresh rate.
Arguments: 2 or 1
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc=Motor channel
nn=value
Example:
?BCR 1: Ask for BCR for channel 1
@01?BCR 1 0: Ask from node 1 for BCR for channel 1 only once, the rate value is zero.
@02?BCR 1 100: Ask from node 2 for BCR for channel 1 with rate of 100ms.
Description:
When one or more BMS10X0 are connected to the controller, this query reports the Bat-
tery’s State Of Charge in AmpHours, which is connected to the respective BMS10X0. If
only one BMS10X0 is connected to any pulse input this query will report the data of that
device, regardless which pulse input it is connected to. If more than one BMS10X0 is con-
nected to pulse inputs and these inputs are enabled and configured in BMS MultiPWM
mode, then the argument following the query is used to select the sensor.
276 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Reply:
BMC=nn Type: Unsigned 8-bit Min: 0 Max: 255
Where:
cc = (When only one sensor enabled)
None or 1 : Current BMS10X0
cc = (When several sensors enabled)
1 : BMS10X0 at pulse input 1
2 : BMS10X0 at pulse input 2
...
Description:
When one or more BMS10X0 are connected to the controller, this query reports the
status flags of the respective BMS10X0. If only one BMS10X0 is connected to any pulse
input this query will report the data of that device, regardless which pulse input it is con-
nected to. If more than one BMS10X0 is connected to pulse inputs and these inputs are
enabled and configured in BMS MultiPWM mode, then the argument following the query
is used to select the sensor.
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Reply:
BMF = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 8-bit Min: 0 Max: 255
Where:
cc = (When only one sensor enabled)
None or 1 : Current BMS10X0
cc = (When several sensors enabled)
and
f1 = Unsafe Temperature
f2 = Over or Under Voltage Error Set
f3 = Amp Trigger Set
f4 = Over Current Error Set
f5 = Short Load or Inv Charger
f6 = Bad State Of Health
f7 = Config Error
f8 = Internal Fault
Description:
When one or more BMS10X0 are connected to the controller, this query reports the
switch states of the respective BMS10X0. If only one BMS10X0 is connected to any pulse
input this query will report the data of that device, regardless which pulse input it is con-
nected to. If more than one BMS10X0 is connected to pulse inputs and these inputs are
enabled and configured in BMS MultiPWM mode, then the argument following the query
is used to select the sensor.
Argument: SensorNumber
Reply:
BMC = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 8-bit Min: 0 Max: 255
Where:
278 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
Returns the Brake Override status.
Argument: Channel
Reply:
BRK=nn Type: Unsigned 8-bit Min: 0 Max:2
Where:
nn =
0: Auto. Brake is controlled by Motor is On action.
1: Brake Release. Brake is released ignoring the Motor is On action.
2: Brake Engage. Brake is engaged ignoring the Motor is On action.
Example:
?BRK 1: Status of PWM Brake Override for channel 1
Description:
On brushless motor controllers, reports the actual speed measured using the motor’s
Internal sensors (Hall, SinCos, Resolver) as the actual RPM value. In ACIM, the query
reports the speed of the stator’s electrical speed in RPM. To report RPM accurately, the
correct number of motor poles must be loaded in the BPOL configuration parameter.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
BS=nn Type: Signed 32-bit Min: -65535 Max: 65535
Where:
cc = Motor channel
nn = Speed in RPM
Description:
When one or more BMS10X0 are connected to the controller, this query reports the Bat-
tery’s State Of Charge in percentage, which is connected to the respective BMS10X0. If
only one BMS10X0 is connected to any pulse input this query will report the data of that
device, regardless which pulse input it is connected to. If more than one BMS10X0 is con-
nected to pulse inputs and these inputs are enabled and configured in BMS MultiPWM
mode, then the argument following the query is used to select the sensor.
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Reply:
BSC=nn Type: Unsigned 8-bit Min: 0 Max: 255
Where:
cc = (When only one sensor enabled)
None or 1 : Current BMS10X0
280 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
On brushless motor controllers, returns the measured motor speed, using the motor’s
Internal sensors (Hall, Sin/Cos, Resolver), as a ratio of the Max RPM configuration param-
eter. The result is a value of between 0 and +/-1000. Note that if the motor spins faster
than the Max RPM, the return value will exceed 1000. However, a larger value is ignored
by the controller for its internal operation. To report an accurate result, the correct number
of motor poles must be loaded in the BPOL configuration parameter.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
BSR=nn Type: Signed 16-bit Min: -1000 Max: 1000
Where:
nn = Speed relative to max
Example:
Q: ?BSR
R: BSR=500: speed is 50%of the RPM value stored in the Max RPM configuration
Description:
Returns the encoder value as an absolute number. The counter is 32-bit with a range of
+/- 2147483648 counts.
Argument: Channel
Min: 1 Max: Total Number of Encoders
Reply:
C=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Encoder channel number
nn = Absolute counter value
Description:
This query is used in CAN-enabled controllers to read the content of a received CAN
frame in the RawCAN mode. Data will be available for reading with this query only after
a ?CF query is first used to check how many received frames are pending in the FIFO
buffer. When the query is sent without arguments, the controller replies by outputting all
elements of the frame separated by colons.
Argument: Element
Min: 1 Max: 10
Reply:
CAN = dd1:dd2:dd3: ... :dd10 Type: Unsigned 16-bit Min: 0 Max: 255
Where:
ee = Byte in frame
dd1 = Header
dd2= Bytecount
dd3 to dd10 = Data0 to data7
Example:
Q: ?CAN
R: CAN=5:4:11:12:13:14:0:0:0:0
Q: ?CAN 3
R: CAN=11
282 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
On brushless motor controllers, returns the running total of Internal sensor (Hall, SinCos,
Resolver) transition value as an absolute number. The counter is 32-bit with a range of +/-
2147483648 counts.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
CB=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Motor channel
nn = Absolute counter value
Description:
This query is used to read the number of received Raw Redirect frames pending in the
FIFO buffer and copies the oldest frame into the read buffer, from which it can then be
accessed using the ?DDT or ?SDT queries. Sending ?CD again, copies the next frame into
the read buffer.
Argument: None
Reply:
CD=nn Type: Unsigned 8-bit Min: 0 Max: 255
Where:
nn = Number of frames in receive queue
Description:
Returns the CAN error counters. It contains Transmit error counter, Receive Error counter,
Last error code and Bus-off counter (number of buss-offs since boot)
• TEC: Increases by 1 or 8 according to the error and frame until it reaches 256. Then
the counter is reset, and the controller enters bus-off state.
• REC: Increases by 1 or 8 according to the error and frame until it reaches 127. Then
the counter is reset, and the controller enters bus-off state.
• LEC: 000: No Error
001: Stuff Error
010: Form Error
011: Acknowledgment Error
100: Bit recessive Error
101: Bit dominant Error
110: CRC Error
111: Set by software
• BUS-OFF: Every time there is a bus-off this counter increases by one. This value is
reset on boot.
cc=
1: TEC
2: REC
3:LEC
4: Bus-off Counter
Reply:
CEC=nn
Type: Unsigned 16-bit
Min: 0 Max:2
Where:
nn =
284 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Example:
Description:
This query is used to read the number of received CAN frames pending in the FIFO buf-
fer and copies the oldest frame into the read buffer, from which it can then be accessed
using the ?CAN query. Sending ?CF again, copies the next frame into the read buffer. The
controller can buffer up to 16 CAN frames.
Argument: None
Reply:
CF=nn Type: Unsigned 8-bit Min: 0 Max: 16
Where:
nn = Number of frames in receive queue
Description:
Returns the the status of the respective consumer heartbeat channel. With CANOpen
enabled, there are 4 slots in order to monitor heartbeats. Their status can be checked with
this query.
Min: 1 Max: 4
Reply:
Where:
cc = Heartbeat channel
nn = Heartbeat Status:
0: Not configured
Description:
Returns the motor command value that is computed from the Analog inputs whether or
not the command is actually applied to the motor. The Analog inputs must be con-
figured as Motor Command. This query can be used, for example, to read the com-
mand joystick from within a MicroBasic script or from an external microcomputer,
even though the controller may be currently responding to Serial or Pulse command
because of a higher priority setting. The returned value is the raw Analog input value with
all the adjustments performed to convert it to a command (Min/Max/Center/Deadband/
Linearity).
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
CIA=nn Type: Signed 32-bit Min: -1000 Max: 1000
Where:
cc = Motor channel
nn = Command value in +/-1000 range
Description:
Reads the Current Integral Gains. The value is read as the gain multiplied by 10^4. This val-
ue is used for both flux and torque Integral gains.
286 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Number of Arguments: 1
Reply:
CIG = aa Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000
Where:
cc (single channel) =
1: Flux Integral Gain
2: Torque Integral Gain
cc (dual channel) =
Description:
Returns the motor command value that is computed from the Pulse inputs whether or
not the command is actually applied to the motor. The Pulse input must be configured
as Motor Command. This query can be used, for example, to read the command
joystick from within a MicroBasic script or from an external microcomputer, even
though the controller may be currently responding to Serial or Analog command because
of a higher priority setting. The returned value is the raw Pulse input value with all the ad-
justments performed to convert it to a command (Min/Max/Center/Deadband/Linearity).
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
CIP=nn Type: Signed 32-bit Min: -1000 Max: 1000
Where:
cc = Motor channel
nn = Command value in +/-1000 range
Description:
Returns the motor command value that is issued from the serial input or from a MicroBa-
sic script whether or not the command is actually applied to the motor. This query
can be used, for example, to read from an external microcomputer the command
generated inside MicroBasic script, even though the controller may be currently respond-
ing to a Pulse or Analog command because of a higher priority setting.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
CIS=nn Type: Signed 32-bit Min: -1000 Max: 1000
Where:
cc = channel
nn = command value in +/-1000 range
Description:
With CL it is possible to see which nodes in a RoboCAN are alive and what type of device
is present at each node. A complete state of the network is represented in sixteen 32-
bit numbers. Within each 32-bit word are 8 groups of 4-bits. The 4-bits contain the node
information. E.g. bits 0-3 of first number is for node 0, bits 8-11 of first number is for node
2, bits 4-7 of second number is for node 5 and bits 12-15 of fourth number is for node 11,
etc.
Argument: Group
Min: 1 Max: 16
Reply:
CL=mm Type: Unsigned 32-bit Min: 0 Max: 4194M
288 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Where:
nn =
1 : nodes 0-3
2 : nodes 4-7
...
...
15 : nodes 120-123
16 : nodes 124-127
mm = 4 words of 4 bits. Each 4-bit word:
0b0000 : Inactive node
0b0001 : Active motor controller
0b0011 : Active magsensor
0b0101 : Active RIOX
0b0111 : Active BMS
0b1001 : Active OTS
0b1011 : Active FLW
Description:
Reads the Current Proportional Gains. The value is read as the gain multiplied by 10^4.
This value is used for both flux and torque proportional gains.
Number of Arguments: 1
Reply:
CPG = aa Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000
Where:
cc (single channel) =
1: Flux Proportional Gain
2: Torque Proportional Gain
cc (dual channel) =
1: Flux Proportional Gain for motor 1
2: Flux Proportional Gain for motor 2
3: Torque Proportional Gain for motor 1
4: Torque Proportional Gain for motor 2
Description:
Returns the amount of counts that have been measured from the last time this query was
made. Relative counter read is sometimes easier to work with, compared to full counter
reading, as smaller numbers are usually returned.
Argument: Channel
Min: 1 Max: Total Number of Encoders
Reply:
CR=nn Type: Signed 32-bit Min: -2147M Max: 2147
Where:
cc = Motor channel
nn = Counts since last read using ?CR
Description:
Returns the amount of counts that have been measured from the last time this query was
made. Relative counter read is sometimes easier to work with, compared to full counter
reading, as smaller numbers are usually returned.
Argument: Channel
Min: 1 Max: Total Number of SSI Encoders
290 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Reply:
CSR=nn Type: Signed 32-bit Min: -2147M Max: 2147
Where:
cc = SSI sensor channel
nn = Counts since last read using ?CSR
Description:
Returns the SSI encoder value as an absolute number. The counter is 32-bit with a range
of +/- 2147483648 counts.
Argument: Channel
Min: 1 Max: Total Number of SSI Encoders
Reply:
CSS=nn Type: Signed 32-bit Min: -2147M Max: 2147
Where:
Description:
Reports the status of each of the available digital inputs. The query response is a single
digital number which must be converted to binary and gives the status of each of the in-
puts. The total number of Digital input channels varies from one controller model to anoth-
er and can be found in the product datasheet.
Syntax Serial: ?D
Argument: None
Reply:
D=nn Type: Unsigned 32-bit
Where:
nn = b1 + b2*2 + b3*4 + ... +bn*2^n-1
Example:
Q: ?D
R: D=17 : Inputs 1 and 5 active, all others inactive
Description:
This query is used in Raw Redirect mode to read the content of a received Raw Redirect
frame. Data will be available for reading with this query only after a ?CD query is first
used to check how many received frames are pending in the FIFO buffer. When the query
is sent without arguments, the controller replies by outputting all elements of the frame
separated by colons.
Argument: Element
Min: 1 Max: 64
Reply:
DDT = dd1:dd2:dd3: ... :dd64 Type: Unsigned 8-bit Min: 0 Max: 255
Where:
ee = Byte in frame
dd1 = byte size
dd2 to dd64 = data0 to data62
Examples: Q: ?DDT
R: DDT=8:82:111:98:111:116:101:113
Q: ?DDT 3
R: DDT=111
Description:
Reads the PID’s Derivative Gains. The value is read as the gain multiplied by 10^6. This
value is used for both speed and position Derivative gains.
292 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Number of Arguments: 1
Reply:
DG = aa Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000
Where:
cc (single channel) =
1: Speed Derivative Gain
2: Position Derivative Gain
cc (dual channel) =
1: Speed Derivative Gain for motor 1
2: Speed Derivative Gain for motor 2
3: Position Derivative Gain for motor 1
4: Position Derivative Gain for motor 2
Description:
Reports the status of an individual Digital Input. The query response is a boolean value (0
or 1). The total number of Digital input channels varies from one controller model to anoth-
er and can be found in the product datasheet.
Argument: InputNbr
Min: 1 Max: Total Number of Digital Inputs
Syntax Scripting: result = getvalue(_DI, cc)
result = getvalue(_DIN, cc)
Reply:
DI=nn Type: Boolean Min: 0 Max: 1
Where:
cc = Digital Input number
nn = 0 or 1 state for each input
Example:
Q: ?DI
R: DI=1:0:1:0:1:0
Q: ?DI 1
R: DI=0
Description:
Reads the actual state of all digital outputs. The response to that query is a single number
which must be converted into binary in order to read the status of the individual output
bits. When querying an individual output, the reply is 0 or 1 depending on its status. The
total number of Digital output channels varies from one controller model to another and
can be found in the product datasheet.
Argument: None
Reply:
DO=nn Type: Unsigned 16-bit Min: 0 Max: 65536
Where:
nn = d1 + d2*2 + d3*4 + ... + dn * 2^n-1
Example:
Q: ?DO
R: DO=17 : Outputs 1 and 5 active, all others inactive
Description:
Applicable only for brushless controllers. Measures and reports the Peak Amps , in
Amps*10, for all operating channels.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
294 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Where:
cc = Motor channel
aa = Amps *10 for each channel
Example:
Q: ?DPA
R: DPA=100:200
Q: ?DPA 2
R: DPA=200
Description:
This query is used when chaining commands in Position Count mode, to detect that a
destination has been reached and that the next destination values that were loaded in the
buffer have become active. The Destination Reached bit is latched and is cleared once it
has been read.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
DR=nn Type: Unsigned 8-bit Min: 0 Max: 1
Where:
cc = Motor channel
nn =
0 : Not yet reached
1 : Reached
Description:
In closed-loop modes, returns the difference between the desired speed or position and
the measured feedback. This query can be used to detect when the motor has reached
the desired speed or position. In open loop mode, this query returns 0.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
E=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Motor channel
nn = Error value
F - Read Feedback
Alias: FEEDBK HexCode: 13 CANOpen id: 0x2110
Description:
Reports the value of the feedback sensors that are associated to each of the channels in
closed-loop modes. The feedback source can be Encoder, Analog or Pulse. Selecting the
feedback source is done using the encoder, pulse or analog configuration parameters. This
query is useful for verifying that the correct feedback source is used by the channel in the
closed-loop mode and that its value is in range with expectations.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
F=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Motor channel
nn = Feedback values
Description:
Read in real time the angle correction that is currently applied by the Field Oriented algo-
rithm in order achieve optimal performance.
Argument: Channel
Min: 1 Max: Total Number of Motors
296 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Reply:
FC = nn Type: Signed 16-bit Min: -512 Max: 512
Where:
cc = Motor channel
nn = Angle correction
Description:
When one or more FLW100 are connected to the controller, this query reports the count
measurements of X and Y axis in mm*10 of the respective FLW100. If only one FLW100
is connected to any pulse input this query will report the data of that device, regardless
which pulse input it is connected to. If more than one FLW100 is connected to pulse in-
puts and these inputs are enabled and configured in FlowSensor MultiPWM mode, then
the argument following the query is used to select the sensor.
Argument: SensorNumber
Min: 1 Max: 2*Total Number of Pulse Inputs
Reply:
Where:
cc = (When only one sensor enabled)
1 : X Counter
2: Y Counter
cc = (When several sensors enabled)
1 : X Counter of sensor at pulse input 1
2 : Y Counter of sensor at pulse input 1
3 : X Counter of sensor at pulse input 2
4 : Y Counter of sensor at pulse input 2
...
((p-1)*2)+1 : X Counter of sensor at pulse input p
((p-1)*2)+2 : Y Counter of sensor at pulse input p
nn = Distance in mm*10.
Description:
Reports the status of the controller fault conditions that can occur during operation. The
response to that query is a single number which must be converted into binary in order to
evaluate each of the individual status bits that compose it.
Argument: None
Reply:
FS = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 16-bit Min: 0 Max: 65535
Where:
298 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Example:
Q: ?FF
R: FF=2 : Overvoltage fault
Description:
This query will report a string with the date and identification of the firmware revision of
the controller.
Argument: None
Reply:
FID=ss Type: String
Where:
ss = Firmware ID string
Example:
Q: ?FID
R: FID=Roboteq v1.6 RCB500 05/01/2016
Description:
This query will report the version and the date of the firmware revision of the controller. If
only element 1 is queried then the version format will be 4 characters in which:
• 1st character will be the major version
• 2nd character will be the minor version
• 3rd character will be the version variation (a, b, etc.)
• 4th character will be the firmware status which is used for technical support
reasons.
Argument: Element
Min: None Max: 4
Reply:
FID = nn Type: Unsigned 16-bit Min: 0
Where:
Description:
Report the runtime status of each motor. The response to that query is a single number
which must be converted into binary in order to evaluate each of the individual status bits
that compose it.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
FM = f1 + f2*2 + f3*4 + ... + fn*2n-1
Where:
cc = Motor channel
300 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Example:
Q: ?FM 1
R: FM=6 : Motor 1 is stalled and loop error detected
Note:
f2, f3 and f4 are cleared when the next idle motor command is given (0 in case of speed
modes, equal to feedback in case of position modes). When f5 or f6 are on, the motor can
only be commanded to go in the reverse direction.
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.
Argument: None
Reply:
FS = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 16-bit Min: 0 Max: 65535
Where:
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. For 60 degrees spaced Hall sensors, 0-1- 3-4- 6-7 are valid combinations, while
2 and 5 are invalid combinations. For 120 degrees spaced sensors, 1-2- 3-4- 5-6 are valid
combinations, while 0 and 7 are invalid combinations. In normal conditions, valid values
should appear at one time or the other as the motor shaft is rotated.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
HS= ha + 2*hb + 4*hc Type: Unsigned 8-bit Min: 0 Max: 7
Where:
cc = channel
ha = hall sensor A
hb = hall sensor B
hc = hall sensor C
Example:
Q: ?HS 1
R: HS=5 : sensors A and C are high, sensor B is low
302 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Note:
Function not available on HBLxxxxx products
Description:
This query is used to determine if specific RoboCAN node is alive on CAN bus.
Argument: NodeId
Min: 1 Max: 127
Reply:
ICL=nn Type: Unsigned 8-bit Min: 0 Max: 1
Where:
cc = Node Id
nn =
0 : Not present
1 : Alive
Description:
Reports the d-axis flux current command in A x10 units applied to d-axis current controller.
This parameter is applicable to BL and ACIM controllers where the d-axis current needs to
be controlled.
Reply:
IDC = nn Type: Signed 32-bit Min: -32768 Max: 32768
where:
cc =Motor channel
nn = D-axis current command in Amps x10 units.
Example: ?IDC 1 73 : The d-axis current command of the controller is 7.3 Amperes.
Description:
Reads the PID’s Integral Gains. The value is read as the gain multiplied by 10^6. This value
is used for both speed and position integral gains.
Number of Arguments: 1
Reply:
IG = aa Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000
Where:
cc (single channel) =
1: Speed Integral Gain
2: Position Integral Gain
cc (dual channel) =
1: Speed Integral Gain for motor 1
2: Speed Integral Gain for motor 2
3: Position Integral Gain for motor 1
4: Position Integral Gain for motor 2
Description:
Reports the q-axis flux current command in A x10 units applied to q-axis current controller.
This parameter is applicable to all motor types, where in IM and BL motors the IQC is re-
lated to the q-axis current command and in DC motors the IQC is related to the armature
current command.
Reply:
IQC = nn Type: Signed 32-bit Min: -32768 Max: 32768
304 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
where:
cc =Motor channel
nn = Q-axis current command in x10 Amps unit.
Example: ?IQC 1 112 : The q-axis current command of the controller is 11.2 Amperes.
Description:
Returns the status of the lock flag. If the configuration is locked, then it will not be possi-
ble to read any configuration parameters until the lock is removed or until the parameters
are reset to factory default. This feature is useful to protect the controller configuration
from being copied by unauthorized people.
Argument: None
Reply:
LK=ff Type: Unsigned 8-bit Min: 0 Max: 1
Where:
ff =
0 : unlocked
1 : locked
Description:
Reports the command value that is being used by the controller. The number that is
reported will be depending on which mode is selected at the time. The choice of one
command mode vs. another is based on the command priority mechanism. In the Serial
mode, the reported value will be the command that is entered in via the RS232, RS485,
TCP or USB port and to which an optional exponential correction is applied. In the Analog
and Pulse modes, this query will report the Analog or Pulse input after it is being convert-
ed using the min, max, center, deadband, and linearity corrections. This query is useful
for viewing which command is actually being used and the effect of the correction that is
being applied to the raw input.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
M=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Motor channel
nn = Command value used for each motor. 0 to +/-1000 range
Example:
Q: ?M
R: M=800:-1000
Q: ?M 1 R:
M=800
Description:
In brushless motor controllers operating in sinusoidal mode, this query returns the
Torque (also known as Quadrature or Iq) current, and the Flux (also known as Direct, or
Id) current. In DC Brushed drives, the MA parameter reports the raw, unfiltered motor
current value, without the moving average filter applied, which is instead applied in the A
parameter. Current is reported in Amps x 10.
Reply:
MA=mm Type: Signed 16-bit
Where:
BLDC models
nn =
1 : Flux Amps 1 (Id)
2 : Torque Amps 1 (Iq)
3 : Flux Amps 2 (Id)
4 : Torque Amps 2 (Iq)
mm = Amps * 10
DC models
nn =
1 : Raw Motor Amps 1
2 : Raw Motor Amps 2
mm = Amps * 10
306 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports whether there is marker pattern detected. If no pattern is detected, the
output will be 0. If only one sensor is connected to any pulse input, no argument is need-
ed for this query. If more than one sensor is connected to pulse inputs and these inputs
are enabled and configured in Magsensor MultiPWM mode, then the argument following
the query is used to select the sensor.
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Reply:
MCB = nn Type: Unsigned 8-bit Min: 0 Max: 255
Where:
L
L: 0
0
R: 0
R
L
L: 1
1
R: 0
R
L
L: 111
2
R: 010
R
L
L: 01110
3
R: 11011
R
L
L: 11111
4
R: 01010
R
L
L: 0111110
5
R: 1101011
R
L
L: 1111111
6
R: 0101010
R
L
L: 011101110
7
R: 110111011
R
L
L: 011
8
R: 110
R
308 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
L
L: 0
9
R: 1
R
L
L: 010
10
R: 111
R
L
L: 11011
11
R: 01110
R
L
L: 01010
12
R: 11111
R
L
L: 1101011
13
R: 0111110
R
L
L: 0101010
14
R: 1111111
R
L
L: 110111011
15
R: 011101110
R
Description:
Reports an indicative value of the Microprocessor usage of the product. The value is in
percentage out of 100. This value will help user evaluate the effect of the use of scripting
and communication traffic.
Reply:
MCU = nn Type: Unsigned 8-bit Min: 0 Max: 100
Where:
nn =Percentage of the microprocessor usage.
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports whether a magnetic tape is within the detection range of the sensor. If
no tape is detected, the output will be 0. If only one sensor is connected to any pulse in-
put, no argument is needed for this query. If more than one sensor is connected to pulse
inputs and these inputs are enabled and configured in Magsensor MultiPWM mode, then
the argument following the query is used to select the sensor.
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Reply:
MGD=nn Type: Unsigned 8-bit Min: 0 Max: 1
Where:
cc = (When only one sensor enabled)
None or 1 : Current sensor
cc = (When several sensors enabled)
1 : Sensor at pulse input 1
2 : Sensor at pulse input 2
...
p : Sensor at pulse input p
nn =
0 : No track detected
1 : Track detected
310 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports whether left or right markers are present under sensor.If only one sen-
sor is connected to any pulse input this query will report the data of that sensor, regard-
less which pulse input it is connected to. If more than one sensor is connected to pulse
inputs and these inputs are enabled and configured in Magsensor MultiPWM mode, then
the argument following the query is used to select the sensor.
Argument: SensorNumber
Min: 1 Max: 2 * Total Number of Pulse Inputs
Reply:
MGM=mm Type: Unsigned 8-bit Min: 0 Max: 1
Where:
cc = (When only one sensor enabled)
1 : Left Marker
2 : Right Marker
cc = (When several sensors enabled)
1 : Left Marker of sensor at pulse input 1
2 : Right Marker of sensor at pulse input 1
3 : Left Marker of sensor at pulse input 2
4 : Right Marker of sensor at pulse input 2
...
((p-1)* 2)+1 : Left Marker of sensor at pulse input p
((p-1)* 2)+2 : Right Marker of sensor at pulse input p
nn =
0 : No marker detected
1 : Marker detected
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports the state of the sensor. If only one sensor is connected to any pulse in-
put, no argument is needed for this query. If more than one sensor is connected to pulse
inputs and these inputs are enabled and configured in Magsensor MultiPWM mode, then
the argument following the query is used to select the sensor.
Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Syntax Scripting: result = getvalue(_MGS, )
result = getvalue(_MGSTATUS, )
Reply:
MGS=f1 + f2*2 + f3*4 + ... + fn*2n-1 Type: Unsigned 16-bit
Where:
cc = (When only one sensor enabled)
None or 1 : Current sensor
cc = (When only several sensors enabled)
1 : Sensor at pulse input 1
2 : Sensor at pulse input 2
...
p : Sensor at pulse input p
f1 : Tape cross
f2 : Tape detect
f3 : Left marker present
f4 : Right marker present
f9 : Sensor active
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports the position of the tracks detected under the sensor. If only one sensor
is connected to any pulse input, the argument following the query selects which track to
read. If more than one sensor is connected to pulse inputs and these inputs are enabled
and configured in Magsensor MultiPWM mode, then the argument following the query is
used to select the sensor. The reported position of the magnetic track in millimeters, using
the center of the sensor as the 0 reference.
Argument: Channel
Min: 1 Max: 3 * Total Number of Pulse Inputs
Reply:
MGM = nn Type: Signed 16-bit
Where:
cc = (When only one sensor enabled)
1 : Left Track
2 : Right Track
3 : Active Track
cc = (When several sensors enabled)
1 : Left Track of sensor at pulse input 1
2 : Right Track of sensor at pulse input 1
3 : Active Track of sensor at pulse input 1
4 : Left Track of sensor at pulse input 2
5 : Right Track of sensor at pulse input 2
6 : Active Track of sensor at pulse input 2
312 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
...
((p-1)* 3)+1 : Left Track of sensor at pulse input p
((p-1)* 3)+2 : Right Track of sensor at pulse input p
((p-1)* 3)+3 : Active Track of sensor at pulse input p
nn = position in millimeters
Description:
Reports the actual PWM level that is being applied to the motor at the power output
stage. This value takes into account all the internal corrections and any limiting resulting
from temperature or over current. A value of 1000 equals 100% PWM. The equivalent mo-
tor phase to phase voltage amplitude is the battery voltage * PWM level.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
P=nn Type: Signed 16-bit Min: -1000 Max: 1000
Where:
cc = Motor channel
nn = 0 to +/-1000 power level
Example:
Q: ?P 1
R: P=800
Description:
Reads the PID’s Proportional Gains. The value is read as the gain multiplied by 10^6. This
value is used for both speed and position proportional gains.
Number of Arguments: 1
Reply:
PG = aa Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000
Where:
cc (single channel) =
1: Speed Proportional Gain
2: Position Proportional Gain
cc (dual channel) =
1: Speed Proportional Gain for motor 1
2: Speed Proportional Gain for motor 2
3: Position Proportional Gain for motor 1
4: Position Proportional Gain for motor 2
Description:
Measures and reports instant motor phase Amps, in Amps*10, for all current sensors locat-
ed in the motor phases. Applicable only for brushless and AC Induction motor controllers.
Argument: Channel
Min: 1 Max: Total Number Of Current Sensors
Reply:
Where:
cc = Current Sensor
aa = Amps*10
Description:
Reports the value of each of the enabled pulse input captures. The value is the raw num-
ber in microseconds when configured in Pulse Width mode. In Frequency mode, the
314 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
returned value is in Hertz. In Duty Cycle mode, the reported value ranges between 0 and
4095 when the pulse duty cycle is 0% and 100% respectively. In Pulse Count mode,
the reported value in the number of pulses as detected. This counter only increments. In
order to reset that counter the pulse capture mode needs to be set back to disabled and
then again to Pulse Count.
Argument: InputNbr
Min: 1 Max: Total Number of Pulse Input
Reply:
Where:
cc = Pulse capture input number
nn = Value
Note:
The total number of Pulse input channels varies from one controller model to another and
can be found in the product datasheet.
Description:
Returns value of a Pulse input after all the adjustments were performed to convert it to a
command or feedback value (Min/Max/Center/Deadband/Linearity). If an input is disabled,
the query returns 0.
Argument: InputNbr
Min: 1 Max: Total Number of Pulse Input
Reply:
PIC=nn Type: Signed 16-bit Min: -1000 Max: 1000
Where:
cc = Pulse input number
nn = Converted input value to +/-1000 range
Description:
Reports the actual speed measured by the encoders as the actual RPM value. To report
RPM accurately, the correct Pulses per Revolution (PPR) must be stored in the encoder
configuration.
Argument: Channel
Min: 1 Max: Total Number of Encoders
Reply:
S = nn Type: Signed 32-bit Min: -65535 Max: 65535
Where:
cc =Motor channel
nn = Speed in RPM
Description:
Scans the script storage memory and computes a checksum number that is unique to
each script. If not script is loaded the query outputs the value 0xFFFFFFFF. Since a stored
script cannot be read out, this query is useful for determining if the correct version of a
given script is loaded.
Argument: None
Reply:
SCC = nn Type: Unsigned 32-bit
Where:
nn = Checksum number
316 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Description:
This query is used in Raw Redirect mode to read the content of a received Raw Redirect
frame in string format. Data will be available for reading, with this query, only after a ?CD
query is first used to check how many received frames are pending in the FIFO buffer.
Argument: None
Reply:
SDT=ss Type: String
Where:
ss = ASCII string
Example:
Q: ?SDT
R: SDT=Roboteq
Description:
This query is used to read the quality of the sensor used for commutation.
• In case of Hall Trapezoidal or Hall Sinusoidal it will return the number of the out of
sequence hall states.
• In case of Hall+Encoder Sinusoidal it will return the differrence between the
electrical angle estimated out of the hall sensors and the electrical angle estimated
out of the encoder sensor. The value is in degrees.
• In case of SinCos Sinusoidal or Resolver Sinusoidal it will return the result of
(sin^2(x)+cos^2(x)) * 100. The returned value is indicative of the quality of the sin/
cos signal. The closer the value is to 100 the better is the quality of the signal.
• In case of any other sensor used in sinusoidal mode it is not applicable.
Argument: Channel
Reply:
SEC=nn Type: unsigned 8-bit Min: 0 Max:
Where:
cc = Motor channel
nn = Number of sensor errors in case of of Hall trapezoidal or Hall Sinusoidal
Angle difference in degrees in case of Hall+Encoder Sinusoidal
Signal Quality in case of SinCos Sinusoidal or Resolver Sinusoidal.
Description:
On brushless controller operating in sinusoidal mode, this query returns the real time val-
ue of the rotor’s angle sensor of brushless motor. This query is useful for verifying trouble-
shooting sin/cos and SPI/SSI sensors. Angle are reported in 0-511 degrees.
Argument: Channel
Min: 1 Max: Total Number Of Motors
Reply:
SNA = aa Type: Unsigned 16-bit Min: 0 Max: 511
Where:
cc = Motor Channel
aa = Sensor Angle
Description:
It reads the instantaneous voltage of a specified phase of the motor and reports the value
in millivolts.
318 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Reply:
RMP=nn Type: Signed 32-bit Min: -65535 Max: 65535
Where:
cc = Motor Phase Number
nn = Phase voltage value in mV.
Description:
Returns the measured motor speed as a ratio of the Max RPM (MXRPM) configuration
parameter. The result is a value of between 0 and +/1000. As an example, if the Max RPM
is set at 3000 inside the encoder configuration parameter and the motor spins at 1500
RPM, then the returned value to this query will be 500, which is 50% of the 3000 max.
Note that if the motor spins faster than the Max RPM, the returned value will exceed
1000. However, a larger value is ignored by the controller for its internal operation.
Argument: Channel
Min: 1 Max: Total Number of Encoders
Reply:
SR = nn Type: Signed 16-bit Min: -1000 Max: 1000
Where:
cc = Motor channel
nn = Speed relative to max
Description:
Reports the actual speed measured by the SSI sensors as the actual RPM value. To report
RPM accurately, the correct Counter number of bits (SLEN) must be stored in the encod-
er configuration.
Argument: Channel
Min: 1 Max: Total Number of SSI sensors
Reply:
SS = aa Type: Signed 32-bit Min: -65535 Max: 65535
Where:
cc = Motor channel
aa = Speed in RPM.
Description:
Returns the measured motor speed as a ratio of the Max RPM (MXRPM) configuration
parameter. The result is a value of between 0 and +/1000. As an example, if the Max RPM
is set at 3000 inside the encoder configuration parameter and the motor spins at 1500
RPM, then the returned value to this query will be 500, which is 50% of the 3000 max.
Note that if the motor spins faster than the Max RPM, the returned value will exceed
1000. However, a larger value is ignored by the controller for its internal operation.
Argument: Channel
Min: 1 Max: Total Number of SSI sensors
Reply:
SSR = aa Type: Signed 16-bit Min: -1000 Max: 1000
Where:
cc = Motor channel
aa = Speed relative to max.
Description:
Returns the result of the latest executed STO Self-Test process. This process is applicable
only on motor controllers with STO circuit implemented on their board. If the result is
not successful the Respective STO Fault bit in the Fault Flags is set. The fault is triggered
when:
• Any of the transistors or other component of the STO circuit is damaged.
• Any of the Power MOSFETs is damaged.
• The respective jumper is placed on the board.
320 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Reply:
If xx = 1 (STO Result)
STT=ff Type Singed 32-bit Min: -1 Max: 4
Where ff=
If xx = 2 (MOSFET Result)
STT = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Signed 32-bit Min: 0 Max: 4095
Where:
f1 = Top MOSFET of U1 phase is damaged
f2 = Bottom MOSFET of U1 phase is damaged
f3 = Top MOSFET of V1 phase is damaged
f4 = Bottom MOSFET of V1 phase is damaged
f5 = Top MOSFET of W1 phase is damaged
f6 = Bottom MOSFET of W1 phase is damaged
f7 = Top MOSFET of U2 phase is damaged
f8 = Bottom MOSFET of U2 phase is damaged
f9 = Top MOSFET of V2 phase is damaged
f10 = Bottom MOSFET of V2 phase is damaged
f11 = Top MOSFET of W2 phase is damaged
f12 = Bottom MOSFET of W2 phase is damaged
T - Read Temperature
Alias: TEMP HexCode: 12 CANOpen id: 0x210F
Description:
Reports the temperature at each of the Heatsink sides and on the internal MCU silicon
chip. The reported value is in degrees C with a one degree resolution.
Argument: SensorNbr
Min: 1 Max: 2*(Total Number of Motors) + 1
Reply:
T= cc Type: Signed 16-bit Min: -40 Max: 1000
Where:
cc =
For Single Channel Controllers:
1 : MCU temperature
2 : Heatsink Temperature
3: Motor Temperature
For dual or triple channel controllers*
1 : MCU temperature
2 : Channel 1 Heatsink Temperature
3 : Channel 2 Heatsink Temperature
4: Channel 1 Motor Temperature
5: Channel 2 Motor Temperature
6: Channel 3 Motor Temperature (if applicable)
tt = temperature in degrees
*Applicable for single channel versions of dual channel controllers.
Note:
On some controller models, additional temperature values may reported. These are mea-
sured at different points and not documented. You may safely ignore this extra data. Other
controller models only have one heatsink temperature sensor and therefore only report
one value in addition to the Internal IC temperature.
TM - Read Time
Alias: TIME HexCode: 1C CANOpen id: 0x2119
Description:
Reports the value of the time counter in controller models equipped with Real-Time
clocks with internal or external battery backup. On older controller models, time is count-
ed in a 32-bit counter that keeps track the total number of seconds, and that can be
converted into a full day and time value using external calculation. On newer models, the
time is kept in multiple registers for seconds, minutes, hours (24h format), dayofmonth,
month, year in full.
322 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
Argument: Element
Min: None Max: 6
Reply:
TM = nn Type: Unsigned 32-bit Min: 0
Where:
ee = date element in new controller model
1 : Seconds
2 : Minutes
3 : Hours (24h format)
4 : Dayofmonth
5 : Month
6 : Year in full
nn = Value
Description:
Reads the real-time value of the expected motor position in the position tracking closed
loop mode and in speed position.
Argument: Channel
Min: 1 Max: Total Number of Motors
Reply:
TR=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
cc = Motor channel
nn = Position
Description:
Reports two strings identifying the Control Unit type and the Controller Model type. This
query is useful for adapting the user software application to the controller model that is
attached to the computer.
Argument: None
Reply:
TRN=ss Type: String
Where:
ss = Control Unit Id String:Controller Model Id String
Example:
Q: ?TRN
R:TRN=RCB500:HDC2460
Description:
Reports MCU specific information. This query is useful for determining the type of MCU:
100 = STM32F10X, 300 = STM32F30X. The query also produces a unique Id number that
is stored on the MCU silicon.
Argument: Element
Min: 1 Max: 5
Reply:
UID = nn Type: Unsigned 32-bit Min: 1 Max: 4294M
Where:
ee = Data element
1 : MCU type
2 : MCU Device Id
3-5 : MCU Unique ID
nn = value
V - Read Volts
Alias: VOLTS HexCode: 0D CANOpen id: 0x210D
Description:
Reports the voltages measured inside the controller at three locations: the main battery
voltage, the internal voltage at the motor driver stage, and the voltage that is available on
the 5V output on the DSUB 15 or 25 front connector. For safe operation, the driver stage
voltage must be above 12V. The 5V output will typically show the controller’s internal
regulated 5V minus the drop of a diode that is used for protection and will be in the 4.7V
range. The battery voltage is monitored for detecting the undervoltage or overvoltage con-
324 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries
ditions.
Argument: SensorNumber
Min: 1 Max: 3
Reply:
V = nn Type: Unsigned 16-bit
Where:
ee =
1 : Internal volts
2 : Battery volts
3 : 5V output
nn = Volts * 10 for internal and battery volts. Milivolts for 5V output
Example:
Q: ?V
R:V=135:246:4730
Q: ?V 3
R:V=4730
Description:
Read the value of dedicated 32-bit internal variables that can be read and written to/from
within a user MicroBasic script. It is used to pass 32-bit signed number between user
scripts and a microcomputer connected to the controller. The total number of user integer
variables varies from one controller model to another and can be found in the product
datasheet.
Argument: VarNumber
Min: 1 Max: Total Number of User Variables
Syntax Scripting: result = getvalue(_VAR, ee)
Reply:
VAR=nn Type: Signed 32-bit Min: -2147M Max: 2147M
Where:
ee = Variable number
nn = Value
Description:
Reports the d-axis voltage derived from d-axis current controller output in Volts x10 units.
Reply:
VSD = nn Type: Signed 32-bit Min: -32768 Max: 32768
where:
cc =Motor channel
nn = D-axis voltage in x10 Volts unit.
Example: ?VSD 1 68 : The d-axis voltage command of the controller is 6.8 Volts.
Description:
Reports the q-axis voltage derived from q-axis current controller output in Volts x10 units.
Reply:
VSQ = nn Type: Signed 32-bit Min: -32768 Max: 32768
where:
cc =Motor channel
nn = Q-axis voltage in Volts x10 units.
Example: ?VSQ 1 55 : The q-axis voltage command of the controller is 5.5 Volts.
Description:
This query is only used in AC Induction boards. Read the value of the Slip Frequency be-
tween the rotor and the stator of an AC Induction motor.
326 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Argument: VarNumber
Min: 1 Max: Total Number of Motors
Reply:
Where:
cc = Motor channel
nn = Slip Frequency in Hertz * 10
TABLE 15-18.
Command Arguments Description
AOM Channel Modes of Operation Display (DS402)
CW Channel Control Word (DS402)
SPE Channel Velocity Actual Value (DS402)
FEW Element Value Following Error Window (DS402)
FET Element Value Following Error Time Out (DS402)
HMD Channel Value Homing Method (DS402)
HSP Element Value Homing Speed (DS402)
INT Element Value Interpolation Time Period (DS402)
MSL Element Value Max Motor Speed (DS402)
PAC Channel Profile Acceleration (DS402)
PDC Channel Profile Deceleration (DS402)
PLT Element Value Software Position Limit (DS402)
POF Channel Position Offset (DS402)
POS Channel Target Position (DS402)
PSP Channel Profile Velocity (DS402)
PST Channel Position Actual Value (DS402)
RMP Channel Velocity Demand (DS402)
ROM Channel Modes of Operation (DS402)
S16 Channel Target Velocity (DS402)
SAC Element Velocity Acceleration (DS402)
Description:
Read the actual operation mode.
Reply: AOM=nn
Where:
cc = Motor channel
nn = Actual operation mode (see the table below).
328 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Description:
Read the value of the control word.
Reply: CW=nn
Where:
cc = Motor channel
nn = Control word value
Description:
Reads the velocity actual value in RPM.
Reply: SPE=nn
Where:
cc = Motor channel
nn = Velocity actual value
Description:
Read the configured following error window for the position mode in counts. If the value
is FFFF FFFFh, the following control is disabled.
Where:
cc= Motor Channel
nn = Following error window in counts
Description:
Read the configured following error time out for the position mode in milliseconds.
Reply: FET=nn
330 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Where:
cc = Motor channel
nn= Following error time out
Description:
Reply: HMD = nn
Description:
Read the speed that will be used during the homing procedure. Each channel has 2 speed
settings. The first is the speed during search for Home switch and the second is the
speed during search for Index pulse (currently not supported).
Reply: HSP = nn
Where:
ee=
1: Homing speed during search for Home switch for ch1
2: Homing speed during search for Index pulse (currently not supported) for ch1
3: Homing speed during search for Home switch for ch2
4: Homing speed during search for Index pulse (currently not supported) for ch2
Description:
Read the parameters for the Interpolation cycle time. The interpolation time base is the el-
ement 1 and the interpolation time index is element 2. The interpolation time value comes
out of the following formula:
<Interpolation Time(seconds)> = <Interpolation Time Base> x 10^<Interpolation Time In-
dex>
Reply: INT=nn
Where
ee=
1: Interpolation time base for channel 1
2: Interpolation time index for channel 1
3: Interpolation time base for channel 2
4: Interpolation time index for channel 2
...
2x(m-1)+1: Interpolation time base for channel m
2x(m-1)+2: Interpolation time index for channel m
332 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Description:
Read the configured maximum motor speed in profile position, profile velocity, profile
torque, cyclic synchronous velocity, cyclic synchronous torque and cyclic synchronous po-
sition modes.
Reply: MSL=nn
Description:
Read the configured acceleration in 10×RPM/second.
Reply: PAC=nn
Where:
cc = Motor channel
nn = Profile acceleration in 10×RPM/second
Description:
Read the configured deceleration in 10×RPM/second.
Reply: PDC=nn
Where:
cc = Motor channel
nn = Profile deceleration in 10×RPM/second
Description:
Read the position limits.
Reply: PLT=nn
Where
ee=
1: Software position min limit for channel 1
2: Software position max limit for channel 1
334 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Description:
Read the position offset.
Reply: POF = nn
Description:
Read the actual value of the position sensor.
Reply: PST=nn
Description:
Read the configured target position.
Reply: POS=nn
Where:
cc = Motor channel
nn = Target position
Description:
Read the configured velocity in RPM.
Reply: PSP=nn
Where:
cc = Motor channel
nn = Profile velocity
336 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Description:
Read the instantaneous velocity in RPM generated by the ramp function. Positive values
shall indicate forward direction and negative values shall indicate reverse direction.
Reply: RMP=nn
Where:
cc = Motor channel
nn = Velocity in RPM
Description:
Read the configured modes of operation.
Reply: ROM=nn
Where:
cc = Motor channel
nn = Modes of operation
Description:
Read the target velocity in RPM for velocity mode. Positive values shall indicate forward
direction and negative values shall indicate reverse direction.
Reply: S=nn
nn = GetValue(_MOTVEL, cc)
Where:
cc = Motor channel
nn = Target velocity in RPM
Description:
Read the configured velocity acceleration.
Reply: SAC=nn
Where:
ee =
338 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Description:
Read the configured velocity deceleration.
Reply: SDC=nn
Where:
ee =
1: Delta speed in 10×RPM for channel 1
2: Delta time in seconds for channel 1
3: Delta speed in 10×RPM for channel 2
4: Delta time in seconds for channel 2
…
2 × (m - 1) + 1: Delta speed in 10×RPM for channel m.
2 × (m - 1) + 1: Delta time in seconds for channel m.
nn = Delta speed/time
Description:
Read the supported drive modes. Roboteq controllers support the following modes:
• Profile Position Mode (PP).
• Velocity Mode (VL).
• Profile Velocity Mode (PV).
• Torque Mode (TQ).
Reply: SDM=nn
Where:
Description:
Read the configured minimum and maximum amount of velocity in RPM.
Reply: SPL=nn
Where:
ee =
1: Min amount for channel 1
2: Max amount for channel 1
3: Min amount for channel 2
4: Max amount for channel 2
…
2 × (m - 1) + 1: Min amount for channel m.
2 × (m - 1) + 2: Max amount for channel m.
nn = Velocity max/min amount
Description:
Read the status of the PDS FSA.
340 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
If bit 4 (voltage enabled) of the status word is always 1. If bit 5 (quick stop) of the status
word is 0, this shall indicate that the PDS is reacting on a quick stop request (quick stop
mode is always 2). Bit 7 (warning) is always 0. Bit 9 (remote) of the status word is always
1 when the control is done only via the DS402 commands and queries. In case of any
command triggerred by any other interface or action by any trigger input (diigtal inputs,
sensor limits, etc.), then this bit goes to 0. If bit 10 (target reached) of the status word is
1, this shall indicate that the PDS has reached the set-point. Bit 10 shall also be set to 1, if
the operation mode has been changed. The change of a target value by software shall al-
ter this bit. If halt occurred and the PDS has halted then bit 10 shall be set to 1, too. If the
same internal value is commanded then bit 10 shall not alter, if bit 10 is supported (see
Table 15-22). If bit 11 (internal limit active) of the status word is 1, this shall indicate that,
current limit has been reached or the motor command is out of limits.
15 14 13 12 11 10 9 0
see Table Set-Point see Table
Not Used Target Reached see Table 15-20
15-20 Acknowledge 15-20
MSB LSB
In Profile Position Mode the operation specific bits are mapped in Table 15-23. Status
Word Mapping in Profile Position Mode with bits 10 and 12 user can acknowledge the sta-
tus of the controller as shown in Table 10 and Table 12. Bit 13 is always 0.
The profile torque mode uses some bits of the statusword for mode specific purposes.
Table 15-24 shows the structure of the status word. Target torque reached is defined table
15-25.
Velocity Mode
The Velocity mode uses some bits of the statusword for mode specific purposes. Table
15-26 shows the structure of the status word.
342 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
15 14 13 12 11 10 9 0
Not see Target
see Table 15-20 Speed see Table 15-20
Used Table 15-20 Reached
MSB LSB
In Profile Velocity Mode the operation specific bits are mapped in Table 15-31. With bits
10 and 12 user can acknowledge the status of the controller as shown in Table 15-32 and
Table 15-33. Bit 13 is always 0.
Reply: SW=nn
Where:
cc = Motor channel
nn = Status word value
Description:
344 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Read the configured target torque in per thousand of rated torque, when the controller
is in torque mode. Beware that in order to have correct results, the configuration
commands nominal current (NOMA) and torque constant (TNM) must be set
appropriately.
Reply: TC=nn
Where:
cc = Motor channel
nn = Torque input value in 100×Nm
Description:
Read the torque offset added to the commanded torque. Commanded torque could be
either directly from user (in torque mode), or produced from speed or position control
loops. Beware in order to have correct values make sure to have configured appropriately
configuration command TNM.
Reply: TOF = nn
Description:
Read the actual torque in 100×Nm. Beware in order to have correct values make sure to
have configured appropriately configuration command TNM.
Reply: TRQ=nn
Where:
cc = Motor channel
nn = Actual torque 100×Nm
Description:
Read the configured rate of change of torque command. Beware in order to have correct
values make sure to have configured appropriately configuration command TNM.
Reply: TSL=nn
Where:
cc = Motor channel
nn = Torque slope
Description:
It reads the instantaneous velocity demand in RPM. In Speed mode, it coincides with the
RPM command. In Position modes, provided cascaded control is enabled, the command
is the output of the Position loop that is used as input in the Speed loop.
346 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries
Where:
cc = Motor channel
nn = Velocity demand in RPM
Description:
Read the version number of the CiA 402 profile.
Reply: VNM=nn
Where:
nn = Version number
Description:
Read the velocity offset added to velocity command. Velocity command could be either
directly set from user, in speed mode operation, or produced from position control loop.
Reply: VOF = nn
Queries can then be called from the history buffer using manual commands, or automati-
cally, at user selected intervals. This feature is very useful for monitoring and telemetry.
Additionally, the history buffer can be loaded with a set of user selected queries at power
on so that the controller can automatically issue operating values immediately after power
up. See “TELS - Telemetry String” configuration command for details on how to set up
the startup Telemetry string. “Another feature is the streams. In this case the data can be
printed after a prefix and separated with a delimiter. In order to enable a stream, the spe-
cial character “/” needs to be typed in front of the first query.
A command set is provided for managing the history buffer. These special commands
start with a “#” character.
When a query is executed from the history buffer, the controller will only display the que-
ry result (e.g. A=10:20). It will not display the query itself.
Syntax:
Reply: QQ
Where:
348 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Query History Commands
Syntax:
#C
Reply: None
Syntax:
# nn
Where:
QQ = is reply to query in the buffer.
nn = time in ms
Range: nn = 1 to 32000ms
Syntax:
# xx nn
Where:
xx = the stream.
nn = time in ms.
Syntax:
/”<prefix>”,”<delimiter>”?Q cc
Where:
For example, if one wants a log of the Motor Power(P), Motor Amps(A) and Encoder Speed(S)
of channel 1, with refresh rate 50ms, prefix “d=” and delimiter ‘:’ they should type:
The outcome of these three streams are shown in the image below:
350 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Maintenance Commands
In order to clear the streams # c can be sent and then, the legacy history method can be
used. In order to stop the streams but not delete them send #. then using command # xx
nn one can restart the streams with nn refresh rate.
Maintenance Commands
This section contains a few commands that are used occasionally to perform mainte-
nance functions.
Description:
This command is used to initiate various motor and sensor calibration processes. Be
aware that during many of these processes, the motor will run, so ensure that all neces-
sary precautions are taken. For more information about the motor and sensor calibration
processes, refer to the Roborun+ manual.
Syntax: %CLMOD nn
Where:
0: Exit/Stop motor/sensor setup.
2: Initiate motor/sensor setup of channel 1 (applicable only for BLDC motor drives)
3: initiate motor/sensor setup of channel 2 (applicable only for BLDC motor drives)
Description:
Saves changes to calibration to Flash. Calibration parameters are stored permanently until
new values are stored. This command must be used with care and must be followed by a
9-digit safety key to prevent accidental use.
Syntax:
%CLSAV safetykey
Where:
safetykey = 321654987
Description:
Firmware update can be performed via the RS232 port via USB or via CANOpen. When
done via USB or CANOpen, the DFU command is used to cause the controller to enter
in the firmware upgrade mode. This command must be used with care and must be fol-
lowed by a 9-digit safety key to prevent accidental use. Once the controller has received
352 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Maintenance Commands
the DFU command, it will no longer respond to the PC utility and no longer be visible on
the PC. When this mode is entered, you must either launch Roborun+ DFU Loader, in
case of USB, or Roborun+ Firmware Loader, in case of CANOpen. In case of CANOpen
the default parameters are used which are Node ID 126 and Bit Rate 125Kb/s.
Syntax:
%DFU safetykey
Where:
safetykey = 321654987
Description:
This command reloads the configuration that are saved in EEPROM back into RAM and
activates these settings.
Syntax:
%EELD
Description:
This command is used in order to Dump the Flash Log Data. Each data entry is printed in
a row with each value to be separated with a tab. The values, that are going to be printed,
are the following:
• timestamp (milisseconds since power-up),
• maximum absolute motor current since the time of the previous entry,
• maximum battery voltage since the time of the previous entry,
• maximum heatsink temperature since the time of the previous entry and
• Fault Flags that have caused the entry.
Each entry is saved to flash at every new fault or every 10 minute when a fault is active.
Note: Flash Log Data are not working when any of the motor channels are configured in
resolver sinusoidal mode.
Syntax: %EELOG
Description:
The EERST command will reload the controller’s RAM and EEPROM with the fac-
tory default configuration. Beware that this command may cause the controller to
no longer work in your application since all your configurations will be erased back
to factory defaults. This command must be used with care and must be followed by a
9-digit safety key to prevent accidental use.
Syntax:
%EERST safetykey
Where:
safetykey = 321654987
Description:
Controller configuration that have been changed using any Configuration Command
can then be saved in EEPROM. Once in EEPROM, it will be loaded automatically in the
controller every time the unit is powered on. If the EESAV command is not called after
changing a configuration, the configuration will remain in RAM and active only until the
controller is turned off. When powered on again, the previous configuration that was in the
EEPROM is loaded. This command uses no parameters.
Syntax:
%EESAV
Description:
This command is used in order to Erase the Flash Log Data.
Syntax: %ERASE
Description:
This command is followed by any user-selected secret 32-bit number. After receiving it,
the controller will lock the configuration and store the key inside the controller, in area
which cannot be accessed. Once locked, the controller will no longer respond to configu-
ration reads. However, it is still possible to store or to set new configurations.
Syntax:
%LK secretkey
Where:
secretkey = 32-bit number (1 to 4294967296)
Description:
This command will cause the controller to reset similarly as if it was powered OFF and
ON. This command must be used with care and must be followed by a 9-digit
safety key to prevent accidental reset.
354 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Maintenance Commands
Syntax:
%RESET safetykey
Where:
safetykey = 321654987
Description:
After receiving this command, the controller will enter the script loading mode. It will
reply with HLD and stand ready to accept script bytecodes in intel Hex Format. The exact
download and data format is described in the MicroBasic section of the manual. The
timeout for the communication is 3 seconds. After the timeout expires, the controller will
return “-”.
Syntax:
%SLD
Description:
This command sets the time inside the controller’s clock that is available in some con-
troller models. The clock circuit will then keep track of time as long as the clock remains
under power. On older controller models, the clock is a single 32-bit counter in which the
number of seconds from a preset day and time is stored (for example 02/01/00 at 3:00).
On newer model, the clock contains 6 registers for seconds, dates, minuted, hours, day-
ofmonth, month, year. The command syntax will be different for each of these models.
Syntax:
%STIME nn : Older models%STIME ee nn : Newer models
Where:
Older models:nn = number of secondsNewer modelsee = 1: Seconds2: Minutes3: Mours
(24h format)4: Dayofmonth5: Month6: Year in fullnn = Value
Description:
This command will release the lock and make the configuration readable again. The
command must be followed by the secret key which will be matched by the controller
internally against the key that was entered with the LK command to lock the con-
troller. If the keys match, the configuration is unlocked and can be read.
Syntax:
%UK secretkey
Where:
secretkey = 32-bit number (1 to 4294967296)
Important Notices
The total number of configuration parameters is very large. To simplify the config-
uration process and avoid errors, it is highly recommended to use the RoborunPlus
PC utility to read and set configuration.
Some configuration parameters may be absent depending on the presence or ab-
sence of the related feature on a particular controller model.
Setting Configurations
The general format for setting a parameter is the “^” character followed by the command
name followed by parameter(s) for that command. These will set the parameter in the con-
troller’s RAM and this parameter becomes immediately active for use. The parameter can
also be permanently saved in EEPROM by sending the %EESAV maintenance command.
Some parameters have a unique value that applies to the controller in general. For exam-
ple, overvoltage or undervoltage. These configuration commands are therefore followed
by a single parameter:
Other parameters have multiple value, with typically one value applying to a different
channel. Multiple value parameters are numbered from 1 to n. For example, Amps limit
for a motor channel or the configuration of an analog input channel.
Using 0 as the first parameter value will cause all elements to be loaded with the same
content.
Important Notice
Saving configuration into EEPROM can take up to 20ms per parameter. The control-
ler will suspend the loop processing during this time, potentially affecting the con-
troller operation. Avoid saving configuration to EEPROM during motor operation.
Reading Configurations
Configuration parameters are read by issuing the “~” character followed by the command
name and with an optional channel number parameter. If no parameter is sent, the con-
troller will give the value of all channels. If a channel number is sent, the controller will
give the value of the selected channel.
356 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
The reply to parameter read command is the command name followed by “=” followed
by the parameter value. When the reply contains multiple values, then the different values
are separated by “:”. The list below describes every configuration command of the control-
ler. For Example:
~ALIM : Read Amps limit for all channels
Configuration parameters can be read from within a MicroBasic script using the getcon-
fig() function. The setconfig() function is used to load a new value in a configuration pa-
rameter.
Important Warning
Configuration commands can be issued at any time during controller operation.
Beware that some configuration parameters can alter the motor behavior. Change
configurations with care. Whenever possible, change configurations while the
motors are stopped.
Description:
This parameter enables the analog safety that requires that the input be at zero or
centered before it can be considered as good. This safety is useful when operating
with a joystick and requires that the joystick be centered at power up before motors can
be made to run. On mutli-channel controllers, this configuration acts on all analog com-
mand inputs, meaning that all joysticks must be centered before any one becomes active.
Number of Arguments: 1
Argument 1: Enable
Where:
nn =
0: Safety disabled
1: Safety enabled
Description:
This configuration is used to make sure that the analog input command is always within
a user preset minimum and maximum safe value. It is useful to detect, for example, that
the wire connection to a command potentiometer is broken. If the safety is enabled and
the input is outside the safe range, the Analog input command will be considered invalid.
The controller will then apply a motor command based on the priority logic.
358 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Number of Arguments: 1
Argument 1: Enable
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 1 = Enabled
Where:
nn =
0: Disabled
1: Enabled
Description:
Store and retrieve user data in battery backed RAM. Storage is quasi permanent, limited
only by the on-board battery (usually several years) . Unlike storage in Flash using the EE
configuration commands, there are no limits in the amount or frequency of read and write
cycles with BEE. This feature is only available on selected models, see product data-
sheet. Battery must be installed in the controller for storage to be possible.
Number of Arguments: 2
Argument 1: Address
Argument 2: Value
Type: Signed 16-bit
Min: -32768 Max: 32767
Default: 0
Where:
aa = Address
dd = Data
Example:
^BEE 1 555 : Store value 555 in Battery Backed RAM location 1
~BEE 1: Read data from RAM location 1
Description:
This parameter is used to enable or disable the automatic MicroBasic script execution
when the controller powers up. When enabled, the controller checks that a valid script
is present in Flash and will start its execution 2 seconds after the controller has become
active. The 2 seconds wait time can be circumvented by putting 2 in the command argu-
ment. However, this must be done only on scripts that are known to be bug-free. A crash-
ing script will cause the controller to continuously reboot with little means to recover.
Number of Arguments: 1
Argument 1: Enable
Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0 = Disabled
Where:
nn =
0: Disabled
1: Enabled after 2 seconds
2: Enabled immediately
Description:
This parameter is used for applying an exponential or a logarithmic transformation on the
command input, regardless of its source (serial, pulse or analog). There are 3 exponential
and 3 logarithmic choices. Exponential correction make the commands change less at the
beginning and become stronger at the end of the command input range. The logarithmic
correction will have a stronger effect near the start and lesser effect near the end. The
linear selection causes no change to the input. A linearity transform is also available for all
analog and pulse inputs. Both can be enabled although in most cases, it is best to use the
Command Linearity parameter for modifying command profiles.
Number of Arguments: 2
Argument 1: Channel
360 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Argument 2: Linearity
Type: Unsigned 8-bit
Min: 0 Max: 7
Default: 0 = Linear
Where:
cc = Motor channel
nn =
0: Linear (no change)
1: Exp weak
2: Exp medium
3: Exp strong
4: Log weak
5: Log medium
6: Log strong
Example:
^CLIN 1 1 : Sets linearity for channel 1 to exponential weak
Description:
This parameter contains up to 3 variables and is used to set which type of command the
controller will respond in priority and in which order. The first item is the third priority, the
second item is the fourth priority, and the third item is the fifth priority. The first priority
belongs to the script mode and the second priority belongs to the CAN mode. Each prior-
ity item is then one of the three command modes: Serial, Analog or RC Pulse. See Com-
mand Priorities in the User Manual. Default priority orders are: 1-Serial, 2-Pulse, 3-None.
Number of Arguments: 2
Argument 1: Level
Min: 1 Max: 3 or 4
Default: See description
Argument 2: Command
Type: Unsigned 8-bit
Min: 0 Max: 2 or 3
Default: See description
Where:
pp = Priority rank
nn =
0: Serial
1: RC
2: Analog
3: None
4: None
Example:
^CPRI 1 2 : Set Analog as first priority
~CPRI 2 : Read what command mode is second priority
Note:
USB, RS232, RS485 and TCP commands share the “Serial” type. When serial commands
come from different Serial source, they are executed in the order received.
Description:
The default command values are the command applied to the motor when no valid com-
mand is fed to the controller. Value 1001 causes no change in position at power up until a
new position command is received.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Value
Type: Signed 16-bit
Min: -1000 Max: 1001
Default: 0
Where:
cc : Motor channel
nn : Command value
Example:
^DFC 1 500 : Sets motor command to 500 when no command source are detected
^DFC 2 1001 : Motor takes present position as destination after power up. Motor doesn’t
move.
Description:
Configure this parameter in order to enable Modbus and the desired mode.
362 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Number of Arguments: 1
Argument 1: Modbus Mode
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: 0
Where:
nn =
0: Off
1: TCP
2: RTU over TCP
3: RS232 ASCII
4: RS485 ASCII
5: RS232 RTU
6: RS485 RTU
Example:
^DMOD 3: Enable Modbus RS232 ASCII mode.
Description:
This command is used to disable/enable the echo on the RS232, RS485, TCP or USB port.
By default, the controller will echo everything that enters the serial communication port.
By setting ECHOF to 1, commands are no longer being echoed. The controller will only
reply to queries and the acknowledgements to commands can be seen.
Number of Arguments: 1
Argument 1: OffOn
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Echo on
Where:
nn =
0: Echo is enabled
1: Echo is disabled
Example:
^ECHOF 1 : Disable echo
EE - User-Defined Values
HexCode: 00 CANOpen id: 0x3000
Description:
Read and write user-defined values that can be permanently stored in Flash. Storage area
size is typically 32 x 16-bit words but can vary from one product to the other. The com-
mand alters data contained in a RAM area. The %EESAV Maintenance Command, or !EES
Real Time Command must be used to copy the RAM array to Flash. The Flash is copied to
RAM every time the device powers up.
Number of Arguments: 2
Argument 1: Address
aa = Address
dd = Data
Example:
^EE 1 555 : Store value 555 in RAM location 1
%EESAV or !EES : Copy data from temporary RAM to Flash
~EE 1 : Read data from RAM location 1
Note:
See product datasheet to know the total available EE storage.
Do not transfer to Flash with %EESAV or !EES at high frequency as the number of write
cycles to Flash are limited to around 10000.
Write to address locations 1 and up. Writing at address 0 will fill all RAM location with the
value.
364 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Description:
This parameter controls the automatic clearance of the following faults: Overvoltage,
Undervoltage and Overtemperature. If disabled, the triggered faults will not be cleared
if the fault condition is restored unless a respective command comes (see MG runtime
command). So, when e.g. battery volts go above overvoltage limit and overvoltage fault
gets triggered, it will not be cleared automatically when the battery volts go below the
overvoltage minus the overvoltage hysteresis.
~FLCL
Number of Arguments: 2
Argument 1: Channel
Min: 0 Max: 1 Default: 1
Where:
nn =
0: Disabled
1: Enabled
Example:
^FLCL 0: Faults will be cleared only when the MG runtime command is sent.
Description:
Configure this parameter in order to enable Raw Redirect Mode and the interface to be
used.
Number of Arguments: 1
Where:
nn =
0: Off
2: RS232
4: RS485
Example:
^ISM 1: Enable ModbusRaw Redirect mode on RS232 interface.
Description:
Configure this parameter in order to set the alignment of the Modbus byte frame. This op-
tion depends on what the Modbus master supports.
Number of Arguments: 1
Argument 1: Modbus Data Alignment
Type: Unsigned 8-bit
Min: 0 Max: 3
Default: 0
Where:
nn =
0: High Word/High Byte
1: High Word/Low Byte
2: Low Word/High Byte
3: Low Word/Low Byte
Example:
^MDAL 2: Configure Modbus Data Alignment to Low Word/High Byte.
366 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Description:
Configure this parameter in order to set Modbus Slave Node ID of the controller. In that
way this controller wil be distinguished inside a Modbus network.
Number of Arguments: 1
Argument 1: Modbus Node ID
Type: Unsigned 8-bit
Min: 0 Max: 127
Default: 1
Where:
nn = Node ID
Example:
^MNOD 3: Configure Modbus Node ID to 3.
Description:
This configuration is used to make sure that the pulse input command is always within a
user preset minimum and maximum safe value. It is useful to detect, for example, that
the wire connection is broken. If the safety is enabled and the input is outside the safe
range, the Pulse input command will be considered invalid.
The controller will then apply a motor command based on the priority logic.
Number of Arguments: 1
Argument 1: Enable
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 1 = Enabled
Where:
nn =
0: Disabled
1: Enabled
Description:
Sets the serial communication bit rate of the RS232 and RS485 ports. Choices are one of
five most common bit rates. On selected products, the port output can be inverted to al-
low a simplified connection to devices that have TTL serial ports instead of full RS232 (not
applicable for RS485 port).
Number of Arguments: 1
Argument 1: BitRate
Type: Unsigned 8-bit
Min: 0 Max: 4 or 9
Default: 0 = 115200
Where:
nn =
0: 115200
1: 57600
2: 38400
3:19200
4: 9600
5: 115200 + Inverted RS232
6: 57600 + Inverted RS232
7: 38400 + Inverted RS232
8: 19200 + Inverted RS232
9: 9600 + Inverted RS232
10: 230600
Example:
^RSBR 3 : sets baud rate at 19200
Note:
This configuration can only be changed while connected via USB or via scripting. After the
baud rate has been changed, it will not be possible to communicate with the Roborun PC
utility using the serial port until the rate is changed back to 115200. Slow bit rates may
368 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
result in data loss if more characters are sent than can be handled. The inverted mode is
only available on selected products.
Description:
Configure this parameter in order to enable the RS485 communication. This feature is
applicable only on motor controllers, where RS485 pins are shared with other features. In
these controllers the default value is Disabled. In any other controller that support RS485
with dedicated pins the default value is Enabled.
Number of Arguments: 1
Argument 1: Enable RS485
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0
Where:
nn = Enable RS485
0: Disabled.
1: Enabled.
Example:
^RS485 1: Enable RS485.
Description:
This is the Serial Commands watchdog timeout parameter. It is used to detect when the
controller is no longer receiving commands and switch to the next priority level. Any Real-
time Command arriving from RS232, RS485, TCP, USB, CAN or Microbasic Scripting, The
watchdog value is a number in ms (1000 = 1s). The watchdog function can be disabled by
setting this value to 0. The watchdog will only detect the loss of real time commands, as
shown in section 6. All other traffic on the serial port will not refresh the watchdog timer.
As soon as a valid command is received, motor operation will resume.
Number of Arguments: 1
Argument 1: Timeout
Type: Unsigned 16-bit
Min: 0 Max: 65000
Default: 1000 = 1s
Where:
nn = Timeout value in ms
Example:
^RWD 2000 : Set watchdog to 2s
^RWD 0 : Disable watchdog
Description:
Selects which port the print statement sends data to. When 0, the last port which re-
ceived a valid character will be the one the script outputs to.
Number of Arguments: 1
Argument 1: Port
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: 0 = Last used
Where:
nn =
0: Last used
1: Serial
2: USB
3: RS485 if applicable,
4: TCP if applicable
Description:
Configure this parameter in order to enable the STO functionality. For boards which have
the respective circuit the respective jumper needs to be removed (see Chapter Safe
Torque-Off (STO), in Section2).
370 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
General Configuration and Safety
Number of Arguments: 1
Argument 1: STO Status
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0
Where:
nn = STO status
0: Disabled.
1: Enabled.
Example:
Description:
This parameter command lets you enter the telemetry string that will be used when the
controller starts up. The string is entered as a series of queries characters between a be-
ginning and an ending quote. Queries must be separated by “:” colon characters. Upon
the power up, the controller will load the query history buffer and it will automatically start
executing commands and queries based on the information in this string. Strings up to 48
characters long can be stored in this parameter.
Syntax Scripting:
Number of Arguments: 1
Argument 1: Telemetry
Type: String
Min: “” Max: 48 characters string
Default: “” = Empty string
Where:
string = string of ASCII characters between quotes
Example:
^TELS “?A:?V:?T:# 200” = Controller will issue Amps, Volts and temperature information
automatically upon power up at 200ms intervals.
372 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Description:
This parameter is the measured voltage on input that will be considered as the center or
the 0 value. The min, max and center are useful to set the range of a joystick or of a feed-
back sensor. Internally to the controller, commands and feedback values are converted to
1000, 0, +1000.
Number of Arguments: 2
Argument 1: InputNbr
Example:
^ACTR 3 2000 : Set Analog Input 3 Center to 2000mV
Note:
Center value must always be a number greater of equal to Min, and smaller or equal to
Max
Make the center value the same as the min value in order to produce a converted output
range that is positive only (0 to +1000)
Description:
This parameter selects the range of movement change near the center that should be
considered as a 0 command. This value is a percentage from 0 to 50% and is useful to
allow some movement of a joystick around its center position without change at the con-
verted output.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Argument 2: Deadband
Type: Unsigned 8-bit
Min: 0 Max: 50
Default: 5 = 5%
Where:
Example:
^ADB 6 10 : Sets Deadband for channel 6 at 10%
Note:
Deadband is not used when input is used as feedback
Description:
This parameter selects whether an input should be used as a command feedback or left
unused. When selecting command or feedback, it is also possible to select which channel
this command or feedback should act on. Feedback can be position feedback if potenti-
ometer is used or speed feedback if tachometer is used. Motor Temperature reads the
thermistor and calculates the temperature according to the Motor Thermistor parameters
(R25 and B25). Embedded in the parameter is the motor channel to which the command
or feedback should apply.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Argument 2: Use
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
374 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Where:
cc = Analog input channel
nn =
0: No action
1: Command
2: Feedback
4: Motor Temperature
mm =
mot1*16 + mot2*32 + mot3*64
Example:
^AINA 1 17: Sets Analog channel 1 as command for motor 1. I.e. 17 = 1 (command) +16
(motor 1)
Description:
This parameter is used for applying an exponential or a logarithmic transformation on an
analog input. There are 3 exponential and 3 logarithmic choices. Exponential correction
will make the commands change less at the beginning and become stronger at the end of
the joystick movement. The logarithmic correction will have a stronger effect near the start
and lesser effect near the end. The linear selection causes no change to the input.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Linearity
Type: Unsigned 8-bit
Min: 0 Max: 6
Default: 0 = Linear
Where:
5: Log medium
6: Log strong
Example:
^ALIN 1 1 : Sets linearity for channel 1 to exp weak
Description:
This parameter sets the voltage that will be considered as the maximum command value.
The min, max and center are useful to set the range of a joystick or of a feedback sensor. In-
ternally to the controller, commands and feedback values are converted to -1000, 0, +1000.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Argument 2: Max
Type: Unsigned 16-bit
Min: 0 Max: 10000
Default: 4900 mV
Where:
Example:
^AMAX 4 4500 : Set Analog Input 4 Max range to 4500mV
Note:
Analog input can capture voltage up to around 5.2V. Setting the Analog maximum above
5200 mV, means the conversion will never be able to reach +1000
Description:
This parameter selects what action should be taken if the maximum value that is defined
in AMAX is reached. The list of action is the same as these of digital inputs. For example,
this feature can be used to create soft limit switches, in which case the motor can be
made to stop if the feedback sensor in a position mode has reached a maximum value.
376 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
Example:
^AMAXA 3 33 : Stops motor 2. I.e. 33 = 1 (Quick stop) + 32 (motor2)
Description:
This parameter sets the raw value on the input that will be considered as the minimum
command value. The min, max and center are useful to set the range of a joystick or of a
feedback sensor. Internally to the controller, commands and feedback values are convert-
ed to -1000, 0, +1000.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Min
Type: Unsigned 16-bit
Min: 0 Max: 10000
Default: 100 mV
Where:
Example:
^AMIN 5 250 : Set Analog Input 5 Min to 250mV
Note:
Analog input can capture voltage up to around 5.2V. Setting the Analog minimum between
5200 and 10000 mV means the conversion will always return 0
Description:
This parameter selects what action should be taken if the minimum value that is defined
in AMIN is reached. The list of action is the same as these of the DINA configuration com-
mand. For example, this feature can be used to create soft limit switches, in which case
the motor can be made to stop if the feedback sensor in a position mode has reached a
minimum value.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
378 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Example:
^AMINA 2 33 : Stops motor 2. I.e. 33 = 1 (Quick stop) + 32 (motor2)
Description:
This parameter is used to enable/disable an analog input pin. When enabled, it can be
made to measure an absolute voltage from 0 to 5V, or a relative voltage that takes the 5V
output on the connector as the 5V reference. The absolute mode is preferred whenever
measuring a voltage generated by an outside device or sensor. The relative mode is the
mode to use when a sensor or a potentiometer is powered using the controller’s 5V out-
put of the controller. Using the relative mode gives a correct sensor reading even though
the 5V output is imprecise.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0 = Disabled
Where:
cc = Analog input channel
nn =
0: Disabled
1: Absolute
2: Relative
Example:
^AMOD 1 1 : Analog input 1 enabled in absolute mode
Description:
Inverts the analog capture polarity value after conversion. When this configuration bit is
cleared, the pulse capture is converted into a -1000 to +1000 command or feedback value.
When set, the converted range is inverted to +1000 to -1000.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Analog Inputs
Argument 2: Polarity
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Non inverted
Where:
nn =
0: Not inverted
1: Inverted
Description:
This parameter is used in order to select the voltage level of the High Side Digital Out-
puts. This feature is only available on selected models, see product datasheet.
Number of Arguments: 1
Where:
nn =
0: 5 Volts
1: 24 Volts
Example:
^AUXV 1 : Set the voltage level of the high side digital outputs to 24 Volts.
380 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Description:
This parameter sets the action that is triggered when a given input pin is activated. The
action list includes: limit switch for a selectable motor and direction, use as a deadman
switch, emergency stop, Quick stop or invert direction. Embedded in the parameter is the
motor channel(s) to which the action should apply.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No actions
Where:
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
9: Soft STO
10: Reset
mm = mot1*16 + mot2*32 + mot3*64
Example:
^DINA 1 33 : Input 1 as Quick stop for Motor 2. I.e. 33 = 1 (Quick stop) + 32 (Motor2)
Description:
This parameter is used to set the active level for each Digital input. An input can be made
to be active high or active low. Active high means that pulling it to a voltage will trigger
an action. Active low means pulling it to ground will trigger an action. This parameter is a
Argument 1: ActiveLevels
Type: Unsigned 32-bit
Min: 0 Max: 2 ^ Total Number of Digital Inputs
Default: 0 = All Active high
Where:
cc = Digital input number
aa=
0: Active High
1: Active Low
Example:
^DINL 2 1 : Sets digital input 2 to active low
Description:
This configuration parameter will set what will trigger a given output pin. The parameter
is a number in a list of possible triggers: when one or several motors are on, when one or
several motors are reversed, when an Overvoltage condition is detected or when an Over-
temperature condition is detected. Embedded in the parameter is the motor channel(s) to
which the action should apply.
Number of Arguments: 2
Argument 1: OutputNbr
Type: Unsigned 32-bit
Min: 1 Max: Total Number of Digital Outputs
Argument 2: Action
Min: 0
Default: See Note
Where:
cc =
16: channel 1
382 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
32: channel 2
64: channel 3
aa =
0: Never
1: Motor on
2: Motor reversed
3: Overvoltage
4: Overtemperature
5: Mirror status LED
6: No MOSFET failure
Example:
^DOA 1 19: Output 1 is active when Overvoltage is observed. on channel 1
^DOA 2 33: Output 2 is active when motor of channel 2 is on.
Note:
Typical default configuration is Digital outputs 1 (2) are active when motor is on. Digital
output 2 (3) when no MOSFET failure is detected.
To activate an output via serial command or from a Microbasic script, set that output to
Never
Description:
This parameter configures whether an output should be set to ON or to OFF when it is
activated.
Number of Arguments: 2
Argument 1: OutputNbr
Argument 2: ActiveLevels
Type: Unsigned 32-bit
Where:
cc = Digital input number
aa=
0: On when active
1: Off when active
Description:
This parameter is used in order to select the type of the digital outputs. This feature is only
available on selected models that support high side type, see product datasheet. For the
other models all the digital outputs are open drain.
Number of Arguments: 2
Argument 1: OutputNbr
Type: Unsigned 32-bit
Min: 1 Max: Total Number of Digital Outputs
Argument 2: Type
Type: Unsigned 8-bit
Min: 0 Max: 1
Where:
nn =
0: Open Drain
1: High Side Driver
Example:
^DOT 2 1: Set the type of digital output 2 to High Side Driver.
Description:
This parameter is used in enable the encoder output of the motor sensor. This feature is
only available on selected models, see product datasheet.
384 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Number of Arguments: 1
Argument 1:
Type: Unsigned 8-bit
Min: 0 Max: 1
Where:
nn =
0: Encoder Output Disabled
1: Encoder Output Enabled
Example:
^ENCO 1 : Enable the encoder output.
Description:
This defines the raw value of the measured pulse that would be considered as the 0 value
inside the controller. The default value is 1500 which is the center position of the pulse in
the RC radio mode.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Pulse Inputs
Argument 2: Center
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 1500us
Where:
Description:
This sets the deadband value for the pulse capture. It is defined as the percent number
from 0 to 50% and defines the amount of movement from joystick or sensor around the
center position before its converted value begins to change.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Pulse Inputs
Argument 2: Deadband
Type: Unsigned 8-bit
Min: 0 Max: 50
Default: 5 = 5%
Where:
cc = Pulse input number
nn = Deadband in %
Note:
Deadband is not used when input is used as feedback
Description:
This parameter selects whether an input should be used as a command feedback, posi-
tion feedback or left unused. Embedded in the parameter is the motor channel that this
command or feedback should act on. Feedback can be position feedback if potentiometer
is used or speed feedback if tachometer is used.
Number of Arguments: 2
Argument 1: InputNbr
386 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Argument 2: Use
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: See note
Where:
2: Feedback
mm =
mot1*16 + mot2*32 + mot3*64
Example:
^AINA 1 17: Sets Pulse input 1 as command for motor 1. I.e. 17 = 1 (command) +16 (mo-
tor 1)
Description:
This parameter is used for applying an exponential or a logarithmic transformation on a
pulse input. There are 3 exponential and 3 logarithmic choices. Exponential correction will
make the commands change less at the beginning and become stronger at the end of the
joystick movement. The logarithmic correction will have a stronger effect near the start
and lesser effect near the end. The linear selection causes no change to the input.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Pulse Inputs
Argument 2: Linearity
Type: Unsigned 8-bit
Min: 0 Max: 6
Default: 0 = Linear
Where:
5: Log medium
6: Log strong
Description:
This parameter defines the raw pulse measurement number that would be considered as
the +1000 internal value to the controller. By default, it is set to 2000 which is the max
pulse width of an RC radio pulse.
Number of Arguments: 2
Argument 1: InputNbr
Min: 1 Max: Total Number of Pulse Inputs
Argument 2: Max
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 2000
Where:
Description:
This parameter configures the action to take when the max value that is defined in PMAX
is reached. The list of action is the same as in the DINA digital input action list. Embedded
in the parameter is the motor channel(s) to which the action should apply.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
388 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Where:
Description:
This sets the raw value of the pulse capture that would be considered as the -1000 in-
ternal value to the controller. The value is in number of microseconds (1000 = 1ms). The
default value is 1000 microseconds which is the typical minimum value on an RC radio
pulse.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Min
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 1000
Where:
Description:
This parameter selects what action should be taken if the minimum value that is defined
in PMIN is reached. The list of action is the same as these of the DINA digital input ac-
tions. Embedded in the parameter is the motor channel(s) to which the action should
apply.
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
Description:
This parameter is used to enable/disable the pulse input and select its operating mode,
which can be: pulse with measurement, frequency or duty cycle. Inputs can be measured
with a high precision over a large range of time or frequency. An input will be processed
and converted to a command or a feedback value in the range of -1000 to +1000 for use
by the controller internally.
Number of Arguments: 2
Argument 1: InputNbr
390 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: See note
Where:
cc = Pulse input number
nn =
0: Disabled
1: Pulse width
2: Frequency
3: Duty cycle
4: Magsensor
5: BMS
6: Pulse Count
7: Flow Sensor
Example:
^PMOD 4 4 : Sets Pulse input 4 in Multi-PWM for Robteq’s MGS1600 magnetic guide
sensor
Note:
Pulse width is designed for capturing RC radio commands. Pulse width must be beween
500us and 3000us, and repeat rate 50Hz or higher
On some products, enabling a pulse input will cause a an offset voltage to be present
when that same input is read as analog
Description:
Inverts the pulse capture value after conversion. When this configuration bit is cleared, the
pulse capture is converted into a -1000 to +1000 command or feedback value. When set,
the converted range is inverted to +1000 to -1000. Center value must always be a number
greater of equal to Min, and smaller or equal to Max. Make the center value the same
as the min value in order to produce a converted output range that is positive only (0 to
+1000)
Number of Arguments: 2
Argument 1: InputNbr
Argument 2: Polarity
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Non inverted
Where:
Motor Configurations
This section covers the various configuration parameter applying to motor operations.
392 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
This is the maximum Amps that the controller will be allowed to deliver to a motor re-
gardless the load of that motor. The value is entered in Amps multiplied by 10. The value
is the Amps that are measured at the motor and not the Amps measured from a battery.
When the motor draws current that is above that limit, the controller will automatically
reduce the output power until the current drops below that limit. For brushless controllers
this value is considered to be in RMS. This value is also used for the calculation of the I2T
limit.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Limit
Type: Unsigned 16-bit
Min: 10 Max: Max Amps in datasheet
Default: See note
Where:
cc = Motor channel
nn = Amps *10
Example:
^ALIM1 455: Set Amp limit for Motor 1 to 45.5A
Note:
Default value is typically set to the controller’s max amps as defined in the datasheet
394 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
This parameter sets what action to take when the Amps trigger is activated. The list is the
same as in the DINA digital input actions. Typical use for that feature is as a limit switch
when, for example, a motor reaches an end and enters stall condition, the current will
rise, and that current increase can be detected and the motor be made to stop until the
direction is reversed. Embedded in the parameter is the motor channel(s) to which the
action should apply.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Action
Type: Unsigned 8-bit
Min: 10 Max: 255
Default: 0 = No action
Where:
cc = Motor channel
aa =
0 : No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
Description:
This parameter contains the time in milliseconds during which the Amps Trigger Level
(ATRIG) must be exceeded before the Amps Trigger Action (ATGA) is called. This parame-
ter is used to prevent Amps Trigger Actions to be taken in case of short duration spikes.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Delay
Type: Unsigned 16-bit
Min: 0 Max: 10000
Default: 500ms
Where:
cc = Motor channel
nn = Delay in ms
Example:
^ATGD 1 1000: Action will be triggered if motor Amps exceeds the value set with ATGL
for more than 1000ms
Description:
This parameter lets you select Amps threshold value that will trigger an action. This
threshold must be set to be below the ALIM Amps limit. When that threshold is reached,
then list of action can be selected using the ATGA parameter.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Level
Type: Unsigned 16-bit
Min: 10 Max: Max Amps in datasheet
Default: Max Amps rating in datasheet
Where:
cc = Motor channel
nn = Amps *10
Example:
^ATRIG2 550: Set Amps Trigger to 55.0A
396 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
Set the temperature coefficient of the thermistor attached to the motor. This value can be
derived from the thermistor datasheet either directly or after making some calculations as
stated in chapter Connecting External Thermistor to Analog Inputs, SECTION 3.
Where:
cc=Motor channel
nn=Coefficient in Kelvin (K)
Example:
^B25 1 3100. Set β25 at 3100.
Description:
Set the delay in milliseconds from the time a motor stops and the time an output con-
nected to a brake solenoid will be released. Applies to any Digital Ouput(s) that is config-
ured as motor is on. Delay value applies to all motors in multi-channel products.
Number of Arguments: 1
Argument 1: Delay
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 250 = 250ms
Where:
nn = Delay in milliseconds
Example:
^BKD 1 1000 : Causes the digital output to go off, and therefore activate the brake, 1.0s
after motor stops being energized
Description:
This parameter is configured in order to be able to bypass the ramp of the command or
the trajectory in case of position mode. It is applicable mainly in torque mode (in case it
requires high transitions) or in DS402 cyclic sync modes. It is noted that the bypass ramp
of the command selection is not supported in the case of close loop speed position oper-
ating mode (command remain to zero until bypass ramp is disabled).
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Bypass Status
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0
Where:
cc = Channel
nn = Bypass Status
0: Disabled
1: Enabled
Description:
Sets the level of Amps to be applied to the motor coils during Motor/Sensor Setup. Mo-
tor/Sensor Setup is automatically initiated every time the controller is powered up when
sinusoidal with encoder feedback is selected. Motor/Sensor Setup in necessary to be
performed only once in the other cases. Additionally, it sets the level of Amps in motor
characterization processes for current loop auto tuning in both BLDC and Induction Motor
drives.
398 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Number of Arguments: 2
Argument 1: Channel
Argument 2: Amps
Type: Unsigned 16-bit
Min: 0
Default: 50 = 5.0A
Where:
cc = Motor channel
nn = Amps x 10
Description:
This parameter is used to select the Voltage level with which the brake solenoid connect-
ed will be released. It is applicable only on products that support PWM brake connection.
For more details see product’s datasheet. This voltage level is translated in PWM duty
cycle applied on Battery volts. If the value is higher than the battery volts, then the value
of the battery volts is applied.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Voltage
Type: Unsigned 16-bit
Min:0 Max: 1000
Default: 120 = 12Volts
Where:
cc = Motor channel
nn = Volts*10
Example:
^BRV 1 200: Sets the Release voltage level of the brake of motor channel 1 to 20Volts.
Description:
This parameter is used to select the Voltage level with which the brake solenoid connect-
ed will be hold released. It is applicable only on products that support PWM brake con-
nection. For more details see product’s datasheet. This voltage level is translated in PWM
duty cycle applied on Battery volts. If the value is higher than the battery volts, then the
half value of the battery volts is applied.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Voltage
Type: Unsigned 16-bit
Min:0 Max: 1000
Default: 80 = 8Volts
Where:
cc = Motor channel
nn = Volts*10
Example:
^BHV 2 50: Sets the Hold Voltage level of the brake of motor channel 2 to 5Volts.
Description:
This parameter is used to select the time period for which the Brake Release Voltage is
applied. After this time expires then the Brake Hold Voltage will be applied in order to con-
sume less power. It is applicable only on products that support PWM brake connection.
For more details see product’s datasheet. If the value is set to 0 then only the Brake Hold
Voltage will be applied.
400 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
~BDT
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Delay
Type: Unsigned 16-bit
Min:0 Max: 1000
Default: 500 = 500ms
Where:
cc = Motor channel
nn = Delay in miliseconds
Example:
^BDT 1 200: Sets the Delay Time of the brake of motor channel 1 to 200ms.
Description:
This parameter is used to select which feedback sensor will be used to measure speed or
position. On brushless motors system equipped with optical encoders and/or SSI sensors,
this parameter lets you select either of these two sensors or the brushless sensors (i.e.
Hall, Sin/Cos, or Resolver), as the source of speed or position feedback. Encoders provide
higher precision capture and should be preferred whenever possible. SSI sensors provide
absolute feedback and are preferred in position modes (e.g. steering). The choice “Other”
is also used to select pulse or analog feedback in some position modes.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Sensor
cc = Motor channel
nn =
0: Other feedback (Encoders, SSI sensors, Analog or RC sensors)
1: Brushless sensor feedback (Hall, Sin/Cos, Resolver)
Description:
This parameter controls the stall detection for brushless motors, brushed motors in
closed loop speed mode and induction motors. If no motion is sensed (i.e. counter
remains unchanged) for a preset amount of time while the power applied is above a given
threshold, a stall condition is detected and the power to the motor is cut until the next idle
motor command is given (0 in case of speed modes, equal to feedback in case of position
modes). This parameter allows three combinations of time & power sensitivities. The
setting also applies when encoders are used in closed loop speed or closed loop speed
position modes on brushed or brushless motors.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 3
Default: 2 = 500ms at 25% Power
Where:
cc = Motor channel
nn =
0: Disabled
1: 250ms at 10% Power
2: 500ms at 25% Power
3: 1000ms at 50% Power
Example:
^BLSTD 1 2: Motor will stop if applied power on channel 1 is higher than 10% and no mo-
tion is detected for more than 250ms
402 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
This parameter defines the mechanical system rotating friction coefficient, which is uti-
lized at acceleration feedforward control. When this value is zero, it means that no accel-
eration feedforward control is implemented.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number motors
Argument 2: Value
Type: Unsigned 32-bit
Min: 0 Max: 99,999,000
Where:
cc = Motor channel
nn = Mechanical System rotating friction coefficient ( Nm/(rad/sec)) * 10000000 )
Example:
^BR 1 22500: Configure the mechanical system inertia at 2.25 mNm/(rad/sec).
Description:
This parameter is used to detect large tracking errors due to mechanical or sensor failures,
and shut down the motor in case of problem in closed loop speed or position modes. The
detection mechanism looks for the size of the tracking error and the duration the error is
present. This parameter allows four combinations of time & error level. This parameter is
not compatible with Closed Loop Speed Position mode.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: 4
Where:
cc = Motor channel
nn =
0: Detection disabled
1: 250ms at Error > 100
2: 500ms at Error > 250
3: 1000ms at Error > 500
4: Custom (see FEW and FET for configuration)
Example:
CLERD 1 2: Motor will stop if the loop error of channel 1 is greater than 100 for more than
250ms
Note:
Disabling the loop error can lead to runaway or other dangerous conditions in case of sen-
sor failure
Description:
Set the rate of speed change during deceleration for a motor channel, when a fault takes
place. The faults under which this rate will be used are, Quick Stop, Deadman Switch and
Closed Loop Error. Fault Decceleration value is in 0.1*RPM per second. When using con-
trollers fitted with encoder, the speed and deceleration value are actual RPMs. Brushless
motor controllers use the hall sensor for measuring actual speed and acceleration will also
be in actual RPM/s.
Number of Arguments: 2
Argument 1: Channel Type: Unsigned 8-bit Min: 1 Max: Total Number of Motor Channels
Argument 2: Deceleration Type: Signed 32-bit
404 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Where:
cc = Motor channel
nn = Deceleration time in 0.1 RPM per second
Description:
Defines a maximum count value at which the controller will trigger an action when the
counter goes above that number. This feature is useful for setting up virtual or soft limit
switches .This value, together with the Low Count Limit, are also used in the position
mode to determine the travel range when commanding the controller with a relative
position command. In this case, the High Limit Count is the desired position when a com-
mand of 1000 is received.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: +20000
Where:
cc = Encoder channel
nn = Counter value
Description:
This parameter lets you select what kind of action should be taken when the high limit
count is reached on the encoder. The list of action is the same as in the DINA digital input
action list Embedded in the parameter is the motor channel(s) to which the action should
apply.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = Encoder channel
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
Description:
Contains a value that will be loaded in the selected encoder counter when a home switch
is detected, or when a Home command is received from the serial/USB, or issued from a
MicroBasic script.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: 0
Where:
cc = Encoder channel
nn = Counter value to be loaded
406 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
Defines a minimum count value at which the controller will trigger an action when the
counter dips below that number. This feature is useful for setting up virtual or soft limit
switches. This value, together with the High Count Limit, are also used in the position
mode to determine the travel range when commanding the controller with a relative posi-
tion command. In this case, the Low Limit Count is the desired position when a command
of -1000 is received.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: -20000
Where:
cc = Encoder channel
nn = Counter value
Example:
^ELL 1 -100000 : Set encoder 1 low limit to minus 100000
Description:
This parameter lets you select what kind of action should be taken when the low limit
count is reached on the encoder. The list of action is the same as in the DINA digital input
action list Embedded in the parameter is the motor channel(s) to which the action should
apply.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = Encoder channel
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
Description:
This parameter defines what use the encoder is for. The encoder can be used to set com-
mand or to provide feedback (speed or position feedback). The use of encoder as feedback
devices is the most common. Embedded in the parameter is the motor to which the en-
coder is associated.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Encoders
Argument 2: Use
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = Unused
Where:
cc = Encoder channel
aa =
0: Unused
408 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
1: Command
2: Feedback
mm =
mot1*16 + mot2*32 + mot3*64
Example:
^EMOD 1 18 = Encoder used as feedback for channel 1
Description:
This parameter will set the pulse per revolution of the encoder that is attached to the con-
troller. The PPR is the number of pulses that is issued by the encoder when making a full
turn. For each pulse there will be 4 counts which means that the total number of a count-
er increments inside the controller will be 4x the PPR value. Make sure not to confuse the
Pulse Per Revolution and the Count Per Revolution when setting up this parameter. Enter-
ing a negative number will invert the counter and the measured speed polarity.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Value
Type: Signed 16-bit
Min: -32768 Max: 32767
Default: 100
Where:
cc = Encoder channel
nn = PPR value
Example:
^EPPR 2 200 : Sets PPR for encoder 2 to 200
Description:
This parameter is used in Close Loop Error Detection and sets the time in the Custom
setting of CLERD.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motor Channels
Argument 2: Mode
Type: Unsigned 32-bit
Min: 0 Max:
Default: 500
Where:
cc = Motor channel
nn = value in units
Example:
^FET 2 500: Motor 2 will stop if command - feedback is greater than set units for more
than 500 ms.
Description:
This parameter is used is Close Loop Error Detection and sets the unit number in the Cus-
tom setting of the CLERD.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motor Channels
Argument 2: Mode
Type: Unsigned 16-bit
Min: 0 Max:
Default: 250
Where:
410 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
cc = Motor channel
nn = value in units
Example:
^FEW 2 100: Motor 2 will stop if command - feedback is greater than 100.
Description:
This parameter defines the percentage of the maximum power (stator voltage) to be regu-
lated by the automatic field weakening control. Value equal to 1000 (100%) means that no
field weakening control will be applied.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
where:
cc=Motor channel
nn=Field Weakening Voltage ratio from 750 (75%) to 1000 (100%) range
Example:
^FWVR 1 900: Configure the voltage level for field weakening control at 90% of the maxi-
mum motor output voltage (Power) applied.
Description:
This parameter is the integral cap as a percentage. This parameter will limit maximum
level of the Integral factor in the PID. It is particularly useful in position systems with long
travel movement, and where the integral factor would otherwise become very large be-
cause of the extended time the integral would allow to accumulate. This parameter can
be used to dampen the effect of the integral parameter without reducing the gain. This
parameter may adversely affect system performance in closed loop speed mode as the
Integrator must be allowed to reach high values in order for good speed control.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Cap
Type: Unsigned 8-bit
Min: 1 Max: 100
Default: 100%
Where:
cc = Motor channel
nn = Integral cap in %
Description:
The Speed close-loop output features a slew rate mechanism that limits the rate of
change of the total current command, including the additional speed from acceleration
feedforward control and torque offsets. This helps to smooth the control operation and
prevent sudden changes in current. The slew rate values are expressed in
A/sec *10.
Syntax Serial: ^ISLR cc nn
~ISLR [cc]
Syntax Scripting: setconfig(_ISLR, cc, nn)
Number of Arguments: 2
Where:
cc = Motor channel
nn = rpm/sec
Example: ^ISLR 1 10000: Set the current slew rate to 1000 A/sec or 1A/ms.
Note: The default value is 100. If the value of speed slew rate is 0 the current slew rate is
disabled.
412 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
This parameter defines the mechanical system inertia, which is utilized at acceleration
feedforward control. When this value is zero, it means that no acceleration feedforward
control is implemented.
~JR [cc]
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number motors
Argument 2: Value
Type: Unsigned 32-bit
Min: 0 Max: 99,999,000
Where:
cc = Motor channel
nn = Mechanical System inertia load (kg*m2 * 10000000)
Example:
^JR 1 18500: Configure the mechanical system inertia at 18.5 kg*cm2.
Description:
Sets the PID’s Derivative Gain. The value is set as the gain multiplied by 10^6. This value is
used for both speed and position Derivative gains.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors
Where:
cc (single channel) =
1: Speed Derivative Gain
2: Position Derivative Gain
cc (dual channel) =
1: Speed Derivative Gain for motor 1
2: Speed Derivative Gain for motor 2
3: Position Derivative Gain for motor 1
4: Position Derivative Gain for motor 2
Example:
^KDG 1 1500000: Set motor channel 1 Speed Derivative Gain to 1.5.
Description:
Sets the Current PID’s Integral Gain. The value is set as the gain multiplied by 10^4. On
brushless motor controller operating in sinusoidal mode or ACIM motor controllers, two
gains can be set for each motor channel, in order to control the Flux and Torque current.
On DC brushed controllers or in brushless motor controllers when operating in trapezoidal
mode the gains for the Torque current are used only.
Number of Arguments:
Argument 1: AmpsChannel
Min: 1 Max: 2 * Total Number of Motors
Where:
cc (single channel) =
1: Flux Integral Gain
2: Torque Integral Gain
414 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
cc (dual channel) =
1: Flux Integral Gain for motor 1
2: Flux Integral Gain for motor 2
3: Torque Integral Gain for motor 1
4: Torque Integral Gain for motor 2
nn = Gain * 10,000
Example:
^KIF 1 2300: Set motor channel 1 Flux Integral Gain to 0.23.
Description:
Sets the PID’s Integral Gain. The value is set as the gain multiplied by 10^6. This value is
used for both speed and position integral gains.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors
Where:
cc (single channel) =
1: Speed Integral Gain
2: Position Integral Gain
cc (dual channel) =
1: Speed Integral Gain for motor 1
2: Speed Integral Gain for motor 2
3: Position Integral Gain for motor 1
4: Position Integral Gain for motor 2
Example:
^KIG 1 1500000: Set motor channel 1 Speed Integral Gain to 1.5.
Description:
Sets the Current PID’s Proportional Gain, which is set as the gain multiplied by 10^4. In
ACIM or brushless motor controllers operating in sinusoidal mode, two gains can be set
for each motor channel to control the Flux and Torque current. In contrast, in DC brushed
controllers or brushless motor controllers operating in trapezoidal mode, only the Torque
current gains are used.
Number of Arguments:
Argument 1: AmpsChannel
Min: 1 Max: 2 * Total Number of Motors
Where:
cc (single channel) =
1: Flux Proportional Gain
2: Torque Proportional Gain
cc (dual channel) =
1: Flux Proportional Gain for motor 1
2: Flux Proportional Gain for motor 2
3: Torque Proportional Gain for motor 1
4: Torque Proportional Gain for motor 2
nn = Gain * 10,000
Example:
^KPF 4 2300: Set motor channel 2 Torque Proportional Gain to 0.23.
Description:
Sets the PID’s Proportional Gain. The value is set as the gain multiplied by 10^6. This value
is used for both speed and position proportional gains.
Number of Arguments: 2
416 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Argument 1: Channel
Where:
cc (single channel) =
1: Speed Proportional Gain
2: Position Proportional Gain
cc (dual channel) =
1: Speed Proportional Gain for motor 1
2: Speed Proportional Gain for motor 2
3: Position Proportional Gain for motor 1
4: Position Proportional Gain for motor 2
Example:
Description:
Defines the low pass filter bandwidth applied at speed feedback measurement. Please
note that the filter applies to all feedback sensors except for Hall sensors.
Number of Arguments: 2
where:
cc = Motor channel
nn = Low Pass Filter Bandwidth (Hz)
Example:
^LPFB 1 30 : Set the speed feedback low pass filter bandwidth equal to 30 Hz.
Description:
In BLDC drives, this parameter sets the q-axis motor inductance. This configuration com-
mand is necessary for IPM motor operation, decoupling control and field weakening feed-
forward function. If value is set to 0 then the motor operates as brushless dc motor with
Id reference command set, by default, to 0.
In DC drives, this parameter sets the armature inductance. The armature inductance can
then be used by the sensor and tuning wizard to calculate the Torque PI gains. The param-
eter can be obtained from the motor datasheet.
Number of Arguments: 2
Default: 0
Where:
cc = Motor channel
nn = Q-axis motor inductance in Henry * 1,000,000
Example:
^LQ 1 950 : Set the q-axis motor inductance to 0,000950 H = 950 uH
Description:
Set the rate of speed change during acceleration for a motor channel. This command
is identical to the AC realtime command. Acceleration value is in 0.1*RPM per second.
418 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
When using controllers fitted with encoder, the speed and acceleration value are actual
RPMs. Brushless motor controllers use the internal sensor (Hall, Sin/Cos or Resolver)
for measuring actual speed and acceleration will also be in actual RPM/s. When using
the controller without speed sensor, the acceleration value is relative to the Max RPM
configuration parameter, which itself is a user-provide number for the speed normally
expected speed at full power. Assuming that the Max RPM parameter is set to 1000, and
acceleration value of 10000 means that the motor will go from 0 to full speed in exactly 1
second, regardless of the actual motor speed. If value is set to 0 then the command ramp
is by-passed.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Acceleration
Type: Signed 32-bit
Min: 0 Max: 300000
Default: 10000 = 1000.0 RPM/s
Where:
cc = Motor channel
nn = Acceleration time in 0.1 RPM per seconds
Description:
This parameters sets the number of bits of the multi-turn counter of the SSI sensor.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors
Argument 2: Value
Type: Unsigned 8-bit
Min: 0 Max: 32
Where:
cc = SSI Sensor channel
nn = Multi-turn Counter number of bits
Description:
Set the rate of speed change during deceleration for a motor channel. This command is
identical to the DC realtime command. Decceleration value is in 0.1*RPM per second.
When using controllers fitted with encoder, the speed and deceleration value are actual
RPMs. Brushless motor controllers use the internal sensor (Hall, Sin/Cos or Resolver) for
measuring actual speed and decceleration will also be in actual RPM/s. When using the
controller without speed sensor, the deceleration value is relative to the Max RPM config-
uration parameter, which itself is a user-provide number for the speed normally expected
speed at full power. Assuming that the Max RPM parameter is set to 1000, and deceler-
ation value of 10000 means that the motor will go from full speed to 0 1 second, regard-
less of the actual motor speed. If value is set to 0 then the command ramp is by-passed.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of Motor Channels
Argument 2: Deceleration
Type: Signed 32-bit
Min: 0 Max: 300000
Default: 10000 = 1000.0 RPM/s
Where:
cc = Motor channel
nn = Deceleration time in 0.1 RPM per second
420 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
Configure this parameter in order to change the sensors that will be connected to the
molex connector. In brushless controllers if SSI sensors are used then hall sensor inputs
are re-mapped to the digital input pins, as dictated in the controller model’s datasheet. In
order to have these pins functional as hall inputs pull-up resistors should be added exter-
nally. In brushed controllers if SSI sensors are used then encoder inputs are re-mapped to
the DB16 or DB25 pins as per datasheet.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Hall Input
0: Hall Sensors (not for Brushed Controllers).
1: Encoders (not for Brushless controllers).
2: SSI Encoders
Example:
^MLX 2: Configure Molex to have SSI sensors connected.
Description:
This parameter lets you set the motor direction to inverted or direct.
Where:
cc = Motor Channel
nn = 0: Not inverted
1: Inverted
Description:
This parameter lets you select the operating mode for that channel. See manual for de-
scription of each mode.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 6
Default: 0 = Open loop
Where:
cc = Motor channel
nn =
0: Open-loop
1: Closed-loop speed
2: Closed-loop position relative
3: Closed-loop count position
4: Closed-loop position tracking
5: Closed-loop torque
6: Closed-loop speed position
Example:
^MMOD 1 2: Select Closed loop position relative for channel 1.
Description:
This parameter contains the minimum speed that can be commanded for a motor in
closed loop speed or closed loop speed position modes. See Figure 15-1 for a more de-
tailed description.
422 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Channel
Description:
This parameter sets the position of the first bit of the multi-turn counter inside the SSI
frame.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors
Argument 2: Value
Type: Unsigned 8-bit
Min: 0 Max: 32
Where:
cc = SSI Sensor channel
nn = Multi-turn Counter’s first bit position
Description:
This parameter is the speed at which the motor moves while in position mode. Values are
in RPMs. To change velocity while the controller is in operation, use the !S runtime com-
mand.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Velocity
Type: Signed 32-bit
Min: 0 Max: 30000
Default: 1000 RPM
Where:
cc = Motor channel
nn = Velocity value in RPM
Description:
Selects the mixed mode operation. It is applicable to dual channel controllers and serves
to operate the two channels in mixed mode for tank-like steering. There are 3 possible
values for this parameter for selecting separate or one of the two possible mixed mode
algorithms. Details of each mixed mode is described in Section 7, chapter “Mixed Mode
Select.
Number of Arguments: 1
Argument 1: Mode
Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0 = Separate
424 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Where:
nn =
0: Separate
1: Mode 1
2: Mode 2
Example:
^MXMD 0 : Set mode to separate
Description:
This parameter lets you select the scaling factor for the PWM output, in the forward direc-
tion, as a percentage value. This feature is used to connect motors with voltage rating that
is less than the battery voltage. For example, using a factor of 50% it is possible to con-
nect a 12V motor onto a 24V system, in which case the motor will never see more than
12V at its input even when the maximum power is applied.
Number of Arguments: 2
Argument 1: Channel
Argument 2: MaxPower
Type: Unsigned 8-bit
Min: 25 Max: 100
Default: 100%
Where:
cc = Motor channel
nn = Max Power
Description:
This parameter lets you select the scaling factor for the PWM output, in the reverse direc-
tion, as a percentage value. This feature is used to connect motors with voltage rating that
is less than the battery voltage. For example, using a factor of 50% it is possible to con-
nect a 12V motor onto a 24V system, in which case the motor will never see more than
12V at its input even when the maximum power is applied.
Number of Arguments: 2
Argument 1: Channel
Argument 2: MaxPower
Type: Unsigned 8-bit
Min: 25 Max: 100
Default: 100%
Where:
cc = Motor channel
nn = Max Power
Description:
Commands sent via analog, pulse or the !G command only range between -1000 to
+1000. The Max RPM parameter lets you select which actual speed, in RPM, will be con-
sidered the speed to reach when a +1000 command is sent. In open loop, this parameter
is used together with the acceleration and deceleration settings in order to figure the
ramping time from 0 to full power.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
426 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Description:
This parameter defines the maximum allowed motor output power (P[W] = speed [rad/s]*
torque[Nm]) during the motor’s operation, covering both constant torque and constant
power regions. The motor drive will regulate the motor current based on this parameter. In
both BLDC and brushed DC drives, it is essential to set the Torque constant value correct-
ly for the function to operate as intended.
The value should be set according to the datasheet parameter. If the maximum power is
not directly provided, it can be derived from the motor’s torque-speed curve, by mutiply-
ing the maximum torque with the maximum speed at the maximum power point.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
where:
cc=Motor channel
nn=Maximum Motor Output Power (W) * 10
Example:
^MXPW 1 15000: Configure the maximum motor output power at 1500 W.
Description:
The parameter indicates the number of rotor rotations from the sensor’s user-defined min-
imum to maximum value. It is utilized in Closed Loop Relative and Tracking Position modes
for measuring the rotor’s speed. When using an analog or pulse feedback sensor, the user
must manually set the MSTRN value. However, with other sensors such as AB encoders,
SSI, or Hall sensors, the firmware automatically calculates this value.
For more details, refer to the ‘Closed Loop Relative and Tracking Position Modes’ section.
Parameter calculation indicating table:
Sensor Calculation Mode
Pulse or Analog Measure the number of rotor turns from -1000 to User
+1000 feedback value and set it to the MXTRN
parameter
AB Encoder MXTRN = (EHL-ELL)*100/(EPPR*4) Automatic
Hall MXTRN = (BHL-BLL)*100/(BPOL*6) Automatic
SSI MXTRN = ((SHL-SLL)*100)/(SCPR*SPOL) Automatic
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Turns
Type: Signed 32-bit
Min: 10 Max: 100000
Default: 10000 = 1000.0 turns
Where:
cc = Motor channel
nn = Number of turns * 10
Example:
^MXTRN 1 2000: Set max turns for motor 1 to 200.0 turns
Description:
Set the nominal current of the motor. This is the current that the motor can draw continu-
ously. This value is used for the I2T protection. For more details check chapter “I2T Protec-
tion in SECTION 7.
428 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Where:
cc=Motor channel
nn=Current in Amps*10
Example:
^NOMA 1 100. Set nominal current at 10A.
Note:
Default value is typically set the controller’s continuous amps as defined in the datasheet.
Description:
This voltage gets subtracted to the overvoltage limit to set the voltage at which the over-
voltage condition will be cleared. For instance, if the overvoltage limit is set to 500 (50.0)
and the hysteresis is set to 50 (5.0V), the MOSFETs will turn off when the voltage reach-
es 50V and will remain off until the voltage drops under 45V
Number of Arguments: 1
Argument 1: Voltage
Type: Unsigned 8-bit
Min: 0 Max: 255 = 25.5V
Default: 50 = 5.0V
Where:
nn = Volts *10
Example:
^OVH 45 : Sets hysteresis at 4.5V
Note:
Make sure that overvoltage limit minus hysteresis is above the supply voltage.
Description:
Sets the voltage level at which the controller must turn off its power stage and signal an
Overvoltage condition. Value is in volts multiplied by 10 (e.g. 450 = 45.0V) . The power
stage will turn back on when voltage dips below the Overvoltage Clearing threshold that
is set with the OVH configuration command.
Number of Arguments: 1
Argument 1: Voltage
Type: Unsigned 16-bit
Min: 100 = 10.0V Max: See Product Datasheet
Default: See Product Datasheet
Where:
nn = Volts *10
Example:
^OVL 400 : Set Overvoltage limit to 40.0V
Note:
On firmware versions 1.5 and earlier, no hysteresis exists and the overvoltage condition is
cleared as soon as the voltage dips below the overvoltage limit.
Description:
Sets the Heatsink and Motor Temperature level at which the controller must turn off its
power stage and signal an OverHeat condition. Value is in Celsius degrees. The exact
operation of the protection depends on the operating mode used. See Section 7, chapter
“Temperature-Based Protection” for more details.
Number of Arguments: 2
Where:
cc =
430 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Example:
^OTL 1 75: Set Over temperature limit for Heatsink Temperature to 75 Celsius degrees.
Description:
Set the resistance of the thermistor at 25oC. This value can be derived from the therm-
istor datasheet directly. Check chapter Connecting External Thermistor to Analog Inputs,
SECTION 3 for more details.
~R25 cc
Where:
cc=Motor channel
nn=Resistance in Ohm (Ω)
Example:
^R25 1 1000. Set Resistance of the thermistor at 25oC at 1000Ohm.
Description:
In induction motors, this parameter sets the stator resistance required for the Field-Ori-
ented Control of the motor. The value can be entered by referring to the motor’s data-
sheet or using the motor characterization tool.
In DC motors, this parameter sets the armature resistance and can be configured by con-
sulting the motor’s datasheet. The motor and sensor tuning wizard can then facilitate the
calculation of the Torque PI gains based on this parameter.
Number of Arguments: 2
Default: 0
Where:
cc = Motor channel
nn = Motor phase resistance in Ohm * 1,000
Example:
^RS 1 500 : Set the motor phase resistance to 0,5 Ohm = 500 mOhm
Description:
Set the number of bits of the angle counter of the SSI sensor.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors
Argument 2: Value
432 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Where:
cc = SSI Sensor channel
nn = Angle Counter number of bits
Description:
This parameter will set the frequency of the SSI clock. In case of controllers supporting
more than one SSI sensors, this parameter affects all of them. The necessity of modifying
that parameter exists based on the specifications of the sensor. Sensors with longer data
frame will require quicker clock period, in order to get the full frame within 62,5us, that is
the feedback update period.
Number of Arguments: 1
Argument 1: Value
Type: Unsigned 8-bit
Min: 0 Max: 4 Default: 0
Where:
nn =
0 for 680kHz
1 for 1360kHz
2 for 2720kHz
3 for 5440kHz
4 for 10800kHz
Example:
^SCLK 1: Sets SSI clock to 1360kHz.
Description:
This parameter sets the sensor error detection level. There are three levels of the sensitiv-
ity, Disabled, Tolerant and Strict. If it is configured as disabled then the function is inactive.
when the selected value is Tolerant then the fault will be activated after 5 detected sen-
sor errors (it is reseted when motor command is zero or the direction is reversed). If it is
configured as Strict then the fault will be generated after the first sensor error. For more
details check chapter “Sensor Error Detection” in SECTION 7.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Mode
Default: 2 = Strict
Where
cc= Number of brush-less motor
nn=
0: Disable
1: Tolerant
2: Strict
Description:
This parameter is set when a Safety Brake Switch is connected between the UVW
connectors of the respective controller channel and the motor. Having the Safety Brake
Switch connected there is no need to perform the MOSFET health test since it is per-
formed by it.
434 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of motors
Argument 2: Value
Type: Unsigned 8-bit
Min: 0 Max: 1
Where:
cc = motor channel
nn =
0: Not connected
1: Connected
Description:
Defines a maximum count value at which the controller will trigger an action when the
SSI counter goes above that number. This feature is useful for setting up virtual or soft
limit switches. This value, together with the SSI Sensor Low Count Limit, are also used in
the position mode to determine the travel range when commanding the controller with a
relative position command. In this case, the SSI Sensor High Limit Count is the desired
position when a command of 1000 is received.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI Sensors
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: +20000
Where:
Description:
This parameter lets you select what kind of action should be taken when the high limit
count is reached on the SSI Sensor. The list of action is the same as in the DINA digital
input action list Embedded in the parameter is the motor channel(s) to which the action
should apply.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI Sensors
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = SSI Sensor channel
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
mm = mot1*16 + mot2*32 + mot3*48
Description:
Contains a value that will be loaded in the selected SSI counter when a home switch is
detected, or when a Home command is received from the serial/USB, or issued from a
436 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
MicroBasic script. When the SSI sensor is used as absolute sensor (Absolute feedback),
this value will hold an offset with which the SSI sensor counter is subtracted.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI Sensors
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: 0
Where:
cc = SSI Sensor channel
nn = Counter value to be loaded, or Counter offset.
Description:
This parameters sets the total number of bits of the SSI sensor’s frame. By setting a neg-
ative number it changes the polarity of the angle counter.
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors
Argument 2: Value
Type: Signed 8-bit
Min: -47 Max: 47
Where:
cc = SSI Sensor channel
nn = SSI frame’s number of bits
Description:
Defines a minimum count value at which the controller will trigger an action when the
counter dips below that number. This feature is useful for setting up virtual or soft limit
switches. This value, together with the SSI Sensor High Count Limit, are also used in
the position mode to determine the travel range when commanding the controller with
a relative position command. In this case, the SSI Sensor Low Limit Count is the desired
position when a command of -1000 is received.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Encoders
Argument 2: Value
Where:
cc = SSI Sensor channel
nn = SSI Counter value
Example:
^SLL 1 -100000 : Set SSI Sensor 1 low limit to minus 100000
Description:
This parameter lets you select what kind of action should be taken when the low limit
count is reached on the SSI Sensor. The list of action is the same as in the DINA digital
input action list Embedded in the parameter is the motor channel(s) to which the action
should apply.
438 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI Sensors
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = SSI Sensorchannel
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
mm = mot1*16 + mot2*32 + mot3*64
Description:
This parameter defines what use the SSI Sensor is for. The encoder can be used to set
command or to provide feedback (speed or position feedback). The use of SSI Sensor
as feedback devices is the most common. If absolute Feedback option is set then the
feedback will back the absolute value of the SSI Sensor, which is useful for Closed Loop
Position Modes. Embedded in the parameter is the motor to which the SSI Sensor is as-
sociated.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of SSI Sensors
Argument 2: Use
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = Unused
Where:
cc = SSI Sensor channel
aa =
0: Unused
1: Command
2: Feedback
3: Absolute Feedback
mm = mot1*16 + mot2*32 + mot3*64
Example:
^SMOD 1 19 = Encoder used as absolute feedback for channel 1
Description:
The position close-loop output features a slew rate mechanism that limits the rate of
change of the total speed command, including the additional speed from velocity feedfor-
ward control and speed offsets. This helps to smooth the control operation and prevent
sudden changes in speed. The slew rate values are expressed in rpm/second.
Number of Arguments: 2
Argument 1: Channel Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = rpm/sec
Example:
^SSLR 1 10000: Set the speed slew rate to 10000 rpm/sec.
Note: Default value is 10000. If the value of speed slew rate is 0 the speed slew rate is
disabled.
Description:
This parameter sets the position of the first bit of the angle counter inside the SSI frame.
440 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Number of Arguments: 2
Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors
Argument 2: Value
Type: Unsigned 8-bit
Min: 0 Max: 32
Where:
cc = SSI Sensor channel
nn = Angle Counter’s first bit position
Description:
This configuration parameter sets the level for the short circuit detection sensitivity. There
are 3 sensitivity levels from 0 to 2.
Number of Arguments: 1
Argument 1: Threshold Type: Unsigned 8-bit Min: 0 Max: 2 Default: 0 = High Sensitivity
Where:
nn =
0: High sensitivity
1: Medium sensitivity
2: Low sensitivity
Example:
^THLD 1 : Set short circuit detection sensitivity to medium.
Description:
This configuration parameter sets the motor torque constant. It is a value with which we
can convert the peak motor current (A) to torque (NM) and vice versa. This value is in mil-
iNm/Amps and is usually referred in the motor datasheets. The conversion is used by the
TC and TSL commands and TRQ query.
Note: In the motor torque constant, the peak amplitude of motor current is considered,
not the RMS motor current value.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor Torque Constant (miliNm/Amps)
Example:
^TNM 1 1523: Set torque constant for motor 1 to 1.523 Nm/Amps.
Description:
Set the maximum time that motor can handle the maximum current as configured in the
ALIM configuration command. This value is used for the I2T protection. For more details
check chapter “I2T Protection in SECTION 7. If set to 0 I2T protection is disabled.
442 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations
Where:
cc=Motor channel
nn=Time in seconds
Example:
^TPAL 1 5. Set maximum time the motor can handle ALIM Amps at 5 seconds.
Description:
Sets the voltage below which the controller will turn off its power stage. The voltage is
entered as a desired voltage value multiplied by 10. Undervoltage condition is cleared as
soon as voltage rises above the limit.
Number of Arguments: 1
Argument 1: Voltage
Type: Unsigned 16-bit
Min: 50 = 5.0V Max: Max Voltage in Product
Datasheet
Default: 50 = 5.0V
Where:
nn = Volts *10
Example:
^UVL 100 : Set undervoltage limit to 10.0 V
Description:
This parameter sets the Velocity Feedforward gain for BLDC and brushed DC motor
drives. The gain value is expressed in x 1000 units.
Where:
cc = Motor channel
nn = value x 1000
Example:
^VELFF 1 1000: Set the velocity feedforward gain of channel 1 to 1.
444 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Description:
When being in sinusoidal mode and Sin/Cos, Resolver or SSI feedback sensors are used
or in Hall+Encoder Trapezoidal mode, this configuration command stores results of auto-
matic zero degrees angle search after performing the Motor/Sensor Setup (%clmod 2/3 or
!mss 1/2). The angle represents the mechanical offset between the sensor’s zero position
and the rotor’s zero position. The value is in electrical degrees ranging from 0 to 511 for a
full electrical turn. The value can then be fine tuned manually.
Number of Arguments:
Argument 1: Channel
Argument 2: Angle
Type: Signed 16-bit
Min: -511 Max: 511
Default: 0
Where:
cc = Motor channel
nn = Angle
Example:
^BADJ 1 220 : Manually set the zero to 220 degrees
Description:
When operating in sinusoidal mode, this parameter shifts by number of degrees to the 3
phases rotating magnetic field. This value works symmetrically to produce the same re-
sults in both rotation direction. The value is in electrical degrees ranging from 0 to 511 for
a full electrical turn.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value
Type: Signed 16-bit
Min: -511 Max: 511
Default: 0
Where:
cc = Motor channel
nn = Angle
Example:
^BADV 1 20 : Advance motor 1 timing by 20 degrees
Description:
Selects the type of rotor angle sensor to be used for brushless motors when operated in
sinusoidal mode.
Number of Arguments:
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Sensor
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: 0 = Encoder
Where:
cc = Motor channel
nn =
0: Encoder
1: Hall
2: Hall + Encoder
3: SPI/SSI sensor
4: Sin/Cos sensor
5: Resolver
446 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Description:
This parameter allows you to define a minimum Internal Sensor count value at which the
controller will trigger an action when the counter rises above that number. This feature is
useful for setting up virtual or soft limit switches. This value, together with the respective
Min Limit, are also used in the position mode to determine the travel range when com-
manding the controller with a relative position command. In this case, the Max Limit is
the desired position when a command of 1000 is received.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: +2147M
Default: 20000
Where:
cc = Motor channel
nn = Counter value
Example:
^BHL 1 10000: Set brushless Internal Sensor Max Limit of channel 1 to 10000 counts
Note:
Counter is not an absolute position. A homing sequence is necessary to set a reference
position.
Description:
This parameter lets you select what kind of action should be taken when the max limit
is reached on the Internal Sensor counter. The list of action is the same as in the DINA
digital input action list. Embedded in the parameter is the motor channel(s) to which the
action should apply.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motor
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = Motor channel
aa =
0 : No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
Example:
^BHLA 1 36 : Forward limit switch for motor 2 (4 + 32)
Description:
This parameter contains a value that will be loaded in the internal sensor counter when a
home switch is detected, or when a Home command is received from the serial/ USB, or
issued from a MicroBasic script.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: +2147M
Default: 0
448 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Where:
cc = Motor channel
nn = Counter value to be loaded
Example:
^BHOME 1 10000 : load Internal Sensor counter with 10000 when Home command is
received
Note:
Change counter only while in open loop if brushless counter is used for speed or position
feedback
Description:
This parameter defines a minimum Internal Sensor count value at which the controller
will trigger an action when the counter dips below that number. This feature is useful for
setting up virtual or soft limit switches. This value, together with the respective Max Limit,
are also used in the position mode to determine the travel range when commanding the
controller with a relative position command. In this case, the Min Limit is the desired posi-
tion when a command of -1000 is received.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: +2147M
Default: -20000
Where:
cc = Motor channel
nn = Counter value
Example:
^BLL 1 -10000 : Set motor 1 Internal Sensor min limit to -10000 counts
Note:
Counter is not an absolute position. A homing sequence is necessary to set a reference
position.
Description:
This parameter lets you select what kind of action should be taken when the min limit is
reached on the Internal Sensor counter. The list of action is the same as in the DINA digital
input action list. Embedded in the parameter is the motor channel(s) to which the action
should apply.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:
cc = Motor channel
aa =
0: No action
1: Quick stop
2: Emergency stop
3: Motor stop
4: Forward limit switch
5: Reverse limit switch
6: Invert direction
7: Run MicroBasic script
8: Load counter with home value
Example:
^BLLA 1 37 : Reverse limit switch for motor 2 (5 + 32)
Description:
Selects the switching mode when controlling brushless motors. Additional settings apply
for each mode.
450 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Number of Arguments: 2
Argument 1: Channel
Argument 2: Mode
Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0 = Trapezoidal
Where:
cc = Motor channel
nn =
0: Trapezoidal
1: Sinusoidal
Note:
After changing this setting, the motor will perform a reference searched when selecting
sinusoidal mode with encoder feedback.
Description:
This parameter is used to define the number of pole pairs of the brushless motor con-
nected to the controller. This value is used to convert the hall sensor transition counts into
actual RPM and number of motor turns. Entering a negative number will invert the count-
er and the measured speed polarity.
Number of Arguments: 2
Argument 1: Channel
cc = Motor channel
Description:
This parameter selects the Hall sensor spacing in the motor. Practically all brushless mo-
tors use Hall sensors with 120 degrees spacing. Some motors have Hall sensors with 60
degrees. Change this parameter only if the motor’s manual clearly specifies 60 degrees
spacing.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Where:
cc = Motor channel
nn = Hall Sensor Position
0: 120degree
1: 60degree
Example:
^HPO 1 1: Configure that the Hall Sensor of motor 1 are spaced by 60 degrees.
Description:
This parameter is calculated automatically during the motor sensor setup when Hall Sinu-
soidal or Hall+Encoder Sinusoidal is configured. It represents the electrical angle (range
0-512) at each hall transition at each direction.
452 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Number of Arguments: 2
Where:
cc = Input Value
1: Hall Transition 5-1 for motor channel 1
2: Hall Transition 3-2 for motor channel 1
3: Hall Transition 1-3 for motor channel 1
4: Hall Transition 6-4 for motor channel 1
5: Hall Transition 4-5 for motor channel 1
6: Hall Transition 2-6 for motor channel 1
7: Hall Transition 3-1 for motor channel 1
8: Hall Transition 6-2 for motor channel 1
9: Hall Transition 2-3 for motor channel 1
10: Hall Transition 5-4 for motor channel 1
11: Hall Transition 1-5 for motor channel 1
12: Hall Transition 4-6 for motor channel 1
13: Hall Transition 5-1 for motor channel 2
...
24: Hall Transition 4-6 for motor channel 2
nn = Electrical Angle
Example:
^HSAT 1 452: Set the electrical angle 452 for the hall transition 5-1 for motor channel 1.
Description:
Configure this parameter to match the ABC hall sensor cable pattern with the UVW mo-
tor windings wire pattern connected to the controller. For each hall sensor cable order
and motor wire order, there are 6 combinations, one of which will make the motor spin
smoothly and efficiently in both directions. Try each of the 6 available values of HSM (0-
5) and retain the one that will make the motor spin in both directions while drawing the
same low current. Applicable only in Hall Trapezoidal mode.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor’s Hall Sensor Map
Example:
^HSM 1 1: Set Hall Sensor Map for motor 1 to value 1.
Description:
Set the d-axis motor inductance. This configuration command is necessary for IPM motor
operation, decoupling control and field weakening feedforward function If value is set
to 0 then the motor operates as brushless dc motor with Id reference command set, by
default, to 0.
Number of Arguments: 2
454 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Default: 0
Where:
cc = Motor channel
nn = D-axis motor inductance in Henry * 1,000,000
Example:
^LD 1 750 : Set the d-axis motor inductance to 0,000750 H = 750 uH
Description:
When being in sinusoidal mode and Sin/Cos or Resolver feedback sensors are used,
this configuration command defines the Phase Shift Angle between the Sin and Cos sig-
nals. The value is in degrees ranging from 0 to 511. If the sensor is a regular Sin/Cos or
Resolver Sin/Cos sensor, the phase shift angle is 90o degrees, so we need to configure
90*512/360 = 128. If not then the sensor manufacturer should inform about the phase
shift angle.
Number of Arguments:
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Angle
Type: Signed 16-bit
Min: -511 Max: 511
Default: 128
Where:
cc = Motor channel
nn = Angle
Example:
^PSA 1 171 : Set the phase shift angle to 171*360/512 = 120o degrees.
Description:
Number of pole pairs of the Sin/Cos, Resolver or SSI angle sensor used in sinusoidal
mode with brushless motors.
Number of Arguments: 2
Argument 1: Channel
Argument 2: Number
Type: Unsigned 8-bit
Min: 1 Max: 255
Default: 1
Where:
cc = Motor channel
nn = Number of pole pairs
Description:
The concept of swap windings (can also be termed as sensor polarity) is a relative rela-
tionship between sensor direction and stator magnetic field rotational direction. During
calibration if angle, reported by the sensor, is changing in same direction as angle com-
manded to the stator then Swap Windings should be “None”, else “Swapped”.
In case of Hall + Encoder, two different Swap Windings are needed, one for hall and one
for encoder. So, instead we use 2 bits of same variable Bit 1 for Hall and Bit 0 for Encoder.
The following table shows the truth table for swap windings
0 0 0 NO NO None
1 0 1 NO YES Swapped
456 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
~ SWD [cc]
Number of Arguments: 2
Argument 1: Channel
Min: 0 Max: 3
Default: 0
Where:
cc = Motor channel
nn = Motor’s Swap Windings
0: None, Angle up-counting for clockwise direction
1: Swapped, Angle down-counting for clockwise direction
2:Hall only Swapped, Angle up-counting for clockwise direction for encoder and Angle
down-counting for clockwise direction for Hall sensor.
3:Hall+Encoder Swapped, Angle down-counting for clockwise direction for encoder and
Angle down-counting for clockwise direction for Hall sensor.
Example:
Description:
In brushless motors operating in sinusoidal mode, this command sets the desired Flux
(also known as Direct Current Id) for Field Oriented Control. This value must be 0 in typical
application. A non-zero value creates field weakening and can be used to achieve higher
rotation speed.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Amps
Type: Signed 32-bit
Min: 0
Default: 0
Where:
cc = Motor Channel
nn = Amps * 10
Description:
Set the motor voltage constant. This parameter is necessary for IPM motor operation,
decoupling control and field weakening feedforward function. This constant considers
the peak amplitude of induced phase to phase motor back-emf per 1000 rpm mechanical
speed. It is typically included in motor manufacturer’s datasheet.
Number of Arguments: 2
Default: 0
Where:
cc = Motor channel
nn = Motor voltage constant in V/krpm * 1000
458 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Example:
^VK 1 14000 : Set the motor voltage constant to 14 V/krpm
Description:
This parameter contains the amplitude of the Cosine signal (SinCos sensor), which along
with the values of ZSMC is used in order to calculate the signal quality (see SEC - Read
Sensor Errors).
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value
Type: Signed 16-bit
Where:
cc = Channel
nn = Calibration Value
Example:
^ZSMA 2 1800: Set the amplitude of the Cos signal of the SinCos sensor of motor 2 to
1800.
Description:
This parameter contains Sin/Cos calibration values that are captured after the execution of
the Motor/Sensor Setup. Values are not to be altered manually. When non-zero values are
returned after querying ZSMC, this indicates that the setup has been successfuly com-
pleted at one time or another.
Number of Arguments:
Argument 1: InputNbr
Min: 1 Max: 6
Argument 2: Value
Type: Signed 16-bit
Where:
cc =
1: Sin Zero Point for motor 1
2: Cos Zero Point for motor 1
3: SinCos Ratio for motor 1
4: Sin Zero Point for motor 2
5: Cos Zero Point for motor 2
6: SinCos Ratio for motor 2
nn = Calibration value
Description:
For AC Induction motors this parameter selects the operating mode.
460 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Number of Arguments:
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Sensor
Type: Unsigned 8-bit
Min: 0 Max: 4
Default: 0 = Volts Per Hertz
Where:
cc = Motor channel
nn =
0: Volts Per Hertz
1: Constant Slip Speed
2: FOC Torque
3: FOC Speed
Description:
This parameter enables the EPL mode.
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Status
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Disabled
where:
cc = Motor channel
nn =
0: Diasbled
1: Enabled
Description:
This parameter is only used for AC Induction controller when operating in FOC mode and
contains the resistance per phase of the rotor. This value can be obtained from the motor
supplier or from Tuning Wizard - Motor Characterization stage.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor’s Rotor Resistance in milli-ohm.
Example:
^IRR 1 245: Set Rotor Resistance of motor 1 to value 245 mOhm.
LS – Stator Inductance
HexCode: 136 CANOpen id: 0x3136
Description:
This parameter is used in AC induction drives operating in FOC mode. It represents the
stator inductance of the motor, including stator leakage and magnetizing inductances
and can be estimated by using the motor characterization wizard or calculated from the
motor’s T model by adding the motor’s stator leakage inductance (Lls) and magnetizing
inductance (Lm).
462 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: number of motors
where:
cc = Motor channel
nn = Stator Inductance in Henry * 1,000,000
Example: ^Ls 1 2817: Set the stator inductance of motor 1 to value 0,002817 H = 2817
uH.
Description:
This parameter is only used for AC Induction controllers when operating in Volts per Hertz
mode. It defines a minimum PWM output value so that there is always a minimal of rotor
flux to create induction.
~MPW [cc]
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor’s Minimum Power in % of PWM Level
Example:
^MPW 1 200: Set Minimum Power for motor 1 to value 20.0% PWM Level.
Description:
This parameter is used in the constant slip mode of induction motors. The drive will main-
tain a slip in the motor equal to half the value of the maximum slip parameter.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor’s Maximum Slip Frequency in Hertz * 10
Example:
Description:
This parameter is used in Induction motors to set the motor Peak Torque parameter in
Nm x1000. The Peak Torque value is used to define the maximum motor torque limit. This
parameter is also used when issuing a torque command with the G command, where the
command value is one-thousandth of the peak torque.
464 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
Argument 1: Channel
Min: 1 Max: number of motors
where:
cc = Motor channel
nn = Peak torque value in Nm x1000.
Example: ^PTRQ 1 15390: Sets the peak torque parameter to 15.39 Nm.
Description:
This parameter is only used for AC Induction controller. This value is the stator current
component (Id) for rotor flux production when FOC modes are selected.
Number of Arguments: 2
Argument 1: Channel
Where:
cc = Motor channel
nn = Motor’s Rotor Flux Current in Amps * 10
Example:
^RFC 1 50: Set Rotor Flux Current for motor 1 to value 5A.
Description:
This configuration is induction motor related and expresses the rated synchronous stator
frequency in Hz x10. This parameter is used by the motor characterization wizard to esti-
mate the motor parameters.
Argument 1: Channel
Min: 1 Max: number of motors
where:
cc = Motor channel
nn = Rated frequency in hertz x10
Example: ^RTFR 1 1000: Set the rated frequency of motor 1 to 100 Hz.
Description:
This parameter is used in Induction motors to set the rated motor torque in Nm x1000.
The rated motor torque is used by the motor characterization tool to estimate the motor
parameters.
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: number of motors
where:
466 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands
cc = Motor channel
nn = Rated torque
Example: ^RTRQ 1 7320: Set the rated torque of motor 1 to 7.32 Nm.
Description:
This parameter is used in AC induction drives operating in FOC mode. It represents the
total leakage inductance of the motor (σLs) and can be estimated by using the motor
characterization wizard. Alternatively, it can be approximated by adding the stator leakage
inductance (Lls) and rotor leakage inductance (Llr). These values can be obtained from the
motor’s T model provided by the motor supplier.
Argument 1: Channel
Min: 1 Max: number of motors
where:
cc = Motor channel
nn = Leakage Inductance in Henry * 1,000,000
Example: ^SLS 1 356: Set the total leakage inductance of motor 1 to value 0.000356 H =
356 uH.
Description:
This parameter is used in Induction motors to set the static friction motor torque coef-
ficient. The parameter is used by the motor characterization tool to estimate the motor
parameters. If the parameter is unknown, it can be left with the default value. The value is
expressed as per thousand of the rated torque. Syntax Serial: ^STRQ cc nn
~STRQ cc
Argument 1: Channel
Min: 1 Max: number of motors
Argument 2: Static friction torque coefficient expressed as per thousand of the rated
torque.
Type: Unsigned 8-bit
where:
cc = Motor channel
nn = Static friction torque coefficient
Example: ^STRQ 1 60: Sets the static torque friction coefficient to 6% of the motor rated
torque.
Description:
This parameter is only used for AC Induction controllers. Each motor has as specification a
Volts per Hertz value with which the frequency can be determined when specific voltage
is applied.
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: VoltsPerHz
Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 20000
Where:
cc = Motor channel
nn = Motor’s Volts per Hertz * 1000
Example:
^VPH 1 200: Set Volts per Hertx to value 0.200
468 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Description:
Determines if device is an active CANOpen node at power up. When set, node is in oper-
ational state at power up without the need to receive a start command.
Number of Arguments: 1
Argument 1: Rate
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Off
Where:
nn =
0: Device is in pre-operational state at power-up.
1: Device is in operational state at power up.
Description:
Sets the CAN bus bit rate.
Number of Arguments: 1
Argument 1: BitRate
Type: Unsigned 8-bit
Min: 0 Max: 5
Default: 3 = 250K
Where:
nn =
0: 1000K
1: 800K
2: 500K
3: 250K
4: 125K
Description:
Enables CAN and selects the CAN protocol.
Number of Arguments: 1
Argument 1: Mode
Type: Unsigned 8-bit
Min: 0 Max: 5
470 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Where:
nn =
0: Disabled
1: CANOpen
2: MiniCAN
3: RawCAN
4: RoboCAN
5: MiniJ1939
Description:
Configures the guard time and life time factor for CANOpen node guarding protocol.
Arguments 2
Argument 1: Option [1: guard time, 2: life time factor]
Argument 2: Value
Type: Unsigned 16-bit
Min: 0
Max: 65535 for guard time, 255 for life time factor
Example:
^CGT 1 1000_^CGT 2 5. Set guard time to 5000 ms (5 * 1000).
Description:
Sets the rate in milliseconds at which the controller will send a heartbeat frame on the
CAN bus. Heartbeat is sent when either MiniCAN, RawCAN, CANOpen are selected. A
dedicated, non-user-alterable Heartbeat frame is sent when RoboCAN is selected.
Number of Arguments: 1
Argument 1: HeartBeat
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 100ms
Where:
nn = Heartbeat rate in ms
Description:
An attempt to configure several heartbeat times unequal 0 for the same node-ID the con-
troller will respond with SDO abort code.
Number of Arguments: 2
Argument 1: Index
Type: Unsigned 8-bit
Min: 1 Max: 4, as controller supports monitoring up to 4 nodes.
Argument 2: Value
Type: Unsigned 32-bit
Min: 0 Max: 0x7FFFFF
Where:
cc=Monitoring Node
nn=Node in most significant 4 bytes and Hearbeat Time in less significant 4 bytes
Example:
^CHBT 1 133072 Monitor node 2 with heartbeat time of 2000ms (0x07D0). 133072d =
0207D0h.
472 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Description:
This configuration is used in order to configure the action to be applied on motors once
the consumer heartbeat gets lost. If this happens then the command watchdog will
expire. Apart from that it can be configured whether Quick stop or emergency will be ap-
plied additionally to the motor.
Where:
nn =
0: No Action
1: Quick Stop
2: Emergency Stop
Description:
In RawCAN and MiniCAN mode, this parameter filters the incoming frames in order to
capture only these originating from a given node address. In RawCAN, entering 0 disables
the filter and will cause all incoming frames to be captured.
Number of Arguments: 1
Argument 1: Address
Type: Unsigned 8-bit
Min: 0 Max: 127
Default: Product dependent
Where:
nn =
0: Listen to all nodes (RawCAN only)
1-127: Capture frames from specific node id only
Description:
Stores the product’s ID on the CAN bus.
Number of Arguments: 1
Argument 1: Address
Type: Unsigned 8-bit
Min: 0 Max: 127
Default: See datasheet
Where:
nn = Node address
Description:
Rate, in ms, at which MiniCAN frames are sent.
Number of Arguments: 1
Argument 1: Rate
Type: Unsigned 8-bit
Min: 0 Max: 65536
Default: 100ms
Where:
nn = Rate in ms. No frames sent. if value is 0
474 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Description:
Sets the send rate for each of the 8 TPDOs when CANOpen is enabled.
Number of Arguments: 2
Argument 1: TPDOnbr
Min: 1 Max: 8
Argument 2: Rate
Type: Unsingned 16-bit
Min: 0 Max: 65536
Default: 0 = Off
Where:
nn = TPDO number, 1 to 8
mm = Rate in ms
Note:
If mm = 0, the TPDO is not transmitted
Description:
Sets the transmission type of the respective TPDOs.
Number of Arguments: 2
Argument 1: TPDOnbr
Min: 1 Max: 8
Where:
nn = TPDO number, 1 to 8
mm = Transmission Type
Description:
Enables EtherCAT and selects operating mode.
Number of Arguments: 1
Argument 1: Mode
Type: Unsigned 8-bit
Min: 0 Max: 3
Default: 0
Where:
nn =
0: Disabled
1: Polling
2: Sync Manager
3: Distributed Clock
Description:
It is applied to the Sync Manager and Distributed Clocks modes and should be used for
configuring Sync Manager and DC mode (synchronous with SYNC0 event). For Sync
Manager it sets the slave’ s cycle time (PDI ISR). For DC mode (synchronous with SYNC0
event) it sets the cycle time and the SYNC0 event cycle time (SYNC0 event). Values are in
millisecond (ms).
Number of Arguments: 1
476 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Argument 1: Time
Type: Unsigned 16-bit
Min: 0 Max: 4294
Default: 4
Where:
nn = Cycle time (ms)
Description:
Configures the explicit slave device identification. It is useful for distinguishing identical
devices in the same network.
Number of Arguments: 1
Argument 1: ID
Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 5
Where:
nn = Explicit Slave Device ID
Description:
Enables or disables the PDS Finite State Automation (FSA), as dictated in DS402 specifi-
cation.
Number of Arguments: 1
Argument 1: Mode
Type: Unsigned 8-bit
Min: 0 Max:1
Default: 0 = Off
Where:
nn =
0: FSA is inactive.
1: FSA is active.
Description:
Sets the COB-ID of the respective RPDOs. If it is 0 then the default value for each RPDO
is set:
RPDO1: 0x200 + Node ID
RPDO2: 0x300 + Node ID
RPDO3: 0x400 + Node ID
RPDO4: 0x500 + Node ID
RPDO5-8: disabled
Number of Arguments: 2
Argument 1: RPDO Item Type:Unsigned 8-bit Min: 1 Max:8
Argument 2: COB-ID Type:Unsigned 32-bit
Where:
nn = RPDO number, 1 to 8
mm = COB-ID
Description:
Sets the mapping of the respective RPDOs. Each value represents one mapped item and
there are 8 items fr each RPDO. The value holds the index, the subindex and the length of
the item.
478 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands
Number of Arguments: 2
Argument 1: RPDO Item Type:Unsigned 8-bit Min: 1 Max:64
Argument 2: Mapped Item Type:Unsigned 32-bit
Where:
nn=
1: Mapped item 1 for RPDO 1
2: Mapped item 2 for RPDO 1
...
8: Mapped item 8 for RPDO 1
9: Mapped item 1 for RPDO 2
...
16: Mapped item 8 for RPDO 2
17: Mapped item 1 for RPDO 3
...
64: Mapped item 8 for RPDO 8
Example: Map Set motor command for channel 2 as first map item of RPDO 2.
Object with index 0x2000, subindex 0x2 and length 4 bytes
mm = (0x2000 << 16) + (0x2 << 8) + 4 = 0x20000204 = 536871428
^RPDM 10 536871428
Description:
Sets the COB-ID of the respective TPDOs. If it is 0 then the default value for each RPDO
is set:
TPDO1: 0x180 + Node ID
TPDO2: 0x280 + Node ID
TPDO3: 0x380 + Node ID
TPDO4: 0x480 + Node ID
TPDO5-8: disabled
Number of Arguments: 2
Argument 1: TPDO Item Type:Unsigned 8-bit Min: 1 Max:8
Argument 2: COB-ID Type:Unsigned 32-bit
Description:
Sets the mapping of the respective TPDOs. Each value represents one mapped item and
there are 8 items fr each TPDO. The value holds the index, the subindex and the length of
the item.
Number of Arguments: 2
Argument 1: TPDO Item Type:Unsigned 8-bit Min: 1 Max:64
Argument 2: Mapped Item Type:Unsigned 32-bit
Where:
nn=
1: Mapped item 1 for TPDO 1
2: Mapped item 2 for TPDO 1
...
8: Mapped item 8 for TPDO 1
9: Mapped item 1 for TPDO 2
...
16: Mapped item 8 for TPDO 2
17: Mapped item 1 for TPDO 3
...
64: Mapped item 8 for TPDO 8
Example: Map Read Encoder Motor Speed for channel 1 as second map item of TPDO 1.
Object with index 0x2103, subindex 0x1 and length 4 bytes
mm = (0x2103 << 16) + (0x1 << 8) + 4 = 0x21030104 = 553844996
^TPDM 2 553844996
480 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
TCP Communication Commands
This section describes all the configuration parameters uses for TCP operation.
Description:
Configure this parameter in order to enable the DHCP. The default value for DHCP service
is disabled. When DHCP is Disabled the user configured IP address is used by the control-
ler to access the network. By enabling DHCP service, the controller uses the IP address
provided by the DHCP server.
Number of Arguments: 1
Where:
nn = Enable DHCP
0: Disabled.
1: Enabled.
Example:
^DHCP 1: Enable DHCP.
Description:
Configure this parameter in order to set the Gateway Address of your controller’s net-
work. Gateway Address option includes 4 values representing each octet in the IP ad-
dress v4 format. The default Gateway Address value is 192.168.1.1.
Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4
Where:
cc = octet
nn = octet value
Example:
^GWA 1 192_^GWA 2 168_^GWA 3 2_^GWA 4 1: Set Gateway Address 192.168.2.1.
IPA - IP Address
HexCode: 68 CANOpen id: 0x3068
Description:
Configure this parameter in order to set the IP Address. IP Address option includes 4 val-
ues representing each octet in the IP address v4 format. The default IP address, if DHCP
is disabled, is 192.168.1.20.
482 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
TCP Communication Commands
Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4
Argument 2: IP Address
Type: Unsigned 8-bit
Min: 0 Max: 255
Default:
Where:
cc = octet
nn = octet value
Example:
^IPA 1 192_^IPA 2 168_^IPA 3 1_^IPA 4 100: Set IP Address 192.168.1.100.
IPP - IP Port
HexCode: 6B CANOpen id: 0x306B
Description:
Configure this parameter in order to set the IP Port. Default IP Port value is 9761. The IP
address combined with the IP Port value are used to connect to the controller.
Number of Arguments: 1
Argument 1: IP Port
Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 9761
Where:
nn = IP Port
Example:
^IPP 1300: Set IP Port 1300.
Description:
Configure this parameter in order to set the address of the primary DNS server. Primary
DNS option includes 4 values representing each octet in the IP address v4 format. Prima-
ry DNS server default address is 192.168.1.1.
Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4
Where:
cc = octet
nn = octet value
Example:
^PDNS 1 192_^PDNS 2 168_^PDNS 3 2_^PDNS 4 1: Set Primary DNS 192.168.2.1.
Description:
Configure this parameter to set the Subnet Mask to define the range of IP addresses that
can be used in your network. Subnet Mask option includes 4 values representing each
octet in the IP address v4 format. Devices within the same sub-network can communi-
cate directly. Using the default subnet mask, all devices with the first 3 bytes identical
are located in the same sub-network and almost 256 (not all 256 values may be used as
484 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
TCP Communication Commands
a host IP) unique host devices may be used in the network. Subnet Mask option includes
4 values representing each octet in the IP address. The default Subnet Mask value is
255.255.255.0.
Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4
Where:
cc = octet
nn = octet value
Example:
^SBM 1 255_^SBM 2 255_^SBM 3 254_^SBM 4 0: Set Gateway Address
255.255.254.0.
Description:
Configure this parameter to set the address of the secondary DNS server. Secondary
DNS option includes 4 values representing each octet in the IP address v4 format. Sec-
ondary DNS server default address is 0.0.0.0. By setting the secondary DNS server to
0.0.0.0 then automatically a secondary DNS server address is assigned. Since the sec-
ondary server address is a backup, there is no need to be configured, unless necessary.
Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4
Where:
cc = octet
nn = octet value
Example:
^SDNS 1 192_^SDNS 2 168_^SDNS 3 2_^SDNS 4 1: Set Secondary DNS 192.168.2.1.
Description:
Configure this parameter to enable the TCP functionality. When the TCP mode is set as
Disabled the Ethernet port is idle and no data packets are being transmitted or received.
To communicate via TCP/IP this parameter must be set to Enabled. For communicating via
Modbus TCP or Modbus TCP over RTU, TCP Mode must be set to Enabled.
Number of Arguments: 1
Argument 1: TCP Mode
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0
486 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
TCP Communication Commands
Where:
nn = TCP Mode
0: Disabled.
1: Enabled.
Example:
^WMOD 1: Enable TCP functionality.
488 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024