0% found this document useful (0 votes)
406 views264 pages

Roboteq Controllers User Manual v3.2-225-488

The document outlines the various command types accepted by a motor controller, categorized into Runtime commands, Runtime queries, Maintenance commands, and Configuration commands. Each command type has specific syntax and functions, with examples provided for clarity. The document serves as a reference for users to understand how to interact with the controller through serial communication and MicroBasic scripting.

Uploaded by

jayesh Kothari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
406 views264 pages

Roboteq Controllers User Manual v3.2-225-488

The document outlines the various command types accepted by a motor controller, categorized into Runtime commands, Runtime queries, Maintenance commands, and Configuration commands. Each command type has specific syntax and functions, with examples provided for clarity. The document serves as a reference for users to understand how to interact with the controller through serial communication and MicroBasic scripting.

Uploaded by

jayesh Kothari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 264

Commands Types

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.).

Advanced Digital Motor Controller User Manual 225


Commands Reference

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.

TABLE 15-1. Runtime Commands


Command Arguments Description
AC Channel Acceleration Set Acceleration
AX Channel Acceleration Next Acceleration
B VarNbr Value Set User Boolean Variable
BRK Channel Value Brake Override
C Channel Value Set Encoder Counters
CB Channel Value Set Internal Sensor Counter
CIG PID Channel Gain Set Current Integral Gains
CG Channel Value Set Motor Command via CAN
CPG PID Channel Gain Set Current Proportional Gains
CS Element Value CAN Send
CSS Channel Value Set SSI Sensor Counter
CU Element Value Raw Redirect Send
D0 OutputNbr Reset Individual Digital Out bits
D1 OutputNbr Set Individual Digital Out bits
DC Channel Deceleration Set Deceleration
DG PID Channel Gain Set PID Derivative Gains
DS Value Set all Digital Out bits
DX Channel Value Next Decceleration
EES None Save Configuration in EEPROM
EX None Emergency Shutdown
G Channel Value Go to Speed or to Relative Position
GIQ Channel Value Go to Torque Amps
GID Channel Value Go to Flux Amps
H Channel Load Home counter
IG PID Channel Gain Set PID Integral Gains
MG None Emergency Stop Release and Fault Clearance
MS Channel Stop in all modes
MSS Channel Motor Sensor Setup

226 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

Command Arguments Description


P Channel Destination Go to Absolute Desired Position
PG PID Channel Gain Set PID Proportional Gains
PR Channel Delta Go to Relative Desired Position
PRX Channel Delta Next Go to Relative Desired Position
PX Channel Delta Next Go to Absolute Desired Position
QST Channel Value Quick Stop
R [Option] MicroBasic Run
RST Channel Value Resets the drive
S Channel Value Set Motor Speed
STT None STO Self-Test
SX Channel Value Next Velocity
VAR VarNbr Value Set User Variable

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.

Syntax Serial: !AC cc nn

Syntax Scripting: setcommand(_AC, cc, nn)


setcommand(_ACCEL, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Acceleration Type: Signed 32-bit


Min: 0 Max: 500000
Where:
cc = Motor channel
nn = Acceleration value in 0.1 * RPM/s

Advanced Digital Motor Controller User Manual 227


Commands Reference

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.

Syntax Serial: !AX cc nn

Syntax Scripting: setcommand(_AX, cc, nn)


setcommand(_NXTACC, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Acceleration Type: Signed 32-bit

Min: 0 Max: 500000

Where:
cc = Motor channel
nn = Acceleration value in 0.1 * RPM/s

B - Set User Boolean Variable


Alias: BOOL HexCode: 16 CANOpen id: 0x2015

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

Syntax Scripting: setcommand(_B, nn, mm)


setcommand(_BOOL, 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

Argument 2: Value Type: Boolean


Min: 0 Max: 1

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.

BRK - Brake Override

Alias: - HexCode: AB CANOPEN id: 0x2034

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”.

Syntax Serial: !BRK cc nn

Syntax Scripting: setcommand (_BRK, cc)

Number of Arguments:
Argument 1: PWM Brake Channel
Min: 1 Max: Total Number of Motors

Argument 2: Override Status Type: Unsigned 8-bit


Min: 0 Max: 2 Default: 0

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.

Advanced Digital Motor Controller User Manual 229


Commands Reference

C - Set Encoder Counters


Alias: SENCNTR HexCode: 04 CANOpen id: 0x2003

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.

Syntax Serial: !C [cc] nn

Syntax Scripting: setcommand(_C, cc, nn)


setcommand(_SENCNTR, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Encoders

Argument 2: Value Type: Signed 32-bit


Min: -2147M Max: +2147M

Where:
cc = Motor channel
nn = Counter value

Example:
!C 2 -1000 : Loads -1000 in encoder counter 2
!C 1 0 : Clears encoder counter 1

CB - Set Internal Sensor Counter


Alias: SBLCNTR HexCode: 05 CANOpen id: 0x2004

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.

Syntax Serial: !CB [cc] nn

Syntax Scripting: setcommand(_CB, cc, nn)


setcommand(_SBLCNTR, cc, nn)

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

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

CIG – Set Current Integral Gains


Alias: - HexCode: A5 CANOpen id: 0x2032

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.

Syntax Serial: !CIG [cc] nn

Syntax Scripting: setcommand( _CIG, cc, nn)

Number of Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Argument 2: Gain 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) =
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: Integral Gain*10.000

Example:
!CIG 1 2300 : will set Flux Integral Gain of Motor 1 to 0.23

Advanced Digital Motor Controller User Manual 231


Commands Reference

CG - Set Motor Command via CAN


Alias: CANGO HexCode: 19 CANOpen id: 0x2000

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.

Syntax Serial: !CG cc nn

Syntax Scripting: setcommand(_CG, cc, nn)


setcommand(_CANGO, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Value Type: Signed 32-bit


Min: -1000 Max: +1000

Where:
cc = Motor channel
nn = Command value

CPG – Set Current Proportional Gains


Alias: - HexCode: A4 CANOpen id: 0x2031

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.

Syntax Serial: !CPG [cc] nn


Syntax Scripting: setcommand( _CPG, cc, nn)

Number of Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit


Min: 0 Max: 2,000,000,000

Where:
cc (single channel) =

232 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

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: Proportional Gain*10.000

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.

Syntax Serial: !CS ee nn

Syntax Scripting: setcommand(_CS, ee, nn)


setcommand(_CANSEND, ee, nn)

Number of Arguments: 2

Argument 1: Element
Min: 1 Max: 10

Argument 2: Value Type: Unsigned 8-bit


Min: 0 Max: 255

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

Advanced Digital Motor Controller User Manual 233


Commands Reference

CSS - Set SSI Sensor Counter


Alias: - HexCode: 6C CANOpen id: 0x201F

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.

Syntax Serial: !CSS [cc] nn

Syntax Scripting: setcommand(_CSS, cc, nn)

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

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

CU - Raw Redirect Send

Alias: - HexCode: 94 CANOpen id: -

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.

Syntax Serial: !CS ee nn

Syntax Scripting: setcommand(_CS, ee, nn)

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

Argument 2: Value Type: Unsigned 8-bit

Min: 0 Max: 255

Where: ee = frame element

1 = outport (0 for RS232 and 6 for RS485)

2 = frame length

3 to 18 = data0 to data15

nn = value

Examples: !CS 1 0 Enter 0 in outport (RS232)

!CS 3 49 Enter 49 in Data 0

!CS 4 50 Enter 50 in Data 1

!CS 4 51 Enter 51 in Data 2

!CS 2 3 Enter 2 in frame length. Send data frame

D0 - Reset Individual Digital Out bits


Alias: DRES HexCode: 09 CANOpen id: 0x200A

Description:
The D0 command will turn off the single digital output selected by the number that fol-
lows.

Syntax Serial: !D0 nn

Syntax Scripting: setcommand(_D0, nn)


setcommand(_DRES, nn)

Number of Arguments: 1

Argument 1: OutputNbr Type: Unsigned 8-bit


Min: 1 Max: Total number of Digital Outs

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.

Advanced Digital Motor Controller User Manual 235


Commands Reference

D1 - Set Individual Digital Out bits


Alias: DSET HexCode: 0A CANOpen id: 0x2009

Description:
The D1 command will activate the single digital output that is selected by the parameter
that follows.

Syntax Serial: !D1 nn

Syntax Scripting: setcommand(_D1, nn)


setcommand(_DSET, nn)

Number of Arguments: 1

Argument 1: OutputNbr Type: Unsigned 8-bit


Min: 1 Max: Total number of Digital Outs

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.

Syntax Serial: !DC cc nn

Syntax Scripting: setcommand(_DC, cc, nn)


setcommand(_DECEL, cc, nn)

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

Argument 2: Deceleration Type: Signed 32-bit


Min: 0 Max: 500000

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

DG – Set PID Derivative Gains


Alias: - HexCode: A3 CANOpen id: 0x2030

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.

Syntax Serial: !DG [cc] nn

Syntax Scripting: setcommand( _DG, cc, nn)

Number of Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Argument 2: Gain 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

nn: Derivative Gain*1.000.000

Advanced Digital Motor Controller User Manual 237


Commands Reference

Example:
!DG 1 10.000 : will set Speed Derivative Gain of Motor 1 to 0.01

DS - Set all Digital Out bits


Alias: DOUT HexCode: 09 CANOpen id: 0x2008

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.

Syntax Serial: !DS nn

Syntax Scripting: setcommand(_DS, nn)


setcommand(_DOUT, nn)

Number of Arguments: 1

Argument 1: Value Type: Unsigned 8-bit


Min: 0 Max: 255

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).

Syntax Serial: !DX cc nn

Syntax Scripting: setcommand(_DX, cc, nn)


setcommand(_NXTDEC, cc, nn)

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

Argument 2: Value Type: Signed 32-bit


Min: 0 Max: 500000

Where:
cc = Motor channel
nn = Acceleration value

EES - Save Configuration in EEPROM


Alias: EESAV HexCode: 1B CANOpen id: 0x2017

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.

Syntax Serial: !EES

Syntax Scripting: setcommand(_EES, 1)


setcommand(_EESAV, 1)

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.

Syntax Serial: !EX

Syntax Scripting: setcommand(_EX, cc)


setcommand(_ESTOP, cc)

Number of Arguments: 1

Advanced Digital Motor Controller User Manual 239


Commands Reference

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of channels+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.

G - Go to Speed or to Relative Position


Alias: GO HexCode: 00 CANOpen id: Use CG

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.

Syntax Serial: !G [nn] mm

Syntax Scripting: setcommand(_G, nn, mm)


setcommand(_GO, nn, mm)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Value Type: Signed 32-bit


Min: -1000 Max: 1000

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.

GIQ - Go to Torque Amps


Alias: - HexCode: 7A CANOpen id: -

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.

Syntax Serial: !GIQ [nn] mm

Syntax Scripting: setcommand(_GIQ, nn, mm)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Amps

Type: Signed 32

Min: 0 Max: Max Amps in datasheet

Where:
cc = Motor channel
nn = Amps*10

Example:
!GIQ 1 500 : In Closed Loop Torque mode, applies 50,0A torque amps command.

Advanced Digital Motor Controller User Manual 241


Commands Reference

GID - Go to Flux Amps


Alias: - HexCode: 7B CANOpen id: -

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

Syntax Serial: !GID [nn] mm

Syntax Scripting: setcommand(_GID, nn, mm)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Amps

Type: Signed 32

Min: 0 Max: Max Amps in datasheet

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).

H - Load Home counter


Alias: HOME HexCode: 0D CANOpen id: 0x200B

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.

Syntax Serial: !H [cc]

Syntax Scripting: setcommand(_H, cc)


setcommand(_HOME, cc)

Number of Arguments: 1

242 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Encoders

Where:
cc = Motor channel

Example:
!H 1: Loads encoder counter 1, SSI sensor counter 1 and brushless counter 1 with their
preset home values.

IG – Set PID Integral Gains


Alias: - HexCode: A2 CANOpen id: 0x202F

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.

Syntax Serial: !IG [cc] nn

Syntax Scripting: setcommand( _IG, cc, nn)

Number of Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Argument 2: Gain 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

nn: Integral Gain*1.000.000

Example:
!IG 1 100.000 : will set Speed Integral Gain of Motor 1 to 0.1

Advanced Digital Motor Controller User Manual 243


Commands Reference

MG - Emergency Stop Release and Fault Clearance


Alias: MGO HexCode: 0F CANOpen id: 0x200D

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.

Syntax Serial: !MG

Syntax Scripting: setcommand(_MG, 1)


setcommand(_MGO, 1)

Number of Arguments: 0

MS - Stop in all modes


Alias: MSTOP HexCode: 10 CANOpen id: 0x200E

Description:
The MS command will stop the motor for the specified motor channel.

Syntax Serial: !MS [cc]

Syntax Scripting: setcommand(_MS, cc)


setcommand(_MSTOP, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Where:
cc = Motor channel

MSS - Motor Sensor Setup


Alias: - HexCode: 62 CANOpen id: 0x202d

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.

Syntax Serial: !MSS [cc]

Syntax Scripting: setcommand(_MSS, cc)

244 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Where:
cc = Motor channel

P - Go to Absolute Desired Position


Alias: MOTPOS HexCode: 02 CANOpen id: 0x2001

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.

Syntax Serial: !P [cc] nn

Syntax Scripting: setcommand(_P, cc, nn)


setcommand(_MOTPOS, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Destination Type: Signed 32-bit


Min: -2147M Max: +2147M

Where:
cc = Motor channel
nn = Absolute count destination

Example:
!P 1 10000 : make motor go to absolute count value 10000.

PG – Set PID Proportional Gains


Alias: - HexCode: A1 CANOpen id: 0x202E

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.

Syntax Serial: !PG [cc] nn

Syntax Scripting: setcommand( _PG, cc, nn)

Number of Arguments: 2

Advanced Digital Motor Controller User Manual 245


Commands Reference

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Argument 2: Gain 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

nn: Proportional Gain*1.000.000

Example:
!PG 1 100.000 : will set Speed Proportional Gain of Motor 1 to 0.1

PR - Go to Relative Desired Position


Alias: MPOSREL HexCode: 11 CANOpen id: 0x200F

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.

Syntax Serial: PR [cc] nn

Syntax Scripting: setcommand(_PR, cc, nn)


setcommand(_MPOSREL, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Delta Type: Signed 32-bit


Min: -2147M Max: +2147M

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.

PRX - Next Go to Relative Desired Position


Alias: NXTPOSR HexCode: 13 CANOpen id: 0x2011

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.

Syntax Serial: !PRX [cc] nn

Syntax Scripting: setcommand(_PRX, cc, nn)


setcommand(_NXTPOSR, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Delta Type: Signed 32-bit


Min: -2147M Max: +2147M

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.

PX - Next Go to Absolute Desired Position


Alias: NXTPOS HexCode: 12 CANOpen id: 0x2010

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.

Syntax Serial: !PX [nn] cc


Syntax Scripting: setcommand(_PX, nn, cc)
setcommand(_NXTPOS, nn, cc)

Advanced Digital Motor Controller User Manual 247


Commands Reference

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Delta Type: Signed 32-bit


Min: -2147M Max: +2147M

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.

QST - Quick Stop

Alias: HexCode:8D CanOpen id: 0x202C

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.

Syntax Serial: !QST [cc]

Syntax Scripting: setcommand (_QST, cc)

Number of Arguments: 1

Min:1 Max: Total number of Motors

Where:

cc= Motor channel

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

Syntax Serial: !R [nn]

Syntax Scripting: setcommand(_R, nn)


setcommand(_BRUN, nn)

Number of Arguments: 1

Argument 1: [Option] Type: Unsigned 8-bit


Min: None Max: 2

Where:
nn =
None : Start/resume script
0 : Stop script
1 : Start/resume script
2 : Reinitialize and restart script

S - Set Motor Speed


Alias: MOTVEL HexCode: 03 CANOpen id: 0x2002

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.

Syntax Serial: !S [cc] nn

Syntax Scripting: setcommand(_S, cc, nn)


setcommand(_MOTVEL, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Value Type: Signed 32-bit


Min:-65535 Max: 65535

Where:
cc = Motor channel
nn = Speed value in RPM

Example:
!S 2500 : set motor 1 position velocity to 2500 RPM

STT - STO Self-Test


Alias: - HexCode: 70 CANOpen id: -

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-

Advanced Digital Motor Controller User Manual 249


Commands Reference

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:

• Any of the transistors or other component of the STO circuit is damaged.


• The respective jumper is placed on the board.

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.

Syntax Serial: !STT

Syntax Scripting: setcommand(_STT, 1)

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.

Syntax Serial: !SX cc nn

Syntax Scripting: setcommand(_SX, cc, nn)


setcommand(_NXTVEL, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Value Type: Signed 32-bit


Min: -500000 Max: 500000

Where:
cc = Motor channel
nn = Velocity value

250 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

VAR - Set User Variable


Alias: VAR HexCode: 06 CANOpen id: 0x2005

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.

Syntax Serial: !VAR nn mm


Syntax Scripting: setcommand(_VAR, nn, mm)
setcommand(_VAR, nn, mm)

Number of Arguments: 2
Argument 1: VarNbr
Min: 1 Max: Total nbr of User Variables

Argument 2: Value Type: Signed 32-bit


Min: -2147M Max: 2147M

Where:
nn = Variable number
mm = Value

DS402 Runtime Commands


DS402 is supported only in BLDC and DC products. Runtime commands created to sup-
port DS402 specification are described below:

TABLE 15-2.

Command Arguments Description


CW Channel Value Control Word (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 Value Profile Acceleration (DS402)
PDC Channel Value Profile Deceleration (DS402)
PLT Element Value Software Position Limit (DS402)
POF Channel Value Position Offset (DS402)
POS Channel Value Target Position (DS402)
PSP Channel Value Profile Velocity (DS402)
ROM Channel Value Modes of Operation (DS402)
SPE Channel Value Target Velocity (DS402)

Advanced Digital Motor Controller User Manual 251


Commands Reference

Command Arguments Description


SAC Element Value Velocity Acceleration (DS402)
SDC Element Value Velocity Deceleration (DS402)
SPC Channel Value Target Profile Velocity (DS402)
SPL Element Value Velocity Min/Max Amount (DS402)
TC Channel Value Target Torque (DS402)
TOF Channel Value Torque Offset (DS402)
TSL Channel Value Torque Slope (DS402)
VOF Channel Value Velocity Offset (DS402)

CW – Control Word (DS402)


Alias: CW HexCode: 56 CANOpen id: 0x6040

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.

TABLE 15-3. Control Word Mapping

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

TABLE 15-4. Command Coding

Bits of the Control Word


Command Transition
Bit 7 Bit 3 Bit 2 Bit 1 Bit 0
Shutdown 0 X 1 1 0 2,6,8
Switch On 0 0 1 1 1 3
Switch On + Enable Operation 0 1 1 1 1 3+4
Disable Voltage 0 X X 0 X 7,9,10,12
Quick Stop 0 X 0 1 X 7,10,11
Disable Operation 0 0 1 1 1 5
Enable Operation 0 1 1 1 1 4,16
Fault Reset 0->1 X X X X 15

252 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

TABLE 15-5. Halt bit (bit 8)

Bit Value Definition


0 Positioning shall be executed or continued
8 Axis shall be stopped. Slow down on quick stop ramp (EDEC) and stay in operation
1
enabled

Profile Position Mode

TABLE 15-6. Control Word Mapping in Profile Position Mode

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.

TABLE 15-7. Definition of Bits 4, 5, 6, and 9 in Profile Position Mode

Bit 5 Bit 4 Definition


1 0->1 Next positioning shall be started immediately
Positioning with the current profile velocity up to the current set-point shall be pro-
0 0->1
ceeded and then next positioning shall be applied
Bit Value Definition
0 Target position shall be an absolute value
6 Target position shall be a relative value. Positioning moves shall be performed relative
1
to the preceding (internal absolute) target 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.

Advanced Digital Motor Controller User Manual 253


Commands Reference

TABLE 15-9a Definition of Bits 4, 5, and 6 in Velocity Mode

Bit Value Definition


Motor shall be halted. Slow down on quick stop ramp (EDEC) and stay in operation en-
0
4 abled
1 Velocity demand value shall accord with ramp output value
0 Ramp output value shall be locked to current output value
5
1 Ramp output value shall follow ramp input value
0 Ramp input value shall be set to zero
6
1 Ramp input value shall accord with ramp reference
Note: Bit 4 has got higher priority than bit 5.

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.

TABLE 15-9c. Definition of bit 8


Bit Value Definition
4 0 Do not start homing procedure
1 Start or continue homing procedure
8 0 The motion shall be executed or continued
1 Axis shall be stopped according to the halt option code (605Dh)

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.

TABLE 15-10. Controlword for profile torque mode


159 8 7 64 30
See Table 15-3 Halt See Table 15-3 reserved See Table 15-3
MSB LSB

TABLE 15-11. Definition of bit 8


Bit Value Definition
8 0 The motion shall be executed or continued
1 Axis shall be stopped according to the halt option code (605Dh)
Note: At cyclic synchronous modes Halt function is not active

254 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

Syntax Serial: !CW cc nn

Syntax Scripting: SetCommand(_CW, cc, nn)

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

FEW - Following Error Window (DS402)


Alias: FEW HexCode:99 CanOpen id: 0x6065

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.

Syntax Serial: !FEW cc nn

Syntax Scripting: SetCommand(_FEW, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total of motors

Argument 2: Value Type: Unsigned 32-bit

Where:
cc = Motor channel
nn = Following Error Window (counts)

Advanced Digital Motor Controller User Manual 255


Commands Reference

FET - Following Error Time Out (DS402)


Alias: FET HexCode:9A CanOpen id: 0x6066

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.

Syntax Serial: !FET cc nn

Syntax Scripting: SetCommand(_FET, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total of motors

Argument 2: Value Type: Unsigned 16-bit

Where:

cc = Motor channel

nn = Following Error Time out (ms)

HMD – Homing Method (DS402)


Alias: - HexCode: AD CANOpen id: 0X6098

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.

Syntax Serial: !HMD cc nn

Syntax Scripting: setcommand(_HMD, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Homing Method number


Type: Unsigned 8-bit
Min: 0 Max: 255

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

HSP – Homing Speed (DS402)


Alias: - HexCode: AE CANOpen id: 0X6099

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).

Syntax Serial: !HSP cc nn

Syntax Scripting: setcommand(_HSP, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors

Argument 2: Homing Speed (RPM)


Type: Unsigned 32-bit
Min: 0 Max: 20000

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.

Advanced Digital Motor Controller User Manual 257


Commands Reference

INT - Interpolation Time Period (DS402)


Alias: INT HexCode:9C CanOpen id: 0x60C2

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).

Syntax Serial: !INT ee nn

Syntax Scripting: SetCommand(_INT, ee, nn)

Arguments: 2

Argument 1: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Argument 2: Value Type: Interpolation Time Base: Unsigned 8 bits


Min: 0 Max: 255
Interpolation Time Index: Signed 8 bits
Min: -3 Max: 7

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

2 × (m - 1) + 1: nn = Interpolation time base channel m.


2 × (m - 1) + 2: nn = Interpolation time index channel m.

MSL - Max Motor Speed (DS402)


Alias: MSL HexCode: 66 CanOpen id: 0x6080

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

Syntax Serial: !MSL cc nn

Syntax Scripting: SetCommand(_MSL, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total of motors

Argument 2: Value Type: Signed 32-bit

Where:
cc = Motor channel
nn = Speed command in RPM

PAC – Profile Acceleration (DS402)


Alias: PAC HexCode: 5E CANOpen id: 0x6083

Description:
This command is used to set the configured acceleration in 10×RPM/second.

Syntax Serial: !PAC cc nn

Syntax Scripting: SetCommand(_PAC, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Argument 2 Value Type: Unsigned 32-bit

Where:

cc = Motor channel
nn = Profile acceleration in 10×RPM/second

PDC – Profile Deceleration (DS402)


Alias: PDC HexCode: 5F CANOpen id: 0x6084

Description:
This command is used to set the configured deceleration in 10×RPM/second.

Syntax Serial: !PDC cc nn

Advanced Digital Motor Controller User Manual 259


Commands Reference

Syntax Scripting: SetCommand(_PDC, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Argument 2: Value Type: Unsigned 32-bit

Where:

cc = Motor channel

nn = Profile deceleration in 10×RPM/second

PLT - Software Position Limit (DS402)

Alias: PLT HexCode:9D CANOpen id: 0x607D

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.

Syntax Serial: !PLT ee nn

Syntax Scripting: SetCommand(_PLT, ee, nn)

Arguments: 2

Argument 1: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Argument 2: Value Type: Unsigned 8-bit or Signed 8-bit

Where:

ee =

1: Minimum Position Limit channel 1

2: Maximum Position Limit channel 1

3: Minimum Position Limit channel 2

4: Maximum Position Limit channel 2

260 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

2 × (m - 1) + 1: Minimum Position Limit channel m.

2 × (m - 1) + 2: Maximum Position Limit channel m.

where m = number of motor

POF – Position Offset

Alias: - HexCode: B0 CANOpen id: 0x60B0

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.

Syntax Serial: !POF cc nn

Syntax Scripting: setcommand (_POF, cc, nn)

Number of Arguments: 2

Argument 1: Motor Type: Unsigned 8-bits


Min: 1 Max: Total Number of Motors

Argument 2: Position Offset Type: Signed 32-bit


Min: -2,000,000,000 Max: 2,000,000,000 Default: 0

Where:
cc = Channel
nn = Position counts

Example:
!POF 1 230000: Set motor channel 1 position offset to 230000.

POS – Target Position (DS402)


Alias: POS HexCode: 5C CANOpen id: 0x607A

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.

Syntax Serial !POS cc nn

Syntax Scripting SetCommand(_POS, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Advanced Digital Motor Controller User Manual 261


Commands Reference

Argument 2: Value Type: Signed 32-bit

Where:

cc = Motor channel
nn = Target position

PSP – Profile Velocity (DS402)


Alias: PSP HexCode: 5D CANOpen id: 0x6081

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.

Syntax Serial: !PSP cc nn

Syntax Scripting: SetCommand(_PSP, cc, nn)

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 = Profile velocity

ROM – Modes of Operation (DS402)


Alias: ROM HexCode: 5A CANOpen id: 0x6060

Description:
This command configures the modes of operation.

Syntax Serial: !ROM cc nn

Syntax Scripting: SetCommand(_ROM, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Argument 2: Value Type: Signed 8-bit

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

TABLE 15-12. Operation Modes


Value Definition Roboteq Operation Mode
-4¹ Velocity Mode Closed Loop Speed Position
-3 1
Profile Velocity Mode Closed Loop Speed Position
-21 Profile Position Mode Closed Loop Position Tracking Mode²
-1 1
Profile Position Mode Closed Loop Position Relative Mode2
0 No Mode Open Loop Mode
1 Profile Position Mode Closed Loop Count Position Mode
2 Velocity Mode Closed Loop Speed Mode
3 Profile Velocity Mode Closed Loop Speed Mode
4 Torque Profile Mode Closed Loop torque Mode
8 Cyclic Synchronous Position Mode Closed Loop Count Position Mode
9 Cyclic Synchronous Velocity Mode Closed Loop Speed Mode
10 Cyclic Synchronous Torque Mode Closed Loop Torque Mode
¹Roboteq Specific Modes
2
Not all Profile Position features can be supported with this mode.

RST – Reset Controller


Alias: - HexCode: 23 CANOpen id: 0x2021

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 Serial: !RST

Syntax Scripting:
setcommand(_RST, 1)

Number of Arguments: 0

S16 – Target Velocity (DS402)


Alias: MOTVEL HexCode: 61 CANOpen id: 0x6042

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.

Syntax Serial: !S16 cc, nn

Syntax Scripting: SetCommand(_S16, cc, nn)

SetCommand(_MOTVEL, cc, nn)

Advanced Digital Motor Controller User Manual 263


Commands Reference

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Argument 2: Value Type: Signed 16-bit

Min: -500000 Max: 500000

Where:

cc = Motor channel
nn = Target velocity in RPM

SAC – Velocity Acceleration (DS402)


Alias: SAC HexCode: 58 CANOpen id: 0x6048

Description:
This command configures the velocity acceleration.

Syntax Serial: !SAC ee nn

Syntax Scripting: SetCommand(_SAC, ee, nn)

Arguments: 2

Argument 1: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Argument 2: Value Type: Unsigned 32-bit

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

264 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

SDC – Velocity Deceleration (DS402)


Alias: SDC HexCode: 59 CANOpen id: 0x6049

Description:
This command configures the velocity deceleration.

Syntax Serial: !SDC ee nn

Syntax Scripting: SetCommand(_SDC, ee, nn)

Arguments: 2

Argument 1: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Argument 2: Value Type: Unsigned 32-bit

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

SPC - Target Profile Velocity (DS402)

Alias: SPC HexCode: 66 CanOpen id: 0x60FF

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.

Syntax Serial: !SPC cc nn

Syntax Scripting: SetCommand(_SPC, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total of motors

Argument 2: Value Type: Signed 32-bit

Advanced Digital Motor Controller User Manual 265


Commands Reference

Where:
cc = Motor channel
nn = Speed command in RPM

SPL – Velocity Min/Max Amount (DS402)


Alias: SPL HexCode: 57 CANOpen id: 0x6046

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.

FIGURE 15-1. Velocity Min Max Amount

Syntax Serial: !SPL ee nn

Syntax Scripting: SetCommand(_SPL, ee, nn)

Arguments: 2

Argument 1: Eelment Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Argument 2: Value Type: Unsigned 32-bit

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

266 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Commands

2 × (m - 1) + 1: Min amount for channel m.


2 × (m - 1) + 2: Max amount for channel m.
nn = Velocity max/min amount

TC – Target Torque (DS402)


Alias: TC HexCode: 5B CANOpen id: 0x6071

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.

Syntax Serial: !TC cc nn

Syntax Scripting: SetCommand(_TC, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Argument 2: Value Type: Signed 16-bit

Where:

cc = Motor channel
nn = Torque input value in thousandths of rated torque

TOF – Torque Offset


Alias: - HexCode: B2 CANOPEN id: 0x60B2

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).

Syntax Serial: !TOF cc nn

Syntax Scripting: setcommand (_TOF, cc, nn)

Number of Arguments: 2

Argument 1: Motor Type: Unsigned 8-bits


Min: 1 Max: Total Number of Motors

Argument 2: Toque Offset Type: Signed 32-bit


Min: -2,000,000,000 Max: 2,000,000,000 Default: 0

Advanced Digital Motor Controller User Manual 267


Commands Reference

Where:

cc = Channel
nn = Torque offset in Nm * 1000.

Example:

!TOF 1 300: Set motor channel 1 torque offset to 0.3 Nm.

TSL – Torque Slope (DS402)


Alias: TSL HexCode: 60 CANOpen id: 0x6087

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.

Syntax Serial: !TSL cc nn

Syntax Scripting: SetCommand(_TSL, cc, nn)

Arguments: 2

Argument 1: Channel Type: Unsigned 8-bit

Min: 1 Max: otal number of motors

Argument 2: Value Type: Unsigned 32-bit

Where:

cc = Motor channel
nn = Torque slope in (miliNm*10)/ sec.

VOF – Velocity Offset


Alias: - HexCode: B1 CANOPEN id: 0x60B1

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

Syntax Scripting: setcommand (_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

Argument 2: Velocity Offset Type: Signed 32-bit


Min: -2,000,000,000 Max: 2,000,000,000 Default: 0
Where:
cc = Channel
nn = Velocity offset in RPM

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.

TABLE 15-13. Runtime Queries


Command Argument Description
A Channel Read Motor Amps
ACP - AC Output Power
AI InputNbr Read Analog Inputs
AIC InputNbr Read Analog Input after Conversion
ANG Channel Read Rotor Angle
ASI Channel Read Raw Sin/Cos sensor
B VarNbr Read User Boolean Variable
BA Channel Read Battery Amps
BCR Channel Read Internal Sensor Count Relative
BRK Channel Read Brake Override status
BMC SensorValue Read BMS State Of Charge in AmpHours
BMF SensorValue Read BMS status flags

Advanced Digital Motor Controller User Manual 269


Commands Reference

TABLE 15-13. Runtime Queries


Command Argument Description
BMS SensorValue Read BMS switch states
BS Channel Read Internal Sensor Motor Speed in RPM
BSC SensorNumber Read Battery State of Charge in percentage
BSR Channel Read Internal Sensor Motor Speed as 1/1000 of
Max RPM
C Channel Read Encoder Counter Absolute
CAN Element Read Raw CAN frame
CB Channel Read Absolute Internal Sensor Counter
CD None Read Raw Redirect Received Frames Count
CEC Element CAN Error Counter
CF None Read Raw CAN Received Frames Count
CHS Channel CAN Consumer Heartbeat Status
CIA Channel Read Converted Analog Command
CIG PID Channel Gain Read Current Integral Gains
CIP Channel Read Internal Pulse Command
CIS Channel Read Internal Serial Command
CL Group Read RoboCAN Alive Nodes Map
CPG PID Channel Gain Read Current Proportional Gains
CR Channel Read Encoder Count Relative
CSR Channel Read Relative SSI Sensor Counter
CSS Channel Read Absolute SSI Sensor Counter
D None Read Digital Inputs
DI InputNbr Read Individual Digital Inputs
DDT Element Read Raw Redirect Received Frame
DG PID Channel Gain Read PID Derivative Gains
DO None Read Digital Output Status
DPA Channel Read Motor DC/Peak Amps
DR Channel Read Destination Reached
E Channel Read Closed Loop Error
F Channel Read Feedback
FC Channel Read FOC Angle Adjust
FLW SensorNumber Read Flow Sensor Counter
FF None Read Fault Flags
FID None Read Firmware ID
FIN None Read Firmware ID (numerical)
FM Channel Read Runtime Status Flag
FS None Read Status Flags

270 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

TABLE 15-13. Runtime Queries


Command Argument Description
HS Channel Read Hall Sensor States
ICL NodeId Is RoboCAN Node Alive
IDC - D-axis current command
IG PID Channel Gain Read PID Integral Gains
IQC - D-axis current command
LK None Read Lock status
M Channel Read Motor Command Applied
MA AmpsChannel Read Field Oriented Control Motor Amps
MCB SensorNumber Read Magsensor Markers Pattern
MCU None Microprocessor Usage
MGD SensorNumber Read Magsensor Track Detect
MGM SensorNumber Read Magsensor Markers
MGS SensorNumber Read Magsensor Status
MGT Channel Read Magsensor Track Position
P Channel Read Motor Power Output Applied
PG PID Channel Gain Read PID Proportional Gains
PHA CurrentSensorNumber Read Phase Amps
PI InputNbr Read Pulse Inputs
PIC InputNbr Read Pulse Input after Conversion
S Channel Read Encoder Motor Speed in RPM
SCC None Read Script Checksum
SEC Channel Read Sensor Errors
SDT Element Read Raw Redirect Received Frame as string
SNA Channel Read Sensor Angle
SNS Motor Phase Number Sense Voltage
SR Channel Read Encoder Speed Relative
SS Channel Read SSI Sensor Motor Speed in RPM
SSR Channel Read SSI Sensor Speed Relative
STT Fault Indication STO Self-Test Result
T SensorNbr Read Temperature
TM Element Read Time
TR Channel Read Position Relative Tracking
TRN None Read Control Unit type and Controller Model
UID Element Read MCU Id
V SensorNumber Read Volts
VAR VarNumber Read User Integer Variable
VSD - D-axis voltage command
VSQ - Q-axis voltage command

Advanced Digital Motor Controller User Manual 271


Commands Reference

A - Read Motor Amps


Alias: MOTAMPS HexCode: 00 CANOpen id: 0x2100

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.

Syntax Serial: ?A [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_A, cc)


result = getvalue(_MOTAMPS, cc)

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.

ACP – AC Output Power


HexCode: CA CANOpen id: 0x2178

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.

Syntax Serial: ?ACP [cc]


Argument: Channel
Min: 1 Max: Total Number of channels

Syntax Scripting: result = getvalue(_ACP, cc)

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.

AI - Read Analog Inputs


Alias: ANAIN HexCode: 10 CANOpen id: 0x2146

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.

Syntax Serial: ?AI [cc]

Argument: InputNbr
Min: 1 Max: Max Number of Analog Inputs

Syntax Scripting: result = getvalue(_AI, cc)


result = getvalue(_ANAIN, cc)

Reply:
AI=nn Type: Signed 16-bit Min: 0 Max: 5300

Where:
cc = Analog Input number
nn = Millivolt for each channel

AIC - Read Analog Input after Conversion


Alias: ANAINC HexCode: 23 CANOpen id: 0x2147

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.

Syntax Serial: ?AIC [cc]

Argument: InputNbr
Min: 1 Max: Total Number of Analog Inputs

Syntax Scripting: result = getvalue(_AIC, cc)


result = getvalue(_ANAINC, cc)

Reply:
AIC=nn Type: Signed 16-bit Min: -1000 Max: 1000

Advanced Digital Motor Controller User Manual 273


Commands Reference

Where:
cc = Analog Input number
nn = Converted analog input value +/-1000 range

ANG - Read Rotor Angle


Alias: ANG HexCode: 42 CANOpen id: 0x2132

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.

Syntax Serial: ?ANG [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_ANG, cc)

Reply:
ANG=nn Type: Unsigned 16-bit Min: 0 Max: 511

Where:
cc = Motor channel
nn = Rotor electrical angle

ASI - Read Raw Sin/Cos sensor


Alias: ASI HexCode: 33 CANOpen id:

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.

Syntax Serial: ?ASI [cc]

Argument: Channel
Min: 1 Max: 2 * Number of Motors

Syntax Scripting: result = getvalue(_ASI, cc)

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

B - Read User Boolean Variable


Alias: BOOL HexCode: 16 CANOpen id: 0x2115

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.

Syntax Serial: ?B [nn]

Argument: VarNbr
Min: 1 Max: Total Number of Bool Variables

Syntax Scripting: result = getvalue(_B, nn)


result = getvalue(_BOOL, nn)

Reply:
B=bb Type: Boolean Min: 0 Max: 1

Where:
nn = Boolean variable number
bb = 0 or 1 state of the variable

BA - Read Battery Amps


Alias: BATAMPS HexCode: 0C CANOpen id: 0x210C

Description:
Measures and reports the Amps flowing from the battery in Amps * 10. Battery Amps are
often lower than motor Amps.

Syntax Serial: ?BA [cc]

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

Advanced Digital Motor Controller User Manual 275


Commands Reference

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.

BCR - Read Internal Sensor Count Relative


Alias: BLRCNTR HexCode: 09 CANOpen id: 0x2109

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.

Syntax Serial: ?BCR [cc, nn]

Arguments: 2 or 1

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Time in millisecond, refresh rate (only if used in RoboCAN).

BCR= nn,cc Type: Signed 32-bit Min: 2147M Max: 2147M

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.

BMC - Read BMS State Of Charge in AmpHours


Alias: - HexCode: 4C CANOpen id: 0x2141

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.

Syntax Serial: ?BMC [cc]

276 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_BMC, cc)

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

...

p : BMS10X0 at pulse input p


nn = AmpHours (Ah)

BMF - Read BMS status flags


Alias: - HexCode: 4D CANOpen id: 0x2142

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.

Syntax Serial: ?BMF [cc]

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_BMF, cc)

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)

Advanced Digital Motor Controller User Manual 277


Commands Reference

1 : BMS10X0 at pulse input 1


2 : BMS10X0 at pulse input 2
...
p : BMS10X0 at pulse input p

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

BMS - Read BMS switch states


Alias: - HexCode: 4E CANOpen id: 0x2143

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.

Syntax Serial: ?BMC [cc]

Argument: SensorNumber

Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_BMC, cc)

Reply:
BMC = 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)
1 : BMS10X0 at pulse input 1

278 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

2 : BMS10X0 at pulse input 2


...
p : BMS10X0 at pulse input p
and
f1 = Pack Switch
f2 = Load Switch
f3 = Charger Switch
f4 = Brake Resistor / Aux Switch
f5 = Reserved
f6 = Bluetooth Vcc switch
f7 = Reserved
f8 = Reserved

BRK - Read Brake Override Status

Alias: - HexCode: AB CANOpen id: 0x2161

Description:
Returns the Brake Override status.

Syntax Serial: ?BRK [cc]

Argument: Channel

Min: 1 Max: Total Number of Motors

Syntax Scripting: getvalue(_BRK, cc)

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

Advanced Digital Motor Controller User Manual 279


Commands Reference

BS - Read Internal Sensor Motor Speed in RPM


Alias: BLSPEED HexCode: 0A CANOpen id: 0x210A

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.

Syntax Serial: ?BS [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_BS, cc)


result = getvalue(_BLSPEED, cc)

Reply:
BS=nn Type: Signed 32-bit Min: -65535 Max: 65535

Where:
cc = Motor channel
nn = Speed in RPM

BSC - Read BMS State of Charge in percentage


Alias: - HexCode: 50 CANOpen id: 0x213A

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.

Syntax Serial: ?BSC [cc]

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_BSC, cc)

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

cc = (When several sensors enabled)


1 : BMS10X0 at pulse input 1
2 : BMS10X0 at pulse input 2
...
p : BMS10X0 at pulse input p
nn = State Of Charge (%)

BSR - Read Internal Sensor Motor Speed as 1/1000 of Max RPM


Alias: BLRSPEED HexCode: 0B CANOpen id: 0x210B

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.

Syntax Serial: ?BSR

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_BSR, )


result = getvalue(_BLRSPEED, )

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

C - Read Encoder Counter Absolute


Alias: ABCNTR HexCode: 04 CANOpen id: 0x2104

Description:
Returns the encoder value as an absolute number. The counter is 32-bit with a range of
+/- 2147483648 counts.

Syntax Serial: ?C [cc]

Advanced Digital Motor Controller User Manual 281


Commands Reference

Argument: Channel
Min: 1 Max: Total Number of Encoders

Syntax Scripting: result = getvalue(_C, cc)


result = getvalue(_ABCNTR, cc)

Reply:
C=nn Type: Signed 32-bit Min: -2147M Max: 2147M

Where:
cc = Encoder channel number
nn = Absolute counter value

CAN - Read Raw CAN frame


Alias: CAN HexCode: 27 CANOpen id:

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.

Syntax Serial: ?CAN [ee]

Argument: Element
Min: 1 Max: 10

Syntax Scripting: result = getvalue(_CAN, ee)

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

CB - Read Absolute Internal Sensor Counter


Alias: BLCNTR HexCode: 05 CANOpen id: 0x2105

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.

Syntax Serial: ?CB [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_CB, cc)


result = getvalue(_BLCNTR, cc)

Reply:
CB=nn Type: Signed 32-bit Min: -2147M Max: 2147M

Where:
cc = Motor channel
nn = Absolute counter value

CD - Read Raw Redirect Received Frames Count

Alias: CD HexCode: 8E CANOpen id: -

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.

Syntax Serial: ?CD

Argument: None

Syntax Scripting: result = getvalue(_CD, 1)

Reply:
CD=nn Type: Unsigned 8-bit Min: 0 Max: 255

Where:
nn = Number of frames in receive queue

Advanced Digital Motor Controller User Manual 283


Commands Reference

CEC – CAN Error Counter


HexCode: AC CANOPEN id:

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.

Syntax Serial: ?CEC [cc]

Argument: Error counter/status

Syntax Scripting: getvalue(_CEC, cc)

cc=

1: TEC
2: REC
3:LEC
4: Bus-off Counter

Reply:
CEC=nn
Type: Unsigned 16-bit
Min: 0 Max:2

Where:

nn =

Returns the error counter according to cc.

284 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Example:

?CEC 1: Transmit error counter?

CEC=123 – Current number of Transmit errors is 123.

CF - Read Raw CAN Received Frames Count


Alias: CF HexCode: 28 CANOpen id:

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.

Syntax Serial: ?CF

Argument: None

Syntax Scripting: result = getvalue(_CF, 1)

Reply:
CF=nn Type: Unsigned 8-bit Min: 0 Max: 16

Where:
nn = Number of frames in receive queue

CHS - CAN Consumer Heartbeat Status


Alias: - HexCode: 94 CANOpen id: -

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.

Syntax Serial: ?CHS [cc]

Argument: Heartbeat Channel

Min: 1 Max: 4

Syntax Scripting: result = getvalue(_CHS, cc)

Reply:

CIA=nn Type: Unsigned 8-bit Min: 0 Max: 127

Advanced Digital Motor Controller User Manual 285


Commands Reference

Where:

cc = Heartbeat channel

nn = Heartbeat Status:

0: Not configured

1: Pending (waiting for the first heartbeat message from node)

2: Active (node is sending heartbeat regularly)

127: Inactive (node stopped sending heartbeat)

CIA - Read Converted Analog Command


Alias: CMDANA HexCode: 1A CANOpen id: 0x2117

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).

Syntax Serial: ?CIA [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_CIA, cc)


result = getvalue(_CMDANA, cc)

Reply:
CIA=nn Type: Signed 32-bit Min: -1000 Max: 1000

Where:
cc = Motor channel
nn = Command value in +/-1000 range

CIG – Read Current Integral Gains


Alias: - HexCode: A5 CANOpen id: 0x2160

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.

Syntax Serial: ?CIG [cc]

286 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Syntax Scripting: getvalue( _CIG, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

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) =

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

aa: Integral Gain*10.000

CIP - Read Internal Pulse Command


Alias: CMDPLS HexCode: 1B CANOpen id: 0x2118

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).

Syntax Serial: ?CIP [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_CIP, cc)


result = getvalue(_CMDPLS, cc)

Reply:
CIP=nn Type: Signed 32-bit Min: -1000 Max: 1000

Advanced Digital Motor Controller User Manual 287


Commands Reference

Where:
cc = Motor channel
nn = Command value in +/-1000 range

CIS - Read Internal Serial Command


Alias: CMDSER HexCode: 19 CANOpen id: 0x2116

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.

Syntax Serial: ?CIS [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_CIS, cc)


result = getvalue(_CMDSER, cc)

Reply:
CIS=nn Type: Signed 32-bit Min: -1000 Max: 1000

Where:
cc = channel
nn = command value in +/-1000 range

CL - Read RoboCAN Alive Nodes Map


Alias: CALIVE HexCode: 26 CANOpen id:

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.

Syntax Serial: ?CL nn

Argument: Group
Min: 1 Max: 16

Syntax Scripting: result = getvalue(_CL, nn)


result = getvalue(_CALIVE, nn)

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

CPG – Read Current Proportional Gains

Alias: - HexCode: A4 CANOpen id: 0x215F

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.

Syntax Serial: ?CPG [cc]

Syntax Scripting: getvalue( _CPG, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

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

Advanced Digital Motor Controller User Manual 289


Commands Reference

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

aa: Proportional Gain*10.000

CR - Read Encoder Count Relative


Alias: RELCNTR HexCode: 08 CANOpen id: 0x2108

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.

Syntax Serial: ?CR [cc]

Argument: Channel
Min: 1 Max: Total Number of Encoders

Syntax Scripting: result = getvalue(_CR, cc)


result = getvalue(_RELCNTR, cc)

Reply:
CR=nn Type: Signed 32-bit Min: -2147M Max: 2147

Where:
cc = Motor channel
nn = Counts since last read using ?CR

CSR - Read Relative SSI Sensor Counter


Alias: - HexCode: 6D CANOpen id: 0x213F

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.

Syntax Serial: ?CSR [cc]

Argument: Channel
Min: 1 Max: Total Number of SSI Encoders

Syntax Scripting: result = getvalue(_CSR, cc)

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

CSS - Read Absolute SSI Sensor Counter


Alias: - HexCode: 6E CANOpen id: 0x213E

Description:
Returns the SSI encoder value as an absolute number. The counter is 32-bit with a range
of +/- 2147483648 counts.

Syntax Serial: ?CSS [cc]

Argument: Channel
Min: 1 Max: Total Number of SSI Encoders

Syntax Scripting: result = getvalue(_CSS, cc)

Reply:
CSS=nn Type: Signed 32-bit Min: -2147M Max: 2147

Where:

cc = SSI sensor channel


nn = Absolute counter value

D - Read Digital Inputs


Alias: DIGIN HexCode: 0E CANOpen id: 0x210E

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

Syntax Scripting: result = getvalue(_D, 1)


result = getvalue(_DIGIN, 1)

Reply:
D=nn Type: Unsigned 32-bit

Advanced Digital Motor Controller User Manual 291


Commands Reference

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

DDT - Read Raw Redirect Received Frame

Alias: DDT HexCode: 8F CANOpen id: -

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.

Syntax Serial: ?DDT [ee]

Argument: Element
Min: 1 Max: 64

Syntax Scripting: result = getvalue(_DDT, ee)

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

DG – Read PID Derivative Gains


Alias: - HexCode: A3 CANOpen id: 0x215E

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.

Syntax Serial: ?DG [cc]

292 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Syntax Scripting: getvalue( _DG, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

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

aa: Derivative Gain*1.000.000

DI - Read Individual Digital Inputs


Alias: DIN HexCode: 0F CANOpen id: 0x2145

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.

Syntax Serial: ?DI [cc]

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

Advanced Digital Motor Controller User Manual 293


Commands Reference

Example:
Q: ?DI
R: DI=1:0:1:0:1:0
Q: ?DI 1
R: DI=0

DO - Read Digital Output Status


Alias: DIGOUT HexCode: 17 CANOpen id: 0x2113

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.

Syntax Serial: ?DO

Argument: None

Syntax Scripting: result = getvalue(_DO, 1)


result = getvalue(_DIGOUT, 1)

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

DPA - Read DC/Peak Amps


Alias: - HexCode: 6E CANOpen id: -

Description:
Applicable only for brushless controllers. Measures and reports the Peak Amps , in
Amps*10, for all operating channels.

Syntax Serial: ?DPA [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_DPA, cc)

Reply:

DPA = aa Type: Signed 16-bit Min: 0

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

DR - Read Destination Reached


Alias: DREACHED HexCode: 22 CANOpen id: 0x211B

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.

Syntax Serial: ?DR [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_DR, cc)


result = getvalue(_DREACHED, cc)

Reply:
DR=nn Type: Unsigned 8-bit Min: 0 Max: 1

Where:
cc = Motor channel
nn =
0 : Not yet reached
1 : Reached

E - Read Closed Loop Error


Alias: LPERR HexCode: 18 CANOpen id: 0x2114

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.

Syntax Serial: ?E [cc]

Advanced Digital Motor Controller User Manual 295


Commands Reference

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_E, cc)


result = getvalue(_LPERR, cc)

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.

Syntax Serial: ?F [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_F, cc)


result = getvalue(_FEEDBK, cc)

Reply:
F=nn Type: Signed 32-bit Min: -2147M Max: 2147M

Where:
cc = Motor channel
nn = Feedback values

FC - Read FOC Angle Adjust


Alias: FC HexCode: 47 CANOpen id: 0x2135

Description:
Read in real time the angle correction that is currently applied by the Field Oriented algo-
rithm in order achieve optimal performance.

Syntax Serial: ?FC [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

296 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Syntax Scripting: result = getvalue(_FC, cc)

Reply:
FC = nn Type: Signed 16-bit Min: -512 Max: 512

Where:
cc = Motor channel
nn = Angle correction

FLW - Read Flow Sensor Counter


Alias: - HexCode: 7B CANOpen id: 0x214A

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.

Syntax Serial: ?FLW [cc]

Argument: SensorNumber
Min: 1 Max: 2*Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_FLW, cc)

Reply:

FLW=nn Type: Signed 32-bit Min: -2147M Max: 2147M

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.

Advanced Digital Motor Controller User Manual 297


Commands Reference

FF - Read Fault Flags


Alias: FLTFLAG HexCode: 15 CANOpen id: 0x2112

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.

Syntax Serial: ?FF

Argument: None

Syntax Scripting: result = getvalue(_FF, 1)


result = getvalue(_FLTFLAG, 1)

Reply:
FS = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 16-bit Min: 0 Max: 65535

Where:

TABLE 15-14. FF - Read Fault


Fault bit Fault Activated when
f1 OverHeat The measured temperatures go beyond the configured
limit. For more details see chapter “Temperature-Based
Protection” at section 7.
f2 OverVolt The measured voltages go beyond the configured limit.
For more details see chapter “Overvoltage Protection”
at section 7.
f3 UnderVolt The measured voltages go below the configured limit.
For more details see chapter “Undervoltage Protection”
at section 7.
f4 Short A possible short has been detected. For more details
see chapter Short Circuit Protection at section 7.
f5 EStop The EX command has been sent or the emergency stop
action has been triggered. For more details see chapter
“Digital Inputs Configurations and Uses” at section 4
and chapter “EX – Emergency Stop” at section 15
f6 Motor/Sensor There is a sensor fault during runtime or motor sensor
setup. For more details see chapter “Sensor Error De-
tection” at section 8.
f7 MOSFail Either of the power MOSFETs is detected as damaged.
For more details refer to the MOSfail protection para-
graph.
f8 DefConfig Default configuration is loaded at startup. This could be
due to either corruption in flash memory or by powering
up a brand-new controller.
f9 STO Fault The STO circuit’s self-test routine returns a fault (it
happens also when either of the STO inputs is low,
while the other is high). For more details see “Motor
Deactivation in Case of Output Stage Hardware Failure”
at section 2.

298 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Example:
Q: ?FF
R: FF=2 : Overvoltage fault

FID - Read Firmware ID


Alias: FID HexCode: 1E CANOpen id:

Description:
This query will report a string with the date and identification of the firmware revision of
the controller.

Syntax Serial: ?FID

Argument: None

Syntax Scripting: result = getvalue(_FID, 1)

Reply:
FID=ss Type: String

Where:
ss = Firmware ID string

Example:
Q: ?FID
R: FID=Roboteq v1.6 RCB500 05/01/2016

FIN - Read Firmware ID (numerical)


Alias: - HexCode: 3F CANOpen id: 0x2137

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.

Syntax Serial: ?FIN [ee]

Argument: Element
Min: None Max: 4

Syntax Scripting: result = getvalue(_FIN, ee)

Advanced Digital Motor Controller User Manual 299


Commands Reference

Reply:
FID = nn Type: Unsigned 16-bit Min: 0

Where:

ee = Firmware Version Element


1: Version
2: Month
3: Day
4: Year
nn = Value.

FM - Read Runtime Status Flag


Alias: MOTFLAG HexCode: 30 CANOpen id: 0x2122

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.

Syntax Serial: ?FM [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_FM, cc)


result = getvalue(_MOTFLAG, cc)

Reply:
FM = f1 + f2*2 + f3*4 + ... + fn*2n-1

Type: Unsigned 16-bit Min: 0 Max: 255

Where:
cc = Motor channel

TABLE 15-15. FM - Read Runtime Status Flag


Status bit Fault Activated when
f1 AmpLim Current limit is active. For more details see chapters
“Current Limiting” and “I2T Protection” at section 7.
f2 Stall The stall detection method is triggered. For more details
see chapter “Stall Detection” at section 8.
f3 Loop Error The loop error detection method is triggered. For more
details see chapter “Closed Loop Error Protection” at
section 7.

300 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Status bit Fault Activated when


f4 Quick Stop The QST command has been sent or the Quick Stop action
has been triggered. For more details see chapter “Digital
Inputs Configurations and Uses” at section 4 and chapter
“QST – Quick Stop” at section 15
f5 FwdLimit The Forward limit switch action has been triggered. For
more details see chapter “Digital Inputs Configurations and
Uses” at section 4.
f6 RevLimit The Reverse limit switch action has been triggered. For
more details see chapter “Digital Inputs Configurations and
Uses” at section 4.
f7 AmpTrig Amps trigger threshold has been reached. For more details
see “ATRIG - Amps Trigger Level” at section 15.
f8 FETs Off Power MOSFETs have been floated due to a specific
error. For more details see “Motor Deactivation in Normal
Operation” at section 2.

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.

FS - Read Status Flags


Alias: STFLAG HexCode: 14 CANOpen id: 0x2111

Description:
Report the state of status flags used by the controller to indicate a number of internal
conditions during normal operation. The response to this query is the single number for all
status flags. The status of individual flags is read by converting this number to binary and
look at various bits of that number.

Syntax Serial: ?FS

Argument: None

Syntax Scripting: result = getvalue(_FS, 1)


result = getvalue(_STFLAG, 1)

Reply:

FS = f1 + f2*2 + f3*4 + ... + fn*2^n-1 Type: Unsigned 16-bit Min: 0 Max: 65535

Where:

TABLE 15-16. FS - Read Status Flags

Advanced Digital Motor Controller User Manual 301


Commands Reference

Status bit Fault Activated when


f1 Serial The motor command is given via a serial interface (RS232,
RS485, TCP, USB). For more details see chapter Input
Command Modes and Priorities at section 6.
f2 Pulse The motor command is given via a Pulse Input (R/C radio,
PWM, Frequency). For more details see chapter Input
Command Modes and Priorities at section 6
f3 Analog The motor command is given via a Analog Input. For more
details see chapter Input Command Modes and Priorities
at section 6.
f4 FETs Off All the power MOSFETs of the controller are floated.
f5 Stall There is stall error in either of the motor channels.
f6 At Limit There is forward or reverse limit triggered in either of the
motor channels.
f7 STO Both STO inputs are grounded. In that case STO is
triggered and the power circuit is deactivated.
f8 RunScript A script is running.
f9 Setup The motor/sensor setup process is executed.

HS - Read Hall Sensor States


Alias: HSENSE HexCode: 31 CANOpen id: 0x2123

Description:
Reports that status of the hall sensor inputs. This function is mostly useful for trouble-
shooting. When no sensors are connected, all inputs are pulled high and the value 7 will
be replied. 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.

Syntax Serial: ?HS [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_HS, cc)


result = getvalue(_HSENSE, cc)

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

ICL - Is RoboCAN Node Alive


Alias: ICL HexCode: 46 CANOpen id: 0x2134

Description:
This query is used to determine if specific RoboCAN node is alive on CAN bus.

Syntax Serial: ?ICL cc

Argument: NodeId
Min: 1 Max: 127

Syntax Scripting: result = getvalue(_ICL, cc)

Reply:
ICL=nn Type: Unsigned 8-bit Min: 0 Max: 1

Where:
cc = Node Id
nn =
0 : Not present
1 : Alive

IDC – D-axis current command


HexCode: B5 CANOpen id: 0x2166

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.

Syntax Serial: ?IDC [cc]


Argument: Channel
Min: 1 Max: Total Number of channels
Syntax Scripting: result = getvalue(_IDC, cc)

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.

Advanced Digital Motor Controller User Manual 303


Commands Reference

IG – Read PID Integral Gains


Alias: - HexCode: A2 CANOpen id: 0x215D

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.

Syntax Serial: ?IG [cc]

Syntax Scripting: getvalue( _IG, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

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

aa: Integral Gain*1.000.000

IQC – D-axis current command


HexCode: B6 CANOpen id: 0x2167

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.

Syntax Serial: ?IQC [cc]


Argument: Channel

Min: 1 Max: Total Number of channels


Syntax Scripting: result = getvalue(_IQC, cc)

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.

LK - Read Lock status


Alias: LOCKED HexCode: 1D CANOpen id: 0x2124

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.

Syntax Serial: ?LK

Argument: None

Syntax Scripting: result = getvalue(_LK, 1)


result = getvalue(_LOCKED, 1)

Reply:
LK=ff Type: Unsigned 8-bit Min: 0 Max: 1

Where:
ff =
0 : unlocked
1 : locked

M - Read Motor Command Applied


Alias: MOTCMD HexCode: 01 CANOpen id: 0x2101

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.

Syntax Serial: ?M [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_M, cc)


result = getvalue(_MOTCMD, cc)

Advanced Digital Motor Controller User Manual 305


Commands Reference

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

MA - Read Field Oriented Control Motor Amps


Alias: MEMS HexCode: 25 CANOpen id: 0x211C

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.

Syntax Serial: ?MA nn


Argument: AmpsChannel
Min: 1 Max: 2 * Total Number of Motors (for BLDC drives)
Add: Min: 1 Max: Total Number of Motors (for DC brushed drives)

Syntax Scripting: result = getvalue(_MA, nn)


result = getvalue(_MEMS, nn)

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

MCB - Read Magsensor Markers Pattern


Alias: - HexCode: A8 CANOpen id: -

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.

Syntax Serial: ?MCB [cc]

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_MCB, cc)

Reply:
MCB = nn Type: Unsigned 8-bit Min: 0 Max: 255

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 =see Table below

TABLE 15-17. Marker Pattern Number

Marker Markers Left


Pattern Black: Tape Right
Number Red: Marker Transitions

L
L: 0
0
R: 0
R

Advanced Digital Motor Controller User Manual 307


Commands Reference

Marker Markers Left


Pattern Black: Tape Right
Number Red: Marker Transitions

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

Marker Markers Left


Pattern Black: Tape Right
Number Red: Marker Transitions

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

Advanced Digital Motor Controller User Manual 309


Commands Reference

MCU - Microprocessor Usage


Alias: - HexCode: A7 CANOpen id: -

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.

Syntax Serial: ?MCU

Syntax Scripting: result = getvalue(_MCU, 1)

Reply:
MCU = nn Type: Unsigned 8-bit Min: 0 Max: 100

Where:
nn =Percentage of the microprocessor usage.

MGD - Read Magsensor Track Detect


Alias: MGDET HexCode: 29 CANOpen id: 0x211D

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.

Syntax Serial: ?MGD [cc]

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_MGD, cc)


result = getvalue(_MGDET, cc)

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

MGM - Read Magsensor Markers


Alias: MGMRKR HexCode: 2B CANOpen id: 0x211F

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.

Syntax Serial: ?MGM [cc]

Argument: SensorNumber
Min: 1 Max: 2 * Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_MGM, cc)


result = getvalue(_MGMRKR, cc)

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

MGS - Read Magsensor Status


Alias: MGSTATUS HexCode: 2C CANOpen id: 0x2120

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.

Syntax Serial: ?MGS

Argument: SensorNumber
Min: None Max: Total Number of Pulse Inputs
Syntax Scripting: result = getvalue(_MGS, )
result = getvalue(_MGSTATUS, )

Advanced Digital Motor Controller User Manual 311


Commands Reference

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

MGT - Read Magsensor Track Position


Alias: MGTRACK HexCode: 2A CANOpen id: 0x211E

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.

Syntax Serial: ?MGT cc

Argument: Channel
Min: 1 Max: 3 * Total Number of Pulse Inputs

Syntax Scripting: result = getvalue(_MGT, cc)


result = getvalue(_MGTRACK, cc)

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

P - Read Motor Power Output Applied


Alias: MOTPWR HexCode: 02 CANOpen id: 0x2102

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.

Syntax Serial: ?P [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_P, cc)


result = getvalue(_MOTPWR, cc)

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

PG – Read PID Proportional Gains


Alias: - HexCode: A1 CANOpen id: 0x215C

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.

Syntax Serial: ?PG [cc]

Syntax Scripting: getvalue( _PG, cc)

Number of Arguments: 1

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: 2 x Total Number of Motors

Advanced Digital Motor Controller User Manual 313


Commands Reference

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

aa: Proportional Gain*1.000.000

PHA - Read Phase Amps


Alias: - HexCode: 49 CANOpen id: -

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.

Syntax Serial: ?PHA [cc]

Argument: Channel
Min: 1 Max: Total Number Of Current Sensors

Syntax Scripting: result = getvalue(_PHA, cc)

Reply:

PHA = aa Type: Signed 16-bit Min: -32767 Max: 32767

Where:

cc = Current Sensor
aa = Amps*10

PI - Read Pulse Inputs


Alias: PLSIN HexCode: 11 CANOpen id: 0x2148

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.

Syntax Serial: ?PI [cc]

Argument: InputNbr
Min: 1 Max: Total Number of Pulse Input

Syntax Scripting: result = getvalue(_PI, cc)


result = getvalue(_PLSIN, cc)

Reply:

PI=nn Type: Unsigned 16-bit Min: 0 Max: 65536

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.

PIC - Read Pulse Input after Conversion


Alias: PLSINC HexCode: 24 CANOpen id: 0x2149

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.

Syntax Serial: ?PIC [cc]

Argument: InputNbr
Min: 1 Max: Total Number of Pulse Input

Syntax Scripting: result = getvalue(_PIC, cc)


result = getvalue(_PLSINC, cc)

Reply:
PIC=nn Type: Signed 16-bit Min: -1000 Max: 1000

Where:
cc = Pulse input number
nn = Converted input value to +/-1000 range

Advanced Digital Motor Controller User Manual 315


Commands Reference

S - Read Encoder Motor Speed in RPM


Alias: ABSPEED HexCode: 03 CANOpen id: 0x2103

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.

Syntax Serial: ?S [cc]

Argument: Channel
Min: 1 Max: Total Number of Encoders

Syntax Scripting: result = getvalue(_S, cc)


result = getvalue(_ABSPEED, cc)

Reply:
S = nn Type: Signed 32-bit Min: -65535 Max: 65535

Where:
cc =Motor channel
nn = Speed in RPM

SCC - Read Script Checksum


Alias: SCC HexCode: 45 CANOpen id: 0x2133

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.

Syntax Serial: ?SCC

Argument: None

Syntax Scripting: result = getvalue(_SCC, 1)

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

SDT - Read Raw Redirect Received Frame as string


Alias: SDT HexCode: 90 CANOpen id: -

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.

Syntax Serial: ?SDT

Argument: None

Reply:
SDT=ss Type: String

Where:
ss = ASCII string

Example:
Q: ?SDT
R: SDT=Roboteq

SEC - Read Sensor Errors


Alias: SEC HexCode: 8D CANOpen id:

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.

Syntax Serial: ?SEC[cc]

Argument: Channel

Min:1 Max:Total Number of Motors

Syntax Scripting: result=getvalue(_SEC, cc)

Advanced Digital Motor Controller User Manual 317


Commands Reference

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.

SNA - Read Sensor Angle


Alias: - HexCode: 79 CANOpen id: -

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.

Syntax Serial: ?SNA [cc]

Argument: Channel
Min: 1 Max: Total Number Of Motors

Syntax Scripting: result = getvalue(_SNA, cc)

Reply:
SNA = aa Type: Unsigned 16-bit Min: 0 Max: 511

Where:

cc = Motor Channel
aa = Sensor Angle

SNS – Sense Voltage


Alias: - HexCode: 71 CANOpen id: 0x2172

Description:
It reads the instantaneous voltage of a specified phase of the motor and reports the value
in millivolts.

Syntax Serial: ?SNS [cc]

Syntax Scripting: result = GetValue(_SNS, cc)

Argument: Motor Phase Number


Min: 1(U Phase of Channel 1) Max: 6 (W Phase of Channel 2)

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.

SR - Read Encoder Speed Relative


Alias: RELSPEED HexCode: 07 CANOpen id: 0x2107

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.

Syntax Serial: ?SR [cc]

Argument: Channel
Min: 1 Max: Total Number of Encoders

Syntax Scripting: result = getvalue(_SR, cc)


result = getvalue(_RELSPEED, cc)

Reply:
SR = nn Type: Signed 16-bit Min: -1000 Max: 1000

Where:
cc = Motor channel
nn = Speed relative to max

SS - Read SSI Sensor Motor Speed in RPM


Alias: - HexCode: 6A CANOpen id: 0x213C

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.

Syntax Serial: ?SS [cc]

Argument: Channel
Min: 1 Max: Total Number of SSI sensors

Syntax Scripting: result = getvalue(_SS, cc)

Advanced Digital Motor Controller User Manual 319


Commands Reference

Reply:
SS = aa Type: Signed 32-bit Min: -65535 Max: 65535

Where:
cc = Motor channel
aa = Speed in RPM.

SSR - Read SSI Sensor Speed Relative


Alias: - HexCode: 6B CANOpen id: 0x213D

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.

Syntax Serial: ?SSR [cc]

Argument: Channel
Min: 1 Max: Total Number of SSI sensors

Syntax Scripting: result = getvalue(_SSR, cc)

Reply:
SSR = aa Type: Signed 16-bit Min: -1000 Max: 1000

Where:

cc = Motor channel
aa = Speed relative to max.

STT - STO Self-Test Result


Alias: - HexCode: 70 CANOpen id: -

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.

Syntax Serial: ?STT xx

320 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Runtime Queries

Argument: Fault Indication


Min: 1 (STO Result) Max: 2 (MOSFET Result)

Syntax Scripting: result = getvalue(_STT, xx)

Reply:

If xx = 1 (STO Result)
STT=ff Type Singed 32-bit Min: -1 Max: 4

Where ff=

-1: The test is in process


0: Test successful
1: STO1 failed the test
2: STO2 failed the test
3: Test failed using input values
5: Any of the Power MOSFETs is damaged.

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.

Advanced Digital Motor Controller User Manual 321


Commands Reference

Syntax Serial: ?T [cc]

Argument: SensorNbr
Min: 1 Max: 2*(Total Number of Motors) + 1

Syntax Scripting: result = getvalue(_T, cc)


result = getvalue(_TEMP, cc)

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

Syntax Serial: ?TM [ee]

Argument: Element
Min: None Max: 6

Syntax Scripting: result = getvalue(_TM, ee)


result = getvalue(_TIME, ee)

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

TR - Read Position Relative Tracking


Alias: TRACK HexCode: 20 CANOpen id: 0x2125

Description:
Reads the real-time value of the expected motor position in the position tracking closed
loop mode and in speed position.

Syntax Serial: ?TR [cc]

Argument: Channel
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_TR, cc)


result = getvalue(_TRACK, cc)

Reply:
TR=nn Type: Signed 32-bit Min: -2147M Max: 2147M

Where:
cc = Motor channel
nn = Position

TRN - Read Control Unit type and Controller Model


Alias: TRN HexCode: 1F CANOpen id:

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.

Advanced Digital Motor Controller User Manual 323


Commands Reference

Syntax Serial: ?TRN

Argument: None

Syntax Scripting: result = getvalue(_TRN, 1)

Reply:
TRN=ss Type: String

Where:
ss = Control Unit Id String:Controller Model Id String

Example:
Q: ?TRN
R:TRN=RCB500:HDC2460

UID - Read MCU Id


Alias: UID HexCode: 32 CANOpen id:

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.

Syntax Serial: ?UID [ee]

Argument: Element
Min: 1 Max: 5

Syntax Scripting: result = getvalue(_UID, ee)

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.

Syntax Serial: ?V [ee]

Argument: SensorNumber
Min: 1 Max: 3

Syntax Scripting: result = getvalue(_V, ee)


result = getvalue(_VOLTS, ee)

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

VAR - Read User Integer Variable


Alias: VAR HexCode: 06 CANOpen id: 0x2106

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.

Syntax Serial: ?VAR [ee]

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

Advanced Digital Motor Controller User Manual 325


Commands Reference

VSD – D-axis voltage command


HexCode: B7 CANOpen id: 0x2168

Description:
Reports the d-axis voltage derived from d-axis current controller output in Volts x10 units.

Syntax Serial: ?VSD [cc]


Argument: Channel
Min: 1 Max: Total Number of channels
Syntax Scripting: result = getvalue(_VSD, cc)

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.

VSQ – Q-axis voltage command


HexCode: B8 CANOpen id: 0x2169

Description:
Reports the q-axis voltage derived from q-axis current controller output in Volts x10 units.

Syntax Serial: ?VSQ [cc]


Argument: Channel
Min: 1 Max: Total Number of channels

Syntax Scripting: result = getvalue(_VSQ, cc)

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.

SL - Read Slip Frequency


Alias: SL HexCode: 48 CANOpen id: 0x2136

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

Syntax Serial: ?SL [cc]

Argument: VarNumber
Min: 1 Max: Total Number of Motors

Syntax Scripting: result = getvalue(_SL, cc)

Reply:

SL=nn Type: Signed 16-bit Min: -32768 Max: 32768

Where:
cc = Motor channel
nn = Slip Frequency in Hertz * 10

DS402 Runtime Queries


DS402 is supported only in BLDC and DC products. Runtime queries created to support
DS402 specification are described below:

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)

Advanced Digital Motor Controller User Manual 327


Commands Reference

Command Arguments Description


SDC Element Velocity Deceleration (DS402)
SDM None Supported Drive Modes (DS402)
SPC Channel Value Target Profile Velocity (DS402)
SPL Element Velocity Min/Max Amount (DS402)
SW Channel Status Word (DS402)
TC Channel Target Torque (DS402)
TOF Channel Torque Offset (DS402)
TRQ Channel Torque Actual Value (DS402)
TSL Channel Torque Slope (DS402)
VDV Channel Value Velocity Demand Value (DS402)
VSA Channel Value Velocity Sensor Actual Value (DS402)
VDV Channel Velocity Demand (DS402)
VNM None Version Number (DS402)
VOF Channel Velocity Offset (DS402)

AOM – Modes of Operation Display (DS402)


Alias: AOM HexCode: 63 CANOpen id: 0x6061

Description:
Read the actual operation mode.

Syntax Serial: ?AOM [cc]

Reply: AOM=nn

Syntax Scripting: nn = GetValue(_AOM, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 8-bit

Where:

cc = Motor channel
nn = Actual operation mode (see the table below).

TABLE 15-19. Operation Modes


Value Definition Roboteq Operation Mode
-4¹ Velocity Mode Closed Loop Speed Position
-31
Profile Velocity Mode Closed Loop Speed Position
-21 Profile Position Mode Closed Loop Position Tracking Mode²
-11
Profile Position Mode Closed Loop Position Relative Mode2

328 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

Value Definition Roboteq Operation Mode


0 No Mode Open Loop Mode
1 Profile Position Mode Closed Loop Count Position Mode
2 Velocity Mode Closed Loop Speed Mode
3 Profile Velocity Mode Closed Loop Speed Mode
4 Torque Profile Mode Closed Loop torque Mode
8 Cyclic Synchronous Position Mode Closed Loop Count Position Mode
9 Cyclic Synchronous Velocity Mode Closed Loop Speed Mode
10 Cyclic Synchronous Torque Mode Closed Loop Torque Mode
¹Roboteq Specific Modes
2
Not all Profile Position features can be supported with this mode.

CW – Control Word (DS402)


Alias: CW HexCode: 56 CANOpen id: 0x6040

Description:
Read the value of the control word.

Syntax Serial: ?CW [cc]

Reply: CW=nn

Syntax Scripting: nn = GetValue(_CW, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 16-bit

Where:

cc = Motor channel
nn = Control word value

SPE – Velocity Actual Value (DS402)


Alias: SPE HexCode: 96 CANOpen id: 0x6044, and 0x606C

Description:
Reads the velocity actual value in RPM.

Syntax Serial: ?SPE [cc]

Reply: SPE=nn

Syntax Scripting: nn = GetValue(_SPE, cc)

Advanced Digital Motor Controller User Manual 329


Commands Reference

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 32-bit

Where:

cc = Motor channel
nn = Velocity actual value

FEW - Following Error Window (DS402)

Alias: FEW HexCode:99 CanOpen id: 0x6065

Description:
Read the configured following error window for the position mode in counts. If the value
is FFFF FFFFh, the following control is disabled.

Syntax Serial: ?FEW [cc]


Reply: FEW=nn

Syntax Scripting: nn=SetCommand(_FEW, cc)

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Result: Value Type Unsigned 32-bit

Where:
cc= Motor Channel
nn = Following error window in counts

FET - Following Error Time Out (DS402)

Alias: FET HexCode:9A CanOpen id: 0x6066

Description:
Read the configured following error time out for the position mode in milliseconds.

Syntax Serial: ?FET[cc]

Reply: FET=nn

Syntax Scripting: nn = SetCommand(_FET, cc)

330 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 16-bit

Where:
cc = Motor channel
nn= Following error time out

HMD – Homing Method (DS402)

Alias: - HexCode: AD CANOpen id: 0X6098

Description:

Read the Homing Method that is used.

Syntax Serial: ?HMD [ee]

Reply: HMD = nn

Syntax Scripting: nn=getvalue(_HMD, ee)

Argument : Channel Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Result: Homing Method number Type: Unsigned 8-bit


Min: 0 Max: 255

HSP – Homing Speed (DS402)


Alias: - HexCode: AE CANOpen id: 0X6099

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).

Syntax Serial: ?HSP [ee]

Reply: HSP = nn

Syntax Scripting: nn=getvalue(_HSP, ee)

Argument : Channel Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Advanced Digital Motor Controller User Manual 331


Commands Reference

Result: Homing Speed (RPM) Type: Unsigned 32-bit


Min: 0 Max: 20000

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

INT - Interpolation Time Period (DS402)

Alias: INT HexCode: 9C CanOpen id: 0x60C2

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>

Syntax Serial: ?INT [ee]

Reply: INT=nn

Syntax Scripting: nn=GetValue(_INT,ee)

Argument: Element Type:Unsigned 8-bit

Min: 1 Max: 2xTotal number of motors

Result: Value Type: element 1: Unsigned 8-bit

element 2: Signed 8-bit

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

MSL - Max Motor Speed (DS402)

Alias: MSL HexCode: 9B CanOpen id: 0x6080

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.

Syntax Serial: ?MSL[cc]

Reply: MSL=nn

Syntax Scripting: nn = GetValue(_MSL, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 32-bit

PAC – Profile Acceleration (DS402)


Alias: PAC HexCode: 5E CANOpen id: 0x6083

Description:
Read the configured acceleration in 10×RPM/second.

Syntax Serial: ?PAC [cc]

Reply: PAC=nn

Syntax Scripting: nn = GetValue(_PAC, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 32-bit

Where:

cc = Motor channel
nn = Profile acceleration in 10×RPM/second

Advanced Digital Motor Controller User Manual 333


Commands Reference

PDC – Profile Deceleration (DS402)


Alias: PDC HexCode: 5F CANOpen id: 0x6084

Description:
Read the configured deceleration in 10×RPM/second.

Syntax Serial: ?PDC [cc]

Reply: PDC=nn

Syntax Scripting: nn = GetValue(_PDC, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 32-bit

Where:

cc = Motor channel
nn = Profile deceleration in 10×RPM/second

PLT - Software Position Limit (DS402)

Alias: PLT HexCode: 9D CanOpen id: 0x607D

Description:
Read the position limits.

Syntax Serial: ?PLT [ee]

Reply: PLT=nn

Syntax Scripting: nn = GetValue(_PLT, cc)

Argument: element Type: Unsigned 8-bit


Min: 1 Max: 2xTotal number of motors

Result: Value Type: element 1: Unsigned 8-bit


element 2: Signed 8-bit

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

3: Software position min limit for channel 2


4: Software position max limit for channel 2
...
2x(m-1)+1: Software position min limit for channel m
2x(m-1)+2: Software position max limit for channel m

POF - Position Offset (DS402)


Alias: POF HexCode: B0 CANOpen id: 0x60B0

Description:
Read the position offset.

Syntax Serial: ?POF [cc]

Reply: POF = nn

Syntax Scripting: result = getvalue(_POF, cc)

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of motors

Result: Counts Type: Signed 32-bit.

PST - Position Actual Value

Alias: PST HexCode: 95 CanOpen id: 0x6064

Description:
Read the actual value of the position sensor.

Syntax Serial: ?PST[cc]

Reply: PST=nn

Syntax Scripting: nn = GetValue(_PST, cc)

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Result: Value Type: Singed 32-bit

Advanced Digital Motor Controller User Manual 335


Commands Reference

POS – Target Position (DS402)


Alias: POS HexCode: 5C CANOpen id: 0x607A

Description:
Read the configured target position.

Syntax Serial: ?POS [cc]

Reply: POS=nn

Syntax Scripting: nn = GetValue(_POS, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 32-bit

Where:

cc = Motor channel
nn = Target position

PSP – Profile Velocity (DS402)


Alias: PSP HexCode: 5D CANOpen id: 0x6081

Description:
Read the configured velocity in RPM.

Syntax Serial: ?PSP [cc]

Reply: PSP=nn

Syntax Scripting: nn = GetValue(_PSP, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 16-bit

Where:

cc = Motor channel
nn = Profile velocity

336 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

RMP – VL Velocity Demand (DS402)


Alias: RMP HexCode: 62 CANOpen id: 0x6043

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.

Syntax Serial: ?RMP [cc]

Reply: RMP=nn

Syntax Scripting: nn = GetValue(_RMP, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 32-bit

Where:

cc = Motor channel
nn = Velocity in RPM

ROM – Modes of Operation (DS402)


Alias: ROM HexCode: 5A CANOpen id: 0x6060

Description:
Read the configured modes of operation.

Syntax Serial: ?ROM [cc]

Reply: ROM=nn

Syntax Scripting: nn = GetValue(_ROM, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 8-bit

Where:

cc = Motor channel
nn = Modes of operation

Advanced Digital Motor Controller User Manual 337


Commands Reference

S16 – Target Velocity (DS402)


Alias: MOTVEL HexCode: 03 CANOpen id: 0x6042

Description:
Read the target velocity in RPM for velocity mode. Positive values shall indicate forward
direction and negative values shall indicate reverse direction.

Syntax Serial: ?S [cc]

Reply: S=nn

Syntax Scripting: nn = GetValue(_S, cc)

nn = GetValue(_MOTVEL, cc)

Argument: Channel: Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Signed 16-bit

Min: -500000 Max: 500000

Where:

cc = Motor channel
nn = Target velocity in RPM

SAC – Velocity Acceleration (DS402)


Alias: SAC HexCode: 58 CANOpen id: 0x6048

Description:
Read the configured velocity acceleration.

Syntax Serial: ?SAC [ee]

Reply: SAC=nn

Syntax Scripting: nn = GetValue(_SAC, ee)

Argument: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Result: Value Type: Unsigned 32-bit

Where:

ee =

1: Delta speed in 10×RPM for channel 1


2: Delta time in seconds for channel 1

338 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

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

SDC – Velocity Deceleration (DS402)


Alias: SDC HexCode: 59 CANOpen id: 0x6049

Description:
Read the configured velocity deceleration.

Syntax Serial: ?SDC [ee]

Reply: SDC=nn

Syntax Scripting: nn = GetValue(_SDC, ee)

Argument: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Result: Value Type: Unsigned 32-bit

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

SDM – Supported Drive Modes (DS402)


Alias: SDM HexCode: 64 CANOpen id: 0x6502

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).

Advanced Digital Motor Controller User Manual 339


Commands Reference

Syntax Serial: ?SDM

Reply: SDM=nn

Syntax Scripting: nn = GetValue(_SDM)

Result: Value Type: Unsigned 32-bit

Where:

nn = Supported drive modes

SPL – Velocity Min/Max Amount (DS402)


Alias: SPL HexCode: 57 CANOpen id: 0x6046

Description:
Read the configured minimum and maximum amount of velocity in RPM.

Syntax Serial: ?SPL [ee]

Reply: SPL=nn

Syntax Scripting: nn = GetValue(_SPL, ee)

Argument: Element Type: Unsigned 8-bit

Min: 1 Max: 2 × Total number of motors

Result: Value Type: Unsigned 32-bit

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

SW – Status Word (DS402)


Alias: SW HexCode: 61 CANOpen id: 0x6041

Description:
Read the status of the PDS FSA.

340 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

TABLE 15-20. Status Word Mapping


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NU OMS ILA TR RM MS W SOD QS VE F OE SO RTSO
MSB LSB
NU  Not Used, OMS  Operation mode specific, ILA  Internal limit active
TR  Target reached, RM  Remote, W  Warning, SOD  Switch on disabled,
QS  Quick stop, VE  Voltage enabled, F  Fault, OE  Operation Enabled,
SO  Switch on RTSO  Ready to switch on.

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.

TABLE 15-21. State Coding

Status Word PDS FSA state


xxxx xxxx x0xx 0000b Not ready to switch on
xxxx xxxx x1xx 0000b Switch on disabled
xxxx xxxx x01x 0001b Ready to switch on
xxxx xxxx x01x 0011b Switched on
xxxx xxxx x01x 0111b Operation enabled
xxxx xxxx x00x 0111b Quick stop active
xxxx xxxx x0xx 1111b Fault reaction active
xxxx xxxx x0xx 1000b Fault

TABLE 15-22. Definition of Bit 10

Bit Value Definition


Halt (bit 8 in control word) = 0: Speed or Position Target not reached
0
Halt (bit 8 in control word) = 1: Axis decelerates
10
Halt (bit 8 in control word) = 0: Speed or Position Target reached
1
Halt (bit 8 in control word) = 1: Velocity of axis is 0
Note: In Roboteq controllers, Halt operation mode is 2. Slow down on slow down ramp
and stay in operation enable.

Advanced Digital Motor Controller User Manual 341


Commands Reference

Profile Position Mode

TABLE 15-23. Status Word Mapping in Profile Position Mode

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.

Profile Torque Mode

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.

TABLE 15-24. Statusword for profile torque mode


1514 1312 11 10 90
see Table 15-20 reserved see Table 15-20 Target reached see Table 15-20
MSB LSB

TABLE 15-25. Definition of bit 10


Bit Value Definition
10 0 Halt (bit 8 in controlword) = 0: Target torque not reached
Halt (bit 8 in controlword) = 1: Axis decelerates
1 Halt (bit 8 in controlword) = 0: Target torque reached
Halt (bit 8 in controlword) = 1: Velocity of axis is 0

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.

TABLE 15-26. Statusword for velocity mode

1514 1312 11 10 90


see Table 15-20 reserved (0) see Table 15-20 reserved (0) see Table 15-20
MSB LSB

342 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
DS402 Runtime Queries

Cyclic Synchronous Position Mode


The cyclic synchronous position mode uses three bits of the statusword for mode-specific
purposes. Table 15-27 shows the structure of the statusword. Table 15-28 defines the val-
ues for bit 10, 12, and 13 of the statusword.

TABLE 15-27. Statusword for profile cyclic synchronous position mode


1514 13 12 11 10 90
Drive follows
see Table 15-20 Following error the command see Table 15-20 reserved see Table 15-20
value
MSB LSB

TABLE 15-28. Definition of bit 10, bit 12, and bit 13

Bit Value Definition


10 0 Reserved
1 Reserved
12 0 Drive does not follow the command value – Target position ignored
1 Drive follows the command value – Target position used as input to
position control loop
13 0 No following error
1 Following error

Cyclic Synchronous Velocity Mode and Cyclic Synchronous Torque Mode


The Cyclic synchronous velocity and Cyclic synchronous torque mode use some bits of
statusword. Table 15-29 shows the structure of the statusword. Table 15-30) defines the
values for bit 10, 12, and 13 of the statusword.

TABLE 15-29. Statusword for profile cyclic synchronous velocity mode


1514 13 12 11 10 90
Drive follows
see Table 15-20 reserved the command see Table 15-20 reserved see Table 15-20
value
MSB LSB

TABLE 15-30. Definition of bit 10, bit 12, and bit 13

Bit Value Definition


10 0 Reserved
1 Reserved
12 0 Target velocity or torque ignored
1 Target velocity or torque used as input to velocity or torque control loop.
13 0 Reserved
1 Reserved

Advanced Digital Motor Controller User Manual 343


Commands Reference

Profile Velocity Mode

TABLE 15-31. Status Word Mapping in Profile Velocity Mode

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.

TABLE 15-32. Definition of bit 12 in Profile Velocity Mode

Bit Value Definition


0 Speed is not equal 0
12
1 Speed is equal 0

TABLE 15-33. Definition of Bit 12 in Profile Position Mode

Bit Value Definition


0 Previous set-point already processed, waiting for new set-point
12
1 Previous set-point still in process, set-point overwriting shall be accepted

Syntax Serial: ?SW [cc]

Reply: SW=nn

Syntax Scripting: nn = GetValue(_SW, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 16-bit

Where:
cc = Motor channel
nn = Status word value

TC – Target Torque (DS402)


Alias: TC HexCode: 5B CANOpen id: 0x6071

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.

Syntax Serial: ?TC [cc]

Reply: TC=nn

Syntax Scripting: nn = GetValue(_TC, cc)

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Result: Value Type: Signed 16-bit

Where:
cc = Motor channel
nn = Torque input value in 100×Nm

TOF - Torque Offset (DS402)


Alias: TOF HexCode: B2 CANOpen id: 0x60B2

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.

Syntax Serial: ?TOF [cc]

Reply: TOF = nn

Syntax Scripting: result = getvalue(_TOF, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total Number of motors

Result: miliNm Type: Signed 32-bit.

TRQ – Target Torque (DS402)


Alias: TRQ HexCode: 7A CANOpen id: 0x6077

Description:
Read the actual torque in 100×Nm. Beware in order to have correct values make sure to
have configured appropriately configuration command TNM.

Advanced Digital Motor Controller User Manual 345


Commands Reference

Syntax Serial: ?TRQ [cc]

Reply: TRQ=nn

Syntax Scripting: nn = GetValue(_TRQ, cc)

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Result: Value Type: Signed 16-bit

Where:

cc = Motor channel
nn = Actual torque 100×Nm

TSL – Torque Slope (DS402)


Alias: TSL HexCode: 60 CANOpen id: 0x6087

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.

Syntax Serial: ?TSL [cc]

Reply: TSL=nn

Syntax Scripting: nn = GetValue(_TSL, cc)

Argument: Channel Type: Unsigned 8-bit

Min: 1 Max: Total number of motors

Result: Value Type: Unsigned 32-bit

Where:

cc = Motor channel
nn = Torque slope

VDV – Velocity Demand (DS402)


Alias: - HexCode: 97 CANOpen id: 0x606B

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

Syntax Serial: ?VDV [cc]

Argument: Channel Type: Unsigned 8-bit


Min: 1 Max: Total number of motors

Syntax Scripting: nn = GetValue(_VDV, cc)

Reply: RMP=nn Type: Signed 32-bit Min: -65535 Max: 65535

Where:
cc = Motor channel
nn = Velocity demand in RPM

VNM – Version Number (DS402)


Alias: VNM HexCode: 65 CANOpen id: 0x67FE

Description:
Read the version number of the CiA 402 profile.

Syntax Serial: !VNM

Reply: VNM=nn

Syntax Scripting: nn = GetValue(_TSL)

Result: Value Type: Unsigned 32-bit

Where:

nn = Version number

VOF - Velocity Offset (DS402)


Alias: VOF HexCode: B1 CANOpen id: 0x60B1

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.

Syntax Serial: ?VOF [cc]

Reply: VOF = nn

Syntax Scripting: result = getvalue(_VOF, cc)

Argument: Channel Type: Unsigned 8-bit

Advanced Digital Motor Controller User Manual 347


Commands Reference

Min: 1 Max: Total Number of motors

Result: RPM Type: Signed 32-bit.

Query History Commands


Every time a Real Time Query is received and executed, it is stored in a history buffer
from which it can be recalled. The buffer will store up to 16 queries. If more than 16 que-
ries are received, the new one will be added to the history buffer while the firsts are re-
moved in order to fit the 16 query buffer.

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.

TABLE 15-34. Query History Commands


Command Description
# Send the next value. Stop automatic sending
#C Clear buffer history
# nn Start automatic sending
# xx nn Start automatic sending for specific stream
/”<prefix>”,”<delimiter>”?Q cc Create data streams
//? Dump the streams’ prefixes and delimiters

# - Send Next History Item / Stop Automatic Sending


A # alone will call and execute the next query in the buffer. If the controller was in the
process of automatically sending queries from the buffer, then receiving a # will cause the
sending to stop.

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:

QQ = is reply to query in the buffer.

348 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Query History Commands

# C - Clear Buffer History


This command will clear the history buffer of all queries that may be stored in it. If the
controller was in the process of automatically sending queries from the buffer, then re-
ceiving this command will also cause the sending to stop

Syntax:
#C

Reply: None

# nn - Start Automatic Sending


This command will initiate the automatic retrieving and execution of queries from the
history buffer. The number that follows the command is the time in milliseconds between
repetition. A single query is fetched and executed at each time interval.

Syntax:
# nn

Reply: QQ at every nn time intervals

Where:
QQ = is reply to query in the buffer.
nn = time in ms

Range: nn = 1 to 32000ms

# xx nn - Start automatic sending for specific stream


Using this syntax one can set the refresh rate of each stream. This is used only in case of
using streams.

Syntax:

# xx nn

Reply: The respective stream at every nn ms.

Where:
xx = the stream.
nn = time in ms.

/?Q cc - Create data streams


Using this syntax the next queries that are going to be sent will be printed after a prefix
and separated by a delimiter. The default prefix is none and the default delimiter is tab.
There can be created up to 3 streams and can have different refresh rates.

Advanced Digital Motor Controller User Manual 349


Commands Reference

Syntax:

/”<prefix>”,”<delimiter>”?Q cc

Reply: The regular reply of the query ?Q cc.

Where:

Q = is reply the query symbol.


cc = motor channel
prefix = the prefix for the stream
delimiter = the delimiter for the stream

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:

/”d=”,”:”?p 1_?a 1_?s 1_# 50


Two more stream examples are shown below:

/”f=”,”:”?t 1_?v 2_?v 3_# 100

/?p 1_?f 1_?e 1_# 200

The outcome of these three streams are shown in the image below:

FIGURE 15-2. Data streams

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.

//? - Dump the streams’ prefixes and delimiters


Using this syntax one can see in each of the 3 streams which prefix and delimiter is set.
In that case one can know which stream respects to each stream number.

FIGURE 15-3. Data streams prefixes

Maintenance Commands
This section contains a few commands that are used occasionally to perform mainte-
nance functions.

TABLE 15-35. Maintenance Commands


Command Arguments Description
CLMOD None Motor/Sensor Setup
CLSAV Key Save calibrations to Flash
DFU Key Update Firmware via USB/CANOpen
EELD None Load Parameters from EEPROM
EELOG None Dump Flash Log Data
EERST Key Reset Factory Defaults
EESAV None Save Configuration in EEPROM
ERASE None Erase Flash Log Data
LK Key Lock Configuration Access

Advanced Digital Motor Controller User Manual 351


Commands Reference

TABLE 15-31. Maintenance Commands


Command Arguments Description
RESET Key Reset Controller
SLD Key Script Load
STIME Time Set Time
UK Key Unlock Configuration Access

CLMOD – Motor/Sensor Setup


Argument: None

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.

Note: The motor will spin.

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)

CLSAV - Save calibrations to Flash


Argument: Key

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

DFU - Update Firmware via USB/CANOpen


Argument: Key

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

EELD - Load Parameters from EEPROM


Argument: None

Description:
This command reloads the configuration that are saved in EEPROM back into RAM and
activates these settings.

Syntax:
%EELD

EELOG - Dump Flash Log Data


Argument: None

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

EERST - Reset Factory Defaults


Argument: Key

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.

Advanced Digital Motor Controller User Manual 353


Commands Reference

Syntax:
%EERST safetykey

Where:
safetykey = 321654987

EESAV - Save Configuration in EEPROM


Argument: None

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

ERASE - Erase Flash Log Data


Argument:None

Description:
This command is used in order to Erase the Flash Log Data.

Syntax: %ERASE

LK - Lock Configuration Access


Argument: Key

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)

RESET - Reset Controller


Argument: Key

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

SLD - Script Load


Argument: Key

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

STIME - Set Time


Argument: Hours Mins Secs

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

UK - Unlock Configuration Access


Argument: Key

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)

Advanced Digital Motor Controller User Manual 355


Commands Reference

Set/Read Configuration Commands


These commands are used to set or read all the operating parameters needed by the con-
troller for its operation. Parameters are loaded from EEPROM into RAM, from where they
are and then used every time the controller is powered up or restarted.

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:

^UVL 100 : Sets Undervoltage limit to 10.0V


^OVL 400 : Sets Overvoltage limit to 40.0V

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.

^ALIM 1 250 : Sets Amps limit for channel 1 to 25.0A


^AMIN 4 2000 : Sets low range of analog input 4 to 2000

Using 0 as the first parameter value will cause all elements to be loaded with the same
content.

^ADB 0 10 : Sets the deadband of all analog inputs to 10%

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

Reply: ALIM= 750:650


~ALIM 2: Read Amps limit for channel 2

Reply: ALIM= 650

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.

Configuration Read Protection


The controller may be locked to prevent the configuration parameters to be read. Given
the large number of possible configurations, this feature provides effective system-level
copy protection. The controller will reply to configuration read requests only if the read
protection is unlocked. If locked, the controller will respond a “-” character.

General Configuration and Safety


The commands in this group are used to configure the controller’s general and safety
settings.

TABLE 15-36. General and Safety Configurations


Command Arguments Description
ACS Enable Analog Center Command to Start
AMS Enable Analog keep within Guard Bands
BEE Address Value User Storage in Battery Backed RAM
BRUN Enable Script Auto-Start
CLIN Channel Linearity Command Linearity
CPRI Level Command Command Priorities
DFC Channel Value Default Command value
DMOD Mode Modbus Mode
ECHOF OffOn Enable/Disable Serial Echo
EE Address Data User-Defined Values

Advanced Digital Motor Controller User Manual 357


Commands Reference

Command Arguments Description


FLCL None Automatic Fault Clearance
ISM None Raw Redirect Mode
MDAL Option Modbus Data Alignment
MNOD ID Modbus Slave ID
PMS Enable Pulse keep within Min & Max Safety
RS485 Enable Enable RS485
RSBR BitRate Set RS232/RS485 baudrate
RWD Timeout Serial Data Watchdog
SCRO Port Select Print output port for scripting
STO Enable Safe Torque Off
TELS String Telemetry string

ACS - Analog Center Command to Start


HexCode: 0B CANOpen id: 0x300B

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.

Syntax Serial: ^ACS nn


~ACS

Syntax Scripting: setconfig(_ACS, nn)

Number of Arguments: 1

Argument 1: Enable

Type: Unsigned 8-bit


Min: 0 Max: 1
Default: 1

Where:
nn =
0: Safety disabled
1: Safety enabled

AMS - Analog keep within Guard Bands


HexCode: 0C CANOpen id: 0x300C

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

Syntax Serial: ^AMS nn


~AMS

Syntax Scripting: setconfig(_AMS, nn)

Number of Arguments: 1

Argument 1: Enable
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 1 = Enabled

Where:
nn =
0: Disabled
1: Enabled

BEE - User Storage in Battery Backed RAM


HexCode: 64 CANOpen id: 0x3064

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.

Syntax Serial: ^BEE aa dd


~BEE aa

Syntax Scripting: setconfig(_BEE, aa, dd)

Number of Arguments: 2

Argument 1: Address

Min: 1 Max: Total Number of BEE

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

Advanced Digital Motor Controller User Manual 359


Commands Reference

BRUN - Script Auto-Start


HexCode: 48 CANOpen id: 0x3048

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.

Syntax Serial: ^BRUN nn


~BRUN

Syntax Scripting: setconfig(_BRUN, nn)

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

CLIN - Command Linearity


HexCode: 0D CANOpen id: 0x300D

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.

Syntax Serial: ^CLIN cc nn


~CLIN [cc]

Syntax Scripting: setconfig(_CLIN, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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

CPRI - Command Priorities


HexCode: 07 CANOpen id: 0x3007

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.

Syntax Serial: ^CPRI pp nn


~CPRI [pp]

Syntax Scripting: setconfig(_CPRI, pp, nn)

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

Advanced Digital Motor Controller User Manual 361


Commands Reference

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.

DFC - Default Command value


HexCode: 0E CANOpen id: 0x300E

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.

Syntax Serial: ^DFC cc nn


~DFC [cc]

Syntax Scripting: setconfig(_DFC, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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.

DMOD – Modbus Mode


HexCode: A1 CANOpen id: 0x30A1

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

Syntax Serial: ^DMOD nn


~DMOD

Syntax Scripting: setconfig(_DMOD, nn)

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.

ECHOF - Enable/Disable Serial Echo


HexCode: 09 CANOpen id: 0x3009

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.

Syntax Serial: ^ECHOF nn


~ECHOF

Syntax Scripting: setconfig(_ECHOF, nn)

Number of Arguments: 1

Argument 1: OffOn
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Echo on

Advanced Digital Motor Controller User Manual 363


Commands Reference

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.

Syntax Serial: ^EE aa dd


~EE aa

Syntax Scripting: setconfig(_EE, aa, dd)

Number of Arguments: 2

Argument 1: Address

Min: 1 Max: Total Number of Storage words


Argument 2: Data
Type: Signed 16-bit
Min: -32768 Max: +32767
Default: 0
Where:

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.

Avoid transferring to Flash while the product is performing critical operation.

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

FLCL – Automatic Fault Clearance

HexCode: FE CANOpen Id: 0x30FE

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.

Syntax Serial: ^FLCL nn

~FLCL

Syntax Scripting: setconfig(_FLCL, nn)

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.

ISM - Raw Redirect Mode


HexCode: E9 CANOpen id: 0x30E9

Description:
Configure this parameter in order to enable Raw Redirect Mode and the interface to be
used.

Syntax Serial: ^ISM nn


~ISM

Syntax Scripting: setconfig(_ISM, nn)

Number of Arguments: 1

Advanced Digital Motor Controller User Manual 365


Commands Reference

Argument 1: Raw Redirect Mode


Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0

Where:
nn =
0: Off
2: RS232
4: RS485

Example:
^ISM 1: Enable ModbusRaw Redirect mode on RS232 interface.

MDAL – Modbus Data Alignment


HexCode: CA CANOpen id: 0x30CA

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.

Syntax Serial: ^MDAL nn


~MDAL

Syntax Scripting: setconfig(_MDAL, nn)

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

MNOD – Modbus Slave ID


HexCode: A2 CANOpen id: 0x30A2

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.

Syntax Serial: ^MNOD nn


~MNOD

Syntax Scripting: setconfig(_MNOD, nn)

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.

PMS - Pulse keep within Min & Max Safety


HexCode: F4 CANOpen id: 0x30F4

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.

Syntax Serial: ^PMS nn


~PMS

Syntax Scripting: setconfig(_PMS, nn)

Number of Arguments: 1

Argument 1: Enable
Type: Unsigned 8-bit

Advanced Digital Motor Controller User Manual 367


Commands Reference

Min: 0 Max: 1
Default: 1 = Enabled

Where:
nn =
0: Disabled
1: Enabled

RSBR - Set RS232/RS485 baudrate


HexCode: 0A CANOpen id: 0x300A

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).

Syntax Serial: ^RSBR nn


~RSBR

Syntax Scripting: setconfig(_RSBR, nn)

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.

RS485 - Enable RS485


HexCode: D0 CANOpen id: 0x30D0

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.

Syntax Serial: ^RS485 nn


~ RS485

Syntax Scripting: setconfig(_RS485, nn)

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.

RWD - Serial Data Watchdog


HexCode: 08 CANOpen id: 0x3008

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.

Syntax Serial: ^RWD nn


~RWD

Syntax Scripting: setconfig(_RWD, nn)

Number of Arguments: 1

Advanced Digital Motor Controller User Manual 369


Commands Reference

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

SCRO - Select Print output port for scripting


HexCode: 5E CANOpen id: 0x305E

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.

Syntax Serial: ^SCRO nn


~SCRO

Syntax Scripting: setconfig(_SCRO, nn)

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

STO – STO Enable


HexCode: CF CANOpen id: 0x30CF

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

Syntax Serial: ^STO nn


~STO

Syntax Scripting: setconfig(_STO, nn)

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:

^STO 1: Enable STO functionality.

TELS - Telemetry String


HexCode: 47 CANOpen id: 0x3047

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 Serial: ^TELS “string”


~TELS

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.

Advanced Digital Motor Controller User Manual 371


Commands Reference

Analog, Digital, Pulse IO Configurations


These parameters configure the operating mode and how the inputs and outputs work.

TABLE 15-37. Input/Output Configurations


Command Arguments Description
ACTR InputNbr Center Analog Input Center (0)
ADB InputNbr Deadband Analog Input Deadband
AINA InputNbr Use Analog Input Use
ALIN InputNbr Linearity Analog Input Linearity
AMAX InputNbr Max Analog Input Max
AMAXA InputNbr Action Analog Input Action at Max
AMIN InputNbr Min Analog Input Min
AMINA InputNbr Action Analog Input Action at Min
AMOD InputNbr Mode Analog Conversion Type
APOL InputNbr Polarity Analog Input Conversion Polarity
AUXV None Digital Output High Side Drive Voltage
Level
DINA InputNbr Action Digital Input Action
DINL ActiveLevels Digital Input Active Level
DOA OutputNbr Action Digital Output Action
DOL ActiveLevels Digital Outputs Active Level
DOT OutputNbr Action Digital Output Type
ENCO None Encoder Output Enable
PCTR InputNbr Center Pulse Input Center
PDB InputNbr Deadband Pulse Input Deadband
PINA InputNbr Use Pulse Input Use
PLIN InputNbr Linearity Pulse Input Linearity
PMAX InputNbr Max Pulse Input Max
PMAXA InputNbr Action Pulse Input Action at Max
PMIN InputNbr Min Pulse Input Min
PMINA InputNbr Action Pulse Input Action at Min
PMOD InputNbr Mode Pulse Input Capture Type
PPOL InputNbr Polarity Pulse Input Capture Polarity

372 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations

ACTR - Analog Input Center (0)


HexCode: 16 CANOpen id: 0x3016

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.

Syntax Serial: ^ACTR cc nn


~ACTR [cc]

Syntax Scripting: setconfig(_ACTR, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Analog Inputs


Argument 2: Center
Type: Unsigned 16-bit
Min: 0 Max: 10000
Default: 2500 mV
Where:
cc = Analog input channel
nn = 0 to 10000mV

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)

ADB - Analog Input Deadband


HexCode: 17 CANOpen id: 0x3017

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.

Advanced Digital Motor Controller User Manual 373


Commands Reference

Syntax Serial: ^ADB cc nn


~ADB [cc]

Syntax Scripting: setconfig(_ADB, cc, nn)

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:

cc = Analog input channel


nn = Deadband in %

Example:
^ADB 6 10 : Sets Deadband for channel 6 at 10%

Note:
Deadband is not used when input is used as feedback

AINA - Analog Input Use


HexCode: 19 CANOpen id: 0x3019

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.

Syntax Serial: ^AINA cc (nn + mm)


~AINA [cc]

Syntax Scripting: setconfig(_AINA, cc, nn)

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)

ALIN - Analog Input Linearity


HexCode: 18 CANOpen id: 0x3018

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.

Syntax Serial: ^ALIN cc nn


~ALIN [cc]

Syntax Scripting: setconfig(_ALIN, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Analog Inputs

Argument 2: Linearity
Type: Unsigned 8-bit
Min: 0 Max: 6
Default: 0 = Linear
Where:

cc = Analog input channel


nn =
0: Linear (no change)
1: Exp weak
2: Exp medium
3: Exp strong
4: Log weak

Advanced Digital Motor Controller User Manual 375


Commands Reference

5: Log medium
6: Log strong

Example:
^ALIN 1 1 : Sets linearity for channel 1 to exp weak

AMAX - Analog Input Max


HexCode: 15 CANOpen id: 0x3015

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.

Syntax Serial: ^AMAX cc nn


~AMAX [cc]

Syntax Scripting: setconfig(_AMAX, cc, nn)

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:

cc = Analog input channel


nn = 0 to 10000mV

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

AMAXA - Analog Input Action at Max


HexCode: 1B CANOpen id: 0x301B

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.

Syntax Serial: ^AMAXA cc (aa + mm)


~AMAXA [cc]

376 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations

Syntax Scripting: setconfig(_AMAXA, cc, aa)

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:

cc = Analog input 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*64

Example:
^AMAXA 3 33 : Stops motor 2. I.e. 33 = 1 (Quick stop) + 32 (motor2)

AMIN - Analog Input Min


HexCode: 14 CANOpen id: 0x3014

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.

Syntax Serial: ^AMIN cc nn


~AMIN [cc]

Syntax Scripting: setconfig(_AMIN, cc, nn)

Number of Arguments: 2
Argument 1: InputNbr

Min: 1 Max: Total Number of Analog Inputs

Argument 2: Min
Type: Unsigned 16-bit
Min: 0 Max: 10000
Default: 100 mV

Advanced Digital Motor Controller User Manual 377


Commands Reference

Where:

cc = Analog input channel


nn = 0 to 10000mV

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

AMINA - Analog Input Action at Min


HexCode: 1A CANOpen id: 0x301A

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.

Syntax Serial: ^AMINA cc (aa + mm)


~AMINA [cc]

Syntax Scripting: setconfig(_AMINA, cc, aa)

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:

cc = Analog input 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*64

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)

AMOD - Analog Conversion Type


HexCode: 13 CANOpen id: 0x3013

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.

Syntax Serial: ^AMOD cc nn


~AMOD [cc]

Syntax Scripting: setconfig(_AMOD, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Analog Inputs

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

APOL - Analog Input Conversion Polarity


HexCode: 1C CANOpen id: 0x301C

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.

Syntax Serial: ^APOL cc nn


~APOL [cc]

Advanced Digital Motor Controller User Manual 379


Commands Reference

Syntax Scripting: setconfig(_APOL, cc, nn)

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:

cc = Analog input channel

nn =
0: Not inverted
1: Inverted

AUXV - Digital Output High Side Drive Voltage Level


HexCode: 10E CANOpen id: 0x310E

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.

Syntax Serial: ^AUXV nn


~AUXV

Syntax Scripting: setconfig(_AUXV, nn)

Number of Arguments: 1

Argument 1: Voltage Level


Type: Unsigned 8-bit
Min: 0 Max: 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

DINA - Digital Input Action


HexCode: 0F CANOpen id: 0x300F

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.

Syntax Serial: ^DINA cc (aa + [mm])


~DINA [cc]

Syntax Scripting: setconfig(_DINA, cc, aa)

Number of Arguments: 2

Argument 1: InputNbr

Min: 0 Max: Total Number of Digital Inputs

Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No actions
Where:

cc = Input channel number

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)

DINL - Digital Input Active Level


HexCode: 10 CANOpen id: 0x3010

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

Advanced Digital Motor Controller User Manual 381


Commands Reference

single number for all inputs.

Syntax Serial: ^DINL cc aa


~DINL [cc]

Syntax Scripting: setconfig(_DINL, cc, aa)


Number of Arguments: 1

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

DOA - Digital Output Action


HexCode: 11 CANOpen id: 0x3011

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.

Syntax Serial: ^DOA nn (a + cc)


~DOA [nn]

Syntax Scripting: setconfig(_DOA, nn, (a+cc))

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

DOL - Digital Outputs Active Level


HexCode: 12 CANOpen id: 0x3012

Description:
This parameter configures whether an output should be set to ON or to OFF when it is
activated.

Syntax Serial: ^DOL cc aa


~DOL

Syntax Scripting: setconfig(_DOL, cc, aa)

Number of Arguments: 2

Argument 1: OutputNbr

Type: Unsigned 32-bit

Min: 1 Max: Total Number of Digital Outputs

Argument 2: ActiveLevels
Type: Unsigned 32-bit

Min: 0 Max: 2 ^ Total Number of Digital Outputs

Default: 0 = All active high

Where:
cc = Digital input number

Advanced Digital Motor Controller User Manual 383


Commands Reference

aa=
0: On when active
1: Off when active

DOT - Digital Output Type


HexCode: 10D CANOpen id: 0x310D

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.

Syntax Serial: ^DOT cc aa


~DOT

Syntax Scripting: setconfig(_DOT, cc, aa)

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.

ENCO - Encoder Output Enable

HexCode: 10F CANOpen id: 0x310F

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.

Syntax Serial: ^ENCO nn


~ENCO

384 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Analog, Digital, Pulse IO Configurations

Syntax Scripting: setconfig(_ENCO, nn)

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.

PCTR - Pulse Input Center


HexCode: 20 CANOpen id: 0x3020

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.

Syntax Serial: ^PCTR cc nn


~PCTR [cc]

Syntax Scripting: setconfig(_PCTR, cc, nn)

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:

cc = Pulse input number


nn = 0 to 65536us

Advanced Digital Motor Controller User Manual 385


Commands Reference

PDB - Pulse Input Deadband


HexCode: 21 CANOpen id: 0x3021

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.

Syntax Serial: ^PDB cc nn


~PDB [cc]

Syntax Scripting: setconfig(_PDB, cc, nn)

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

PINA - Pulse Input Use


HexCode: 23 CANOpen id: 0x3023

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.

Syntax Serial: ^PINA cc (nn + mm)


~PINA [cc]

Syntax Scripting: setconfig(_PINA, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

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:

cc = Pulse input number


nn =
0: No action
1: Command

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)

PLIN - Pulse Input Linearity


HexCode: 22 CANOpen id: 0x3022

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.

Syntax Serial: ^PLIN cc nn


~PLIN [cc]

Syntax Scripting: setconfig(_PLIN, cc, nn)

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:

cc = Pulse input number


nn =
0: Linear (no change)
1: Exp weak
2: Exp medium
3: Exp strong
4: Log weak

Advanced Digital Motor Controller User Manual 387


Commands Reference

5: Log medium
6: Log strong

PMAX - Pulse Input Max


HexCode: 1F CANOpen id: 0x301F

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.

Syntax Serial: ^PMAX cc nn


~PMAX [cc]

Syntax Scripting: setconfig(_PMAX, cc, nn)

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:

cc = Pulse input number


nn = 0 to 65536us

PMAXA - Pulse Input Action at Max


HexCode: 25 CANOpen id: 0x3025

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.

Syntax Serial: ^PMAXA cc (aa + mm)


~PMAXA [cc]

Syntax Scripting: setconfig(_PMAXA, cc, aa)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

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:

cc = Pulse input number


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

PMIN - Pulse Input Min


HexCode: 1E CANOpen id: 0x301E

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.

Syntax Serial: ^PMIN cc nn


~PMIN [cc]

Syntax Scripting: setconfig(_PMIN, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

Argument 2: Min
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 1000
Where:

cc = Pulse input number


nn = 0 to 65536us

PMINA - Pulse Input Action at Min


HexCode: 24 CANOpen id: 0x3024

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.

Advanced Digital Motor Controller User Manual 389


Commands Reference

Syntax Serial: ^PMINA cc (aa + mm)


~PMINA [cc]

Syntax Scripting: setconfig(_PMINA, cc, aa)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

Argument 2: Action
Type: Unsigned 8-bit
Min: 0 Max: 255
Default: 0 = No action
Where:

cc = Pulse input number


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

PMOD - Pulse Input Capture Type


HexCode: 1D CANOpen id: 0x301D

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.

Syntax Serial: ^PMOD cc nn


~PMOD [cc]

Syntax Scripting: setconfig(_PMOD, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

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

PPOL - Pulse Input Capture Polarity


HexCode: 26 CANOpen id: 0x3026

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)

Syntax Serial: ^PPOL cc nn


~PPOL

Syntax Scripting: setconfig(_PPOL, cc, nn)

Number of Arguments: 2

Argument 1: InputNbr

Min: 1 Max: Total Number of Pulse Inputs

Argument 2: Polarity
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Non inverted

Advanced Digital Motor Controller User Manual 391


Commands Reference

Where:

cc = Pulse input number


nn =
0: Not inverted
1: Inverted

Motor Configurations
This section covers the various configuration parameter applying to motor operations.

TABLE 15-38. Motor Configurations


Command Arguments Description
ALIM Channel Limit Amps Limit
ATGA Channel Action Amps Trigger Action
ATGD Channel Delay Amps Trigger Delay
ATRIG Channel Level Amps Trigger Level
B25 Channel Coefficient Thermistor Temperature Coefficient β25.
BKD Delay Brake Delay
BPR Channel Value Bypass Trajectory/Ramp
BRV Channel Voltage Brake Release Voltage
BHV Channel Voltage Brake Hold Voltage
BDT Channel Delay Brake Delay Time
BLFB Channel Sensor Closed Loop Feedback Sensor
BLSTD Channel Mode Stall Detection
BR Channel Value Mechanical System Rotating Friction Coefficient
BZPW Channel Amps Brushless Reference Seek Power
CLERD Channel Mode Close Loop Error Detection
EDEC Channel Deceleration Motor Fault Deceleration Rate
EHL Channel Value Encoder Max Limit
EHLA Channel Action Encoder Action at Max
EHOME Channel Value Encoder Home Count
ELL Channel Value Encoder Min Limit
ELLA Channel Action Encoder Action at Min
EMOD Channel Use Encoder Usage
EPPR Channel Value Encoder Pulse/Rev Value
FET Channel Mode Loop Error Time
FEW Channel Mode Loop Error Limit
FWVR Channel Value Field Weakening Voltage Ratio
ICAP Channel Cap PID Integrator Limit
ISLR - Current Slew Rate
JR Channel Value Mechanical System Inertia
KDG PID Channel Gain PID Derivative Gain
KIF PID Channel Gain Current PID Integral Gain

392 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

Command Arguments Description


KIG PID Channel Gain PID Integral Gain
KPF PID Channel Gain Current PID Proportional Gain
KPG PID Channel Gain PID Proportional Gain
LPFB Channel Value Speed feedback low pass filter bandwidth
LQ Channel Value Q-axis motor Inductance
MAC Channel Acceleration Motor Acceleration Rate
MCLE Channel Value SSI Multi-turn Counter number of bits
MDEC Channel Deceleration Motor Deceleration Rate
MLX InputNbr Value Molex Input
MMOD Channel Mode Operating Mode
MNRPM Channel RPM Min Speed RPM Value
MSTA Channel Value SSI Multi-turn Counter start bit position
MVEL Channel Velocity Position Mode Velocity
MXMD Mode Mixed Mode
MXPF Channel MaxPower Motor Max Power Forward
MXPR Channel MaxPower Motor Max Power Reverse
MXRPM Channel RPM Max Speed RPM
MXPW Channel Value Max Output Power at Constant Power Region
MXTRN Channel Turns Position Turns Min to Max
NOMA Channel Current Nomiinal Current
OVH Voltage Overvoltage hysteresis
OVL Voltage Overvoltage Limit
OTL Temperature Over Temperature Limit
R25 Channel Resistance Thermistor Resistance at 25oC
RS Channel Value Motor Stator Resistance
SCLE Channel Value SSI Counter number of bits
SCLK Level SSI Clock Frequency
SED Channel Value Sensor Error Detection
SFTS Channel Mode Safety Switch Connected
SHL Channel Value SSI Sensor Max Limit
SHLA Channel Action SSI Sensor Action at Max
SHOME Channel Value SSI Sensor Home Count
SLEN Channel Value SSI frame number of bits
SLL Channel Value SSI Sensor Min Limit
SLLA Channel Action SSI Sensor Action at Min
SMOD Channel Use SSI Sensor Usage
SSLR - Speed Slew Rate
SSTA Channel Value SSI Counter start bit position
THLD Level Short Circuit Detection Sensitivity
TNM Channel Constant Motor Torque Constant

Advanced Digital Motor Controller User Manual 393


Commands Reference

Command Arguments Description


TPAL Channel Time Time for Amps Limit
UVL Voltage Undervoltage Limit
VELFF - Velocity Feedforward Gain

ALIM - Amps Limit


HexCode: 2A CANOpen id: 0x302A

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.

Syntax Serial: ^ALIM cc nn


~ALIM [cc]

Syntax Scripting: setconfig(_ALIM, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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

ATGA - Amps Trigger Action


HexCode: 2C CANOpen id: 0x302C

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.

Syntax Serial: ^ATGA cc (aa + mm)


~ATGA [cc]

Syntax Scripting: setconfig(_ATGA, cc, aa + mm)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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

mm = mot1*16 + mot2*32 + mot3*64

ATGD - Amps Trigger Delay


HexCode: 2D CANOpen id: 0x302D

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.

Syntax Serial: ^ATGD cc nn


~ATGD [cc]

Advanced Digital Motor Controller User Manual 395


Commands Reference

Syntax Scripting: setconfig(_ATGD, cc, nn)

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

ATRIG - Amps Trigger Level


HexCode: 2B CANOpen id: 0x302B

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.

Syntax Serial: ^ATRIG cc nn


~ATRIG [cc]

Syntax Scripting: setconfig(_ATRIG, cc, nn)

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

B25 - Thermistor Temperature Coefficient β25


HexCode: 106 CANOpen id: 0x3106

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.

Syntax Serial: ^B25 cc nn


~B25 cc

Syntax scripting: setconfig(_B25,cc,nn)

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Argument 2: Coefficient Type: Signed 32-bit


Default: 0

Where:
cc=Motor channel
nn=Coefficient in Kelvin (K)

Example:
^B25 1 3100. Set β25 at 3100.

BKD - Brake Delay


HexCode: 01 CANOpen id: 0x3001

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.

Syntax Serial: ^BKD nn


~BKD

Syntax Scripting: setconfig(_BKD, nn)

Number of Arguments: 1

Argument 1: Delay
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 250 = 250ms

Where:
nn = Delay in milliseconds

Advanced Digital Motor Controller User Manual 397


Commands Reference

Example:
^BKD 1 1000 : Causes the digital output to go off, and therefore activate the brake, 1.0s
after motor stops being energized

BPR - Bypass Trajectory/Ramp


HexCode: F3 CANOpen id: 0x30F3

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).

Syntax Serial: ^BPR cc nn


~BPR [cc]

Syntax Scripting: setconfig(_BPR, cc, nn)

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

BZPW - Brushless Reference Seek Power


HexCode: 62 CANOpen id: 0x3062

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

Syntax Serial: ^BZPW cc nn


~BZPW [cc]

Syntax Scripting: setconfig(_BZPW, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Amps
Type: Unsigned 16-bit
Min: 0
Default: 50 = 5.0A
Where:

cc = Motor channel
nn = Amps x 10

BRV - Brake Release Voltage


HexCode: E6 CANOpen id: 0x30E6

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.

Syntax Serial: ^BRV cc nn


~BRV

Syntax Scripting: setconfig(_BRV, cc, nn)

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

Advanced Digital Motor Controller User Manual 399


Commands Reference

Example:
^BRV 1 200: Sets the Release voltage level of the brake of motor channel 1 to 20Volts.

BHV - Brake Hold Voltage


HexCode: E7 CANOpen id: 0x30E7

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.

Syntax Serial: ^BHV cc nn


~BHV

Syntax Scripting: setconfig(_BHV, cc, nn)

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.

BDT - Brake Delay Time


HexCode: E8 CANOpen id: 0x30E8

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

Syntax Serial: ^BDT cc nn

~BDT

Syntax Scripting: setconfig(_BDT, cc, nn)

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.

BLFB - Closed loop Feedback Sensor


HexCode: 3B CANOpen id: 0x303B

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.

Syntax Serial: ^BLFB cc nn


~BLFB

Syntax Scripting: setconfig(_BLFB, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Sensor

Advanced Digital Motor Controller User Manual 401


Commands Reference

Type: Unsigned 8-bit


Min: 0 Max: 1
Default: 0 = Other Sensor
Where:

cc = Motor channel
nn =
0: Other feedback (Encoders, SSI sensors, Analog or RC sensors)
1: Brushless sensor feedback (Hall, Sin/Cos, Resolver)

BLSTD - Stall Detection


HexCode: 3A CANOpen id: 0x303A

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.

Syntax Serial: ^BLSTD cc nn


~BLSTD [cc]

Syntax Scripting: setconfig(_BLSTD, cc, nn)

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

BR - Mechanical System Rotating Friction Coefficient


HexCode: 10A CANOpen Id: 0x310A

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.

Syntax Serial: ^BR cc nn


~BR [cc]

Syntax Scripting: setconfig(_BR, cc, nn)

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).

CLERD - Close Loop Error Detection


HexCode: 38 CANOpen id: 0x3038

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.

Syntax Serial: ^CLERD cc nn


~CLERD

Syntax Scripting: setconfig(_CLERD, cc, nn)

Number of Arguments: 2

Advanced Digital Motor Controller User Manual 403


Commands Reference

Argument 1: Channel

Min: 1 Max: Total Number of Motor


Channels

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

EDEC - Motor Fault Deceleration Rate


HexCode: E9 CANOpen id: 0x30E9

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.

Syntax Serial: ^EDEC cc nn ~EDEC [cc]

Syntax Scripting: setconfig(_EDEC, cc, nn)

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

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

EHL - Encoder Max Limit


HexCode: 4C CANOpen id: 0x304C

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.

Syntax Serial: ^EHL cc nn


~EHL [cc]

Syntax Scripting: setconfig(_EHL, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Encoders

Argument 2: Value
Type: Signed 32-bit
Min: -2147M Max: 2147M
Default: +20000
Where:

cc = Encoder channel
nn = Counter value

EHLA - Encoder Action at Max


HexCode: 4E CANOpen id: 0x304E

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.

Syntax Serial: ^EHLA cc nn


~EHLA [cc]

Syntax Scripting: setconfig(_EHLA, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Advanced Digital Motor Controller User Manual 405


Commands Reference

Min: 1 Max: Total Number of Encoders

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

mm = mot1*16 + mot2*32 + mot3*64

EHOME - Encoder Home Count


HexCode: 4F CANOpen id: 0x304F

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.

Syntax Serial: ^EHOME cc nn


~EHOME [cc]

Syntax Scripting: setconfig(_EHOME, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Encoders

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

ELL - Encoder Min Limit


HexCode: 4B CANOpen id: 0x304B

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.

Syntax Serial: ^ELL cc nn


~ELL [cc]

Syntax Scripting: setconfig(_ELL, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Encoders

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

ELLA - Encoder Action at Min


HexCode: 4D CANOpen id: 0x304D

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.

Syntax Serial: ^ELLA cc (aa + mm)


~ELLA [cc]

Syntax Scripting: setconfig(_ELLA, cc, aa)

Number of Arguments: 2

Advanced Digital Motor Controller User Manual 407


Commands Reference

Argument 1: Channel

Min: 1 Max: Total Number of Encoders

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

mm = mot1*16 + mot2*32 + mot3*64

EMOD - Encoder Usage


HexCode: 49 CANOpen id: 0x3049

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.

Syntax Serial: ^EMOD cc (aa + mm)


~EMOD [cc]

Syntax Scripting: setconfig(_EMOD, cc, aa)

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

EPPR - Encoder Pulse/Rev Value


HexCode: 4A CANOpen id: 0x304A

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.

Syntax Serial: ^EPPR cc nn


~EPPR [cc]

Syntax Scripting: setconfig(_EPPR, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Encoders

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

FET – Loop Error Time


HexCode: FD CANOpen id: 0x30FD

Description:
This parameter is used in Close Loop Error Detection and sets the time in the Custom
setting of CLERD.

Syntax Serial: ^FET cc nn


~FET

Advanced Digital Motor Controller User Manual 409


Commands Reference

Syntax Scripting: setconfig(_FET, cc, nn)

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.

FEW – Loop Error Limit


HexCode: FC CANOpen id: 0x30FC

Description:
This parameter is used is Close Loop Error Detection and sets the unit number in the Cus-
tom setting of the CLERD.

Syntax Serial: ^FEW cc nn


~FEW

Syntax Scripting: setconfig(_FEW, cc, nn)

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.

FWVR - Field Weakening Voltage Ratio


Hex Code: F5 CANOpen id: 0x30F5

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.

Syntax Serial: ^FWVR cc nn


~FWVR[cc]

Syntax Scripting: setconfig(_FWVR, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Field Weakening Voltage Ratio


Type: Unsigned 16-bit
Min: 750 Max: 1000
Default: 1000

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.

ICAP - PID Integrator Limit


HexCode: 32 CANOpen id: 0x3032

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-

Advanced Digital Motor Controller User Manual 411


Commands Reference

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.

Syntax Serial: ^ICAP cc nn


~ICAP [cc]

Syntax Scripting: setconfig(_ICAP, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Cap
Type: Unsigned 8-bit
Min: 1 Max: 100
Default: 100%
Where:

cc = Motor channel
nn = Integral cap in %

ISLR - Current Slew Rate


HexCode: 120 CANOpen id: 0x3120

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

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Limit Type: Unsigned 16-bit


Min: 0 (disabled slew rate) Max: 65000

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

JR - Mechanical System Inertia

HexCode: 109 CANOpen Id: 0x3109

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.

Syntax Serial: ^JR cc nn

~JR [cc]

Syntax Scripting: setconfig(_JR, cc, nn)

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.

KDG - PID Derivative Gain


HexCode: F2 CANOpen id: 0x30F2

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.

Syntax Serial: ^KDG cc nn


~KDG [cc]

Syntax Scripting: setconfig(_KDG, cc, nn)

Number of Arguments: 2

Advanced Digital Motor Controller User Manual 413


Commands Reference

Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit


Min: 0 Max: 2,000,000,000 Default: 0

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

nn = Derivative Gain *1,000,000

Example:
^KDG 1 1500000: Set motor channel 1 Speed Derivative Gain to 1.5.

KIF - Current PID Integral Gain


HexCode: 8E CANOpen id: 0x308E

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.

Syntax Serial: ^KIF cc nn


~KIF [cc]

Syntax Scripting: setconfig(_KIF, cc)

Number of Arguments:

Argument 1: AmpsChannel
Min: 1 Max: 2 * Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit

Min: 0 Max: 2,000,000,000 Default: 0

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.

KIG - PID Integral Gain


HexCode: F1 CANOpen id: 0x30F1

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.

Syntax Serial: ^KIG cc nn


~KIG

Syntax Scripting: setconfig(_KIG, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: 2 * Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit


Min: 0 Max: 2,000,000,000 Default: 0

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

nn = Integral Gain *1,000,000

Example:
^KIG 1 1500000: Set motor channel 1 Speed Integral Gain to 1.5.

Advanced Digital Motor Controller User Manual 415


Commands Reference

KPF - Current PID Proportional Gain


HexCode: 8D CANOpen id: 0x308D

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.

Syntax Serial: ^KPF cc nn


~KPF [cc]

Syntax Scripting: setconfig(_KPF, cc)

Number of Arguments:

Argument 1: AmpsChannel
Min: 1 Max: 2 * Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit

Min: 0 Max: 2,000,000,000 Default: 0

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.

KPG - PID Proportional Gain


HexCode: F0 CANOpen id: 0x30F0

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.

Syntax Serial: ^KPG cc nn


~KPG

Syntax Scripting: setconfig(_KPG, cc, nn)

Number of Arguments: 2

416 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

Argument 1: Channel

Min: 1 Max: 2 * Total Number of Motors

Argument 2: Gain Type: Unsigned 32-bit


Min: 0 Max: 2,000,000,000 Default: 0

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

nn = Proportional Gain *1,000,000

Example:

^KPG 1 1500000: Set motor channel 1 Speed Proportional Gain to 1.5.

LPFB - Speed feedback low pass filter bandwidth


HexCode: 112 CANOpen id: 0x3112

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.

Syntax Serial: ^LPFB cc nn


~LPFB [cc]

Syntax Scripting: setconfig(_LPFB, cc, nn)

Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Low pass filter bandwidth (Hz)


Type: Unsigned 8-bit
Min: 0 Max: 150
Default: 45

where:
cc = Motor channel
nn = Low Pass Filter Bandwidth (Hz)

Advanced Digital Motor Controller User Manual 417


Commands Reference

Example:
^LPFB 1 30 : Set the speed feedback low pass filter bandwidth equal to 30 Hz.

LQ - Motor q-axis Inductance


HexCode: ED CANOpen id: 0x30ED

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.

Syntax Serial: ^LQ cc nn


~LQ [cc]

Syntax Scripting: setconfig(_LQ, cc, nn)

Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors


Argument 2: Q-axis Motor Inductance

Type: Unsigned 16-bit

Min: 0 Max: 65535

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

MAC - Motor Acceleration Rate


HexCode: 33 CANOpen id: 0x3033

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.

Syntax Serial: ^MAC cc nn


~MAC [cc]

Syntax Scripting: setconfig(_MAC, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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

Note: In Closed Loop Torque Mode the value is translated in miliAmps/sec

MCLE - SSI Multi-turn Counter number of bits


HexCode: 103 CANOpen Id: 0x3103

Description:
This parameters sets the number of bits of the multi-turn counter of the SSI sensor.

Syntax Serial: ^MCLE cc nn


~MCLE [cc]

Syntax Scripting: setconfig(_MCLSE, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Type: Unsigned 8-bit
Min: 1 Max: Total Number of SSI sensors

Advanced Digital Motor Controller User Manual 419


Commands Reference

Argument 2: Value
Type: Unsigned 8-bit
Min: 0 Max: 32

Where:
cc = SSI Sensor channel
nn = Multi-turn Counter number of bits

MDEC - Motor Deceleration Rate


HexCode: 34 CANOpen id: 0x3034

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.

Syntax Serial: ^MDEC cc nn


~MDEC [cc]

Syntax Scripting: setconfig(_MDEC, cc, nn)

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

Note: In Closed Loop Torque Mode the value is translated in miliAmps/sec.

420 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

MLX - Molex Input


HexCode: D5 CANOpen id: 0x30D5

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.

Syntax Serial: ^MLX cc nn


~ MLX [cc]

Syntax Scripting: setconfig(_MLX, cc, nn)

Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Molex Input


Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0

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.

MDIR - Motor Direction


HexCode: 77 CANOpen id: 0x3077

Description:
This parameter lets you set the motor direction to inverted or direct.

Syntax Serial: ^MDIR cc nn

Where:
cc = Motor Channel
nn = 0: Not inverted
1: Inverted

Syntax Scripting: setconfig(_MDIR, cc, nn)

Advanced Digital Motor Controller User Manual 421


Commands Reference

MMOD - Operating Mode


HexCode: 27 CANOpen id: 0x3027

Description:
This parameter lets you select the operating mode for that channel. See manual for de-
scription of each mode.

Syntax Serial: ^MMOD cc nn


~MMOD [cc]

Syntax Scripting: setconfig(_MMOD, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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.

MNRPM - Min Speed RPM

HexCode: CB CANOpen id: 0x30CB

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.

Syntax Serial: ^MNRPM cc nn


~MNRPM [cc]

Syntax Scripting: setconfig(_MNRPM, cc, nn)

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

Argument 2: Speed (RPM)


Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 0

Where:
cc = Channel

nn = Min Speed RPM

MSTA - SSI Multi-turn Counter start bit position


HexCode: 102 CANOpen Id: 0x3102

Description:

This parameter sets the position of the first bit of the multi-turn counter inside the SSI
frame.

Syntax Serial: ^MSTA cc nn


~MSTA [cc]

Syntax Scripting: setconfig(_MSTA, cc, nn)

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

Advanced Digital Motor Controller User Manual 423


Commands Reference

MVEL - Position Mode Velocity


HexCode: 35 CANOpen id: 0x3035

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.

Syntax Serial: ^MVEL cc nn


~MVEL [cc]

Syntax Scripting: setconfig(_MVEL, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Velocity
Type: Signed 32-bit
Min: 0 Max: 30000
Default: 1000 RPM
Where:

cc = Motor channel
nn = Velocity value in RPM

MXMD - Mixed Mode


HexCode: 05 CANOpen id: 0x3005

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.

Syntax Serial: ^MXMD nn


~MXMD

Syntax Scripting: setconfig(_MXMD, nn)

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

MXPF - Motor Max Power Forward


HexCode: 28 CANOpen id: 0x3028

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.

Syntax Serial: ^MXPF cc nn


~MXPF [cc]

Syntax Scripting: setconfig(_MXPF, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: MaxPower
Type: Unsigned 8-bit
Min: 25 Max: 100
Default: 100%
Where:

cc = Motor channel
nn = Max Power

MXPR - Motor Max Power Reverse


HexCode: 29 CANOpen id: 0x3029

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.

Syntax Serial: ^MXPR cc nn


~MXPR [cc]

Advanced Digital Motor Controller User Manual 425


Commands Reference

Syntax Scripting: setconfig(_MXPR, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: MaxPower
Type: Unsigned 8-bit
Min: 25 Max: 100
Default: 100%
Where:
cc = Motor channel
nn = Max Power

MXRPM - Max Speed RPM


HexCode: 36 CANOpen id: 0x3036

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.

Syntax Serial: ^MXRPM cc nn


~MXRPM cc

Syntax Scripting: setconfig(_MXRPM, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Speed (RPM)


Type: Unsigned 16-bit
Min: 10 Max: 65535
Default: 1000 RPM
Where:
cc = Motor channel
nn = Max Speed RPM

426 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

MXPW - Maximum Motor Output Power at Constant Power

Hex Code: F6 CANOpen id: 0x30F6

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.

Syntax Serial: ^MXPW cc nn


~MXPW[cc]

Syntax Scripting: setconfig(_MXPW, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Maximum Motor Output Power


Type: Unsigned 32-bit
Min: 0 Max: Dependent on each controller power ratings
Default: Dependent on each controller power ratings

where:
cc=Motor channel
nn=Maximum Motor Output Power (W) * 10

Example:
^MXPW 1 15000: Configure the maximum motor output power at 1500 W.

MXTRN - Position Turns Min to Max


HexCode: 37 CANOpen id: 0x3037

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.

Advanced Digital Motor Controller User Manual 427


Commands Reference

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

Syntax Serial: ^MXTRN cc nn


~MXTRN [cc]

Syntax Scripting: setconfig(_MXTRN, cc, nn)

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

NOMA - Nominal Current


HexCode: FA CANOpen id: 0x30FA

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.

Syntax Serial: ^NOMA cc nn


~NOMA cc

Syntax scripting: setconfig(_NOMA,cc,nn)

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Argument 2: Current Type: Unsigned 32-bit


Default: see note.

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.

OVH - Overvoltage hysteresis


HexCode: 42 CANOpen id: 0x3042

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

Syntax Serial: ^OVH nn


~OVH

Syntax Scripting: setconfig(_OVH, nn)

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.

OVL - Overvoltage Limit


HexCode: 02 CANOpen id: 0x3002

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.

Advanced Digital Motor Controller User Manual 429


Commands Reference

Syntax Serial: ^OVL nn


~OVL

Syntax Scripting: setconfig(_OVL, nn)

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.

OTL - Over Temperature Limit


HexCode: D1 CANOpen id: 0x30D1

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.

Syntax Scripting: setconfig(_OTL, cc, nn)

Number of Arguments: 2

Argument 1: Temperature Sensor Type: Unsigned 8-bit Min: 1 Max: 3

Argument 2: Temperature Type: Unsigned 16-bit Min: 0 Max: 85 for


Heatsink
temperature and
120 for motor
temperatures

Where:

cc =

1: OverTemperature Limit for Heatsink Temperature

2: OverTemperature Limit for Channel 1 Motor Temperature

3: OverTemperature Limit for Channel 2 Motor Temperature

430 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

nn = Temperature in Celsius degrees

Example:
^OTL 1 75: Set Over temperature limit for Heatsink Temperature to 75 Celsius degrees.

R25 - Thermistor Resistance at 25oC


HexCode: 105 CANOpen id: 0x3105

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.

Syntax Serial: ^R25 cc nn

~R25 cc

Syntax scripting: setconfig(_R25,cc,nn)

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Argument 2: Resistance Type: Signed 32-bit


Default: 0

Where:

cc=Motor channel
nn=Resistance in Ohm (Ω)

Example:
^R25 1 1000. Set Resistance of the thermistor at 25oC at 1000Ohm.

RS - Motor Stator Resistance


HexCode: EB CANOpen id: 0x30EB

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.

Advanced Digital Motor Controller User Manual 431


Commands Reference

Syntax Serial: ^RS cc nn


~RS [cc]

Syntax Scripting: setconfig(_RS, cc, nn)

Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Motor phase resistance

Type: Unsigned 16-bit

Min: 0 Max: 65535

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

SCLE - SSI Counter number of bits

HexCode: 101 CANOpen Id: 0x3101

Description:

Set the number of bits of the angle counter of the SSI sensor.

Syntax Serial: ^SCLE cc nn


~SCLE [cc]

Syntax Scripting: setconfig(_SCLE, cc, nn)

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

Type: Unsigned 8-bit


Min: 0 Max: 32

Where:
cc = SSI Sensor channel
nn = Angle Counter number of bits

SCLK - SSI Clock Speed

HexCode: 107 CANOpen Id: 0x3107

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.

Syntax Serial: ^SCLK nn


~SCLK

Syntax Scripting: setconfig(_SCLK, nn)

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.

Advanced Digital Motor Controller User Manual 433


Commands Reference

SED - Sensor Error Detection


HexCode: E4 CANOpen id: 0x30E4

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.

Syntax Serial: ^SED cc nn


~SED [cc]

Syntax Scripting: setconfig(_SED, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Type: Unsigned 8-bit


Min: 1 Max: Total Number of Brush-less Motor

Argument 2: Mode

Default: 2 = Strict

Where
cc= Number of brush-less motor
nn=
0: Disable
1: Tolerant
2: Strict

SFTS - Safety Switch Connected

HexCode: 114 CANOpen Id: 0x3114

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

Syntax Serial: ^SFTS cc nn


~SFTS [cc]

Syntax Scripting: setconfig(_SFTS, cc, nn)

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

SHL - SSI Sensor Max Limit


HexCode: D8 CANOpen id: 0x30D8

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.

Syntax Serial: ^SHL cc nn


~SHL [cc]

Syntax Scripting: setconfig(_SHL, cc, nn)

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

Advanced Digital Motor Controller User Manual 435


Commands Reference

Where:

cc = SSI Sensor channel


nn = Counter value

SHLA - SSI Sensor Action at Max


HexCode: DA CANOpen id: 0x30DA

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.

Syntax Serial: ^SHLA cc nn


~SHLA [cc]

Syntax Scripting: setconfig(_SHLA, cc, nn)

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

SHOME - SSI Sensor Home Count


HexCode: DB CANOpen id: 0x30DB

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.

Syntax Serial: ^SHOME cc nn


~SHOME [cc]

Syntax Scripting: setconfig(_SHOME, cc, nn)

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.

SLEN - SSI sensor’s frame total number of bits

HexCode: FF CANOpen Id: 0x30FF

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.

Syntax Serial: ^SLEN cc nn


~SLEN [cc]

Syntax Scripting: setconfig(_SLEN, cc, nn)

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

Advanced Digital Motor Controller User Manual 437


Commands Reference

SLL - SSI Sensor Min Limit


HexCode: D7 CANOpen id: 0x30D7

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.

Syntax Serial: ^SELL cc nn


~SLL [cc]

Syntax Scripting: setconfig(_SLL, cc, nn)

Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Encoders

Argument 2: Value

Type: Signed 32-bit


Min: -2147M Max: 2147M
Default: -20000

Where:
cc = SSI Sensor channel
nn = SSI Counter value

Example:
^SLL 1 -100000 : Set SSI Sensor 1 low limit to minus 100000

SLLA - SSI Sensor Action at Min


HexCode: D9 CANOpen id: 0x30D9

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.

Syntax Serial: ^SLLA cc (aa + mm)


~SLLA [cc]

Syntax Scripting: setconfig(_SLLA, cc, aa)

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

SMOD - SSI Sensor Usage


HexCode: D6 CANOpen id: 0x30D6

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.

Syntax Serial: ^SMOD cc (aa + mm)


^SMOD [cc]

Syntax Scripting: setconfig(_SMOD, cc, aa)

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

Advanced Digital Motor Controller User Manual 439


Commands Reference

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

SSLR - Speed Slew Rate


HexCode: 11F CANOpen id: 0x311F

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.

Syntax Serial: ^SSLR cc nn


~SSLR [cc]
Syntax Scripting: setconfig(_SSLR, cc, nn)

Number of Arguments: 2
Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Limit Type: Unsigned 16-bit


Min: 0 (disabled slew rate) Max: 65000

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.

SSTA - SSI Counter start bit position

HexCode: 100 CANOpen Id: 0x3100

Description:

This parameter sets the position of the first bit of the angle counter inside the SSI frame.

Syntax Serial: ^SSTA cc nn


~SSTA [cc]

440 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Motor Configurations

Syntax Scripting: setconfig(_SSTA, cc, nn)

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

THLD - Short Circuit Detection Sensitivity


HexCode: 04 CANOpen id: 0x3004

Description:

This configuration parameter sets the level for the short circuit detection sensitivity. There
are 3 sensitivity levels from 0 to 2.

• If set as High Sensitivity (0, default), then it works as an over-current threshold


detector. The current threshold is defined at each product’s datasheet. So if current
goes above that threshold the short fault is triggered.
• If set as Medium Sensitivity (1) then when the current goes beyond the current
threshold, the controller deactivates the MOSFETs for 5ms and then recovers. If
that happens more than 3 times in a 128ms period then short fault is triggered.
• If set as Low Sensitivity (2) then when the current goes beyond the current thresh-
old, the controller deactivates the MOSFETs for 5ms and then recovers. If that
happens more than 7 times in a 128ms period then short fault is triggered.

Syntax Serial: ^THLD nn


~THLD

Syntax Scripting: setconfig(_THLD, nn)

Number of Arguments: 1

Argument 1: Threshold Type: Unsigned 8-bit Min: 0 Max: 2 Default: 0 = High Sensitivity

Where:
nn =
0: High sensitivity

Advanced Digital Motor Controller User Manual 441


Commands Reference

1: Medium sensitivity
2: Low sensitivity

Example:
^THLD 1 : Set short circuit detection sensitivity to medium.

TNM - Motor Torque Constant


HexCode: DF CANOpen id: 0x30DF

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.

Syntax Serial: ^TNM cc nn


~TNM cc

Syntax Scripting: setconfig(_TNM, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Torque Constant Type: Signed 32-bit

Min: 0 Default: 1000 = 1Nm/Amps

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.

TPAL - Time for Amps Limit


HexCode: FB CANOpen id: 0x30FB

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

Syntax Serial: ^TPAL cc nn


~TPAL cc

Syntax scripting: setconfig(_TPAL,cc,nn)

Argument 1: Channel Type: Unsigned 8-bit


Min: 1 Max: Total Number of Motors

Argument 2: Current Type: Unsigned 32-bit


Default: 0

Where:
cc=Motor channel
nn=Time in seconds

Example:
^TPAL 1 5. Set maximum time the motor can handle ALIM Amps at 5 seconds.

UVL - Undervoltage Limit


HexCode: 03 CANOpen id: 0x3003

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.

Syntax Serial: ^UVL nn


~UVL

Syntax Scripting: setconfig(_UVL, nn)

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

Advanced Digital Motor Controller User Manual 443


Commands Reference

VELFF – Velocity Feedforward Gain


HexCode: 110 CANOpen id: 0x3110

Description:
This parameter sets the Velocity Feedforward gain for BLDC and brushed DC motor
drives. The gain value is expressed in x 1000 units.

Syntax Serial: ^VELFF cc nn


~VELFF [cc]
Syntax Scripting: setconfig(_VELFF, cc, nn)
Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Limit Type: Unsigned 16-bit


Min: 0 Max: 10000

Where:
cc = Motor channel
nn = value x 1000

Example:
^VELFF 1 1000: Set the velocity feedforward gain of channel 1 to 1.

Brushless Specific Commands


TABLE 15-39. Brushless Specific Commands
Command Arguments Description
BADJ Channel Angle Brushless Angle Zero Adjust
BADV Channel Value Brushless timing angle adjust
BFBK Channel Sensor Brushless Sinusoidal Angle Sensor
BHL Channel Value Brushless Internal Sensor Max Limit
BHLA Channel Action Brushless Internal Sensor Action at Max
BHOME Channel Value Brushless Internal Sensor Home Count
BLL Channel Value Brushless Internal Sensor Min Limit
BLLA Channel Action Brushless Internal Sensor Action at Min
BMOD Channel Mode Brushless Switching Mode
BPOL Channel NbrPoles Number of pole pairs
HPO InputNbr Value Hall Sensor Position Type
HSAT InputNbr Value Hall Sensor Angle Table
HSM InputNbr Value Hall Sensor Map
LD Channel Value D-axis motor Inductance
PSA Channel Angle Phase Shift Angle
SPOL Channel Poles SinCos/SSI Sensor Pole Pairs

444 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

TABLE 15-35. Brushless Specific Commands


Command Arguments Description
SWD InputNbr Value Swap Windings
TID Channel Amps FOC Target Id
VK Channel Value Motor Voltage constant
ZSMA Channel Value Cos Amplitude
ZSMC InputNbr Value SinCos Calibration

BADJ - Brushless Angle Zero Adjust


HexCode: 60 CANOpen id: 0x3060

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.

Syntax Serial: ^BADJ cc nn


~BADJ [cc]

Syntax Scripting: setconfig(_BADJ, cc, nn)

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: 0
Where:

cc = Motor channel
nn = Angle

Example:
^BADJ 1 220 : Manually set the zero to 220 degrees

BADV - Brushless timing angle adjust


HexCode: 61 CANOpen id: 0x3061

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.

Advanced Digital Motor Controller User Manual 445


Commands Reference

Syntax Serial: ^BADV cc nn


~BADV [cc]

Syntax Scripting: setconfig(_BADV, cc, nn)

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

BFBK - Brushless Sinusoidal Angle Sensor


HexCode: 63 CANOpen id: 0x3063

Description:
Selects the type of rotor angle sensor to be used for brushless motors when operated in
sinusoidal mode.

Syntax Serial: ^BFBK cc nn


~BFBK [cc]

Syntax Scripting: setconfig(_BFBK, cc)

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

BHL - Brushless Internal Sensor Max Limit


HexCode: 3E CANOpen id: 0x303E

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.

Syntax Serial: ^BHL cc nn


~BHL [cc]

Syntax Scripting: setconfig(_BHL, cc, nn)

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.

BHLA - Brushless Internal Sensor Action at Max


HexCode: 40 CANOpen id: 0x3040

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.

Syntax Serial: ^BHLA cc nn


~BHLA [cc]

Syntax Scripting: setconfig(_BHLA, cc, nn)

Number of Arguments: 2

Advanced Digital Motor Controller User Manual 447


Commands Reference

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

mm = mot1*16 + mot2*32 + mot3*64

Example:
^BHLA 1 36 : Forward limit switch for motor 2 (4 + 32)

BHOME - Brushless Internal Sensor Home Count


HexCode: 3C CANOpen id: 0x303C

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.

Syntax Serial: ^BHOME cc nn


~BHOME [cc]

Syntax Scripting: setconfig(_BHOME, cc, nn)

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

BLL - Brushless Internal Sensor Min Limit


HexCode: 3D CANOpen id: 0x303D

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.

Syntax Serial: ^BLL cc nn


~BLL [cc]

Syntax Scripting: setconfig(_BLL, cc, nn)

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.

Advanced Digital Motor Controller User Manual 449


Commands Reference

BLLA - Brushless Internal Sensor Action at Min


HexCode: 3F CANOpen id: 0x303F

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.

Syntax Serial: ^BLLA cc aa


~BLLA [cc]

Syntax Scripting: setconfig(_BLLA, cc, aa)

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

mm = mot1*16 + mot2*32 + mot3*64

Example:
^BLLA 1 37 : Reverse limit switch for motor 2 (5 + 32)

BMOD - Brushless Switching Mode


HexCode: 5F CANOpen id: 0x305F

Description:
Selects the switching mode when controlling brushless motors. Additional settings apply
for each mode.

Syntax Serial: ^BMOD cc nn


~BMOD [cc]

450 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

Syntax Scripting: setconfig(_BMOD, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

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.

BPOL - Number of Pole Pairs


HexCode: 39 CANOpen id: 0x3039

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.

Syntax Serial: ^BPOL cc nn


~BPOL

Syntax Scripting: setconfig(_BPOL, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Number of Pole Pairs


Type: Signed 8-bit
Min: -127 Max: +127
Default: 2
Where:

cc = Motor channel

nn = Number of pole pairs

Advanced Digital Motor Controller User Manual 451


Commands Reference

HPO - Hall Sensor Position Type


HexCode: A5 CANOpen id: 0x30A5

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.

Syntax Serial: ^HPO cc nn


~HPO [cc]

Syntax Scripting: setconfig(_HPO, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: Total Number of Motors

Argument 2: Hall Position


Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0

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.

HSAT - Hall Sensor Angle Table


HexCode: C2 CANOpen id: 0x30C2

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.

Syntax Serial: ^HSAT cc nn


~HSAT [cc]

452 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

Syntax Scripting: setconfig(_HSAT, cc, nn)

Number of Arguments: 2

Argument 1: Input Value


Min: 1 Max: Total Number of Motors * 12

Argument 2: Electrical Angle


Type: Unsigned 16-bit
Min: 0 Max: 511

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.

HSM - Hall Sensor Map


HexCode: A3 CANOpen id: 0x30A3

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.

Advanced Digital Motor Controller User Manual 453


Commands Reference

Syntax Serial: ^HSM cc nn


~ HSM [cc]

Syntax Scripting: setconfig(_HSM, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Hall Sensor Map


Type: Unsigned 8-bit
Min: 0 Max: 5
Default: 0

Where:
cc = Motor channel
nn = Motor’s Hall Sensor Map

Example:
^HSM 1 1: Set Hall Sensor Map for motor 1 to value 1.

LD - Motor d-axis Inductance


HexCode: EC CANOpen id: 0x30EC

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.

Syntax Serial: ^LD cc nn


~LD [cc]

Syntax Scripting: setconfig(_LD, cc, nn)

Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: D-axis Motor Inductance

Type: Unsigned 16-bit

Min: 0 Max: 65535

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

PSA - Phase Shift Angle


HexCode: E1 CANOpen id: 0x30E1

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.

Syntax Serial: ^PSA cc nn


~PSA [cc]

Syntax Scripting: setconfig(_PSA, cc, nn)

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.

Advanced Digital Motor Controller User Manual 455


Commands Reference

SPOL - SinCos/SSI Sensor Pole Pairs


HexCode: 41 CANOpen id: 0x3041

Description:
Number of pole pairs of the Sin/Cos, Resolver or SSI angle sensor used in sinusoidal
mode with brushless motors.

Syntax Serial: ^SPOL cc nn


~SPOL [cc]

Syntax Scripting: setconfig(_SPOL, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Number
Type: Unsigned 8-bit
Min: 1 Max: 255
Default: 1
Where:

cc = Motor channel
nn = Number of pole pairs

SWD - Swap Windings


HexCode: A4 CANOpen id: 0x30A4

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

TABLE 15-40. SWD values

SWD Swap for Hall Swap for


Value BIT 1 BIT 0 (Bit 1) Encoder (Bit 0) Meaning

0 0 0 NO NO None

1 0 1 NO YES Swapped

2 1 0 YES NO Hall only Swapped

3 1 1 YES YES Hall+Encoder Swapped

456 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

Syntax Serial: ^SWD cc nn

~ SWD [cc]

Syntax Scripting: setconfig(_SWD, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Swap Windings

Type: Unsigned 8-bit

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:

^SWD 1 1: Set angle down-counting for clockwise direction for motor 1.

TID - FOC Target Id

HexCode: 8F CANOpen id: 0x308F

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.

Syntax Serial: ^TID cc nn


~TID [cc]

Advanced Digital Motor Controller User Manual 457


Commands Reference

Syntax Scripting: setconfig(_TID, cc, nn)

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

VK - Motor Voltage constant

HexCode: EE CANOpen id: 0x30EE

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.

Syntax Serial: ^VK cc nn


~VK [cc]

Syntax Scripting: setconfig(_VK, cc, nn)

Number of Arguments: 2

Argument 1: Channel Min: 1 Max: Total Number of Motors

Argument 2: Motor voltage constant

Type: Unsigned 32-bit

Min: 0 Max: 2000000

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

ZSMA - Cos Amplitude

HexCode: E5 CANOpen id: 0x30E5

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).

Syntax Serial: ^ZSMA cc nn


~ZSMA [cc]

Syntax Scripting: setconfig(_ZSMA, cc, nn)

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.

ZSMC - SinCos Calibration


HexCode: 46 CANOpen id: 0x3046

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.

Syntax Serial: ^ZSMC cc nn


~ZSMC [cc]

Advanced Digital Motor Controller User Manual 459


Commands Reference

Syntax Scripting: setconfig(_ZSMC, cc)

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

AC Induction Specific Commands

TABLE 15-41. AC Induction Specific Commands


Command Arguments Description
BFBK Channel Mode AC Induction Operating Mode
EPL - Effective Partial Load
IRR Resistance Rotor Resistance
LS - Stator Inductance
MPW MotorPower Minimum Power
MXS SlipFrequency Optimal Slip Frequency
PTRQ - Peak Torque
RFC Channel Amps Rotor Flux Current
RTFR - Rated Frequency
RTRQ - Rated Torque
SLS - Leakage Inductance
STRQ - Static Friction Torque Coefficient
VPH Channel Ratio AC Induction Volts per Hertz

BFBK - AC Induction Operating Mode


HexCode: 63 CANOpen id: 0x3063

Description:
For AC Induction motors this parameter selects the operating mode.

Syntax Serial: ^BFBK cc nn


~BFBK [cc]

460 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

Syntax Scripting: setconfig(_BFBK, cc)

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

EPL – Effective Partial Load


HexCode: 13C CANOpen id: 0x313C

Description:
This parameter enables the EPL mode.

Syntax Serial: ^EPL cc nn


~EPL [cc]

Syntax Scripting: setconfig(_EPL, cc, nn)


Number of Arguments: 2

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

Advanced Digital Motor Controller User Manual 461


Commands Reference

IRR - Rotor Resistance


HexCode: 99 CANOpen id: 0x3099

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.

Syntax Serial: ^IRR cc nn


~ IRR [cc]

Syntax Scripting: setconfig(_IRR, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Rotor Resistance


Type: Unsigned 16-bit
Min: 1 Max: 65535
Default: 0

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).

Syntax Serial: ^Ls cc nn


~Ls cc

Syntax Scripting: setconfig(_Ls, cc, nn)

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

Argument 2: Stator Inductance


Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 0

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.

MPW - Minimum Power


HexCode: 97 CANOpen id: 0x3097

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.

Syntax Serial: ^MPW cc nn

~MPW [cc]

Syntax Scripting: setconfig(_MPW, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Minimum Power

Type: Unsigned 16-bit


Min: 0 Max: 1000
Default: 100

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.

Advanced Digital Motor Controller User Manual 463


Commands Reference

MXS - Maximum Slip Frequency


HexCode: 96 CANOpen id: 0x3096

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.

Syntax Serial: ^MXS cc nn


~MXS [cc]

Syntax Scripting: setconfig(_MXS, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Optimal Slip Frequency

Type: Unsigned 16-bit


Min: 0 Max: 65535
Default: 50

Where:
cc = Motor channel
nn = Motor’s Maximum Slip Frequency in Hertz * 10

Example:

^MXS 1 60: Set Maximum Slip for motor 1 to value 6.0Hz

PTRQ – Peak Torque


HexCode: 122 CANOpen id: 0x3122

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.

Syntax Serial: ^PTRQ cc nn


~PTRQ cc
Syntax Scripting: setconfig(_PTRQ, cc, nn)
Number of Arguments: 2

464 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
Brushless Specific Commands

Argument 1: Channel
Min: 1 Max: number of motors

Argument 2: Motor peak torque value in Nmx1000.


Type: Unsigned 32-bit
Min: 0 Max: 400000
Default: 10000

where:
cc = Motor channel
nn = Peak torque value in Nm x1000.
Example: ^PTRQ 1 15390: Sets the peak torque parameter to 15.39 Nm.

RFC - Rotor Flux Current


HexCode: 98 CANOpen id: 0x3098

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.

Syntax Serial: ^RFC cc nn


~ RFC [cc]

Syntax Scripting: setconfig(_RFC, cc, nn)

Number of Arguments: 2

Argument 1: Channel

Min: 1 Max: Total Number of Motors

Argument 2: Rotor Flux Current


Type: Unsigned 16-bit
Min: 0 Max: Max Amps in datasheet
Default: 10

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.

Advanced Digital Motor Controller User Manual 465


Commands Reference

RTFR – Rated Frequency


HexCode: 138 CANOpen id: 0x3138

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.

Syntax Serial: ^RTFR cc nn


~RTFR cc
Syntax Scripting: setconfig(_RTFR, cc, nn)
Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: number of motors

Argument 2: rated frequency


Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 1000

where:
cc = Motor channel
nn = Rated frequency in hertz x10
Example: ^RTFR 1 1000: Set the rated frequency of motor 1 to 100 Hz.

RTRQ – Rated Torque


HexCode: 121 CANOpen id: 0x3121

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.

Syntax Serial: ^RTRQ cc nn


~RTRQ cc
Syntax Scripting: setconfig(_RTRQ, cc, nn)

Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: number of motors

Argument 2: rated torque in Nm x1000


Type: Unsigned 32-bit
Min: 0 Max: 400000
Default: 5000

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.

SLS – Leakage Inductance


HexCode: 137 CANOpen id: 0x3137

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.

Syntax Serial: ^SLS cc nn


~SLS cc
Syntax Scripting: setconfig(_SLS, cc, nn)
Number of Arguments: 2

Argument 1: Channel
Min: 1 Max: number of motors

Argument 2: Leakage Inductance


Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 0

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.

STRQ – Static Friction Torque Coefficient


HexCode: 139 CANOpen id: 0x3139

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

Syntax Scripting: setconfig(_STRQ, cc, nn)


Number of Arguments: 2

Advanced Digital Motor Controller User Manual 467


Commands Reference

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

Min: 0 Max: 1000


Default: 25

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.

VPH - AC Induction Volts per Hertz


HexCode: 95 CANOpen id: 0x3095

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.

Syntax Serial: ^VPH cc nn


~VPH [cc]

Syntax Scripting: setconfig(_VPH, cc, nn)


Number of Arguments: 2

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

CAN/EtherCAT Communication Commands


This section describes all the configuration parameters uses for CANbus operation.

TABLE 15-42. CANbus Commands


Command Arguments Description
CAS Rate CANOpen Auto start
CBR BitRate CAN Bit Rate
CEN Mode CAN Mode
CGT Time CANOpen Guard Time
CHB HeartBeat CAN Heartbeat
CHBT Time Consumer Heartbeat Time
CHLA Action CAN Consumer Heartbeat Lost Action
CLSN Address CAN Listen Node ID
CNOD Address CAN Node ID
CSRT Rate MiniCAN SendRate
CTPS TPDOnbr Rate CANOpen TPDO SendRate
CTT None CANOpen Transmission Type
ECAT None EtherCAT Enable Mode
ECT None EtherCAT Cycle Time
EDID None EtherCAT Explicit Device ID
FSA None DS402 FSA
RPDC RPDOnbr Rate CANOpen RPDO COB-ID
RPDM RPDO Item CANOpen RPDO Mapping
TPDC TPDOnbr Rate CANOpen TPDO COB-ID
TPDM TPDO Item CANOpen TPDO Mapping

CAS - CANOpen Auto start


HexCode: 5A CANOpen id: 0x305A

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.

Syntax Serial: ^CAS nn


~CAS

Syntax Scripting: setconfig(_CAS, nn)

Number of Arguments: 1

Argument 1: Rate
Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0 = Off

Advanced Digital Motor Controller User Manual 469


Commands Reference

Where:
nn =
0: Device is in pre-operational state at power-up.
1: Device is in operational state at power up.

CBR - CAN Bit Rate


HexCode: 58 CANOpen id: 0x3058

Description:
Sets the CAN bus bit rate.

Syntax Serial: ^CBR nn


~CBR

Syntax Scripting: setconfig(_CBR, nn)

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

CEN - CAN Mode


HexCode: 56 CANOpen id: 0x3056

Description:
Enables CAN and selects the CAN protocol.

Syntax Serial: ^CEN nn


~CEN

Syntax Scripting: setconfig(_CEN, nn)

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

CGT – CANOpen Guard Time


HexCode: 9D CANOpen Object: 100Ch, 100Dh, 0x309D

Description:
Configures the guard time and life time factor for CANOpen node guarding protocol.

Syntax Serial ^CGT opt val


~CGT [opt]

Syntax Scripting SetConfig(_CGT, opt, val)


val = GetConfig(opt)

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).

CHB - CAN Heartbeat


HexCode: 59 CANOpen id: 0x3059

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.

Syntax Serial: ^CHB nn

Advanced Digital Motor Controller User Manual 471


Commands Reference

Syntax Scripting: setconfig(_CHB, nn)

Number of Arguments: 1

Argument 1: HeartBeat
Type: Unsigned 16-bit
Min: 0 Max: 65536
Default: 100ms

Where:
nn = Heartbeat rate in ms

CHBT – Consumer Heartbeat Time


HexCode: 9E CANOpen Object: 1016h, 0x309E

Description:

Configures consumer heartbeat time. If the heartbeat time is 0 or the node-ID is 0 or


greater than 127 the corresponding object is not considered. The heartbeat time shall be
given in multiples of 1ms.

An attempt to configure several heartbeat times unequal 0 for the same node-ID the con-
troller will respond with SDO abort code.

Syntax Serial ^CHBT cc nn


~CHBT [cc]

Syntax Scripting SetConfig(_CHBT, cc, nn)

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

CHLA - CAN Consumer Heartbeat Lost Action


HexCode: EF CANOpen id: 0x30EF

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.

Syntax Serial: ^CHLA nn


~CHLA

Syntax Scripting: setconfig(_CHLA, nn)


Number of Arguments: 1
Argument 1: Action
Type: Unsigned 8-bit
Min: 0 Max: 2
Default: 0 = No Action

Where:
nn =
0: No Action
1: Quick Stop
2: Emergency Stop

CLSN - CAN Listen Node ID


HexCode: 5B CANOpen id: 0x305B

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.

Syntax Serial: ^CLSN nn


~CSLN

Syntax Scripting: setconfig(_CLSN, nn)

Number of Arguments: 1

Argument 1: Address
Type: Unsigned 8-bit
Min: 0 Max: 127
Default: Product dependent

Advanced Digital Motor Controller User Manual 473


Commands Reference

Where:
nn =
0: Listen to all nodes (RawCAN only)
1-127: Capture frames from specific node id only

CNOD - CAN Node ID


HexCode: 57 CANOpen id: 0x3057

Description:
Stores the product’s ID on the CAN bus.

Syntax Serial: ^CNOD nn


~CNOD

Syntax Scripting: setconfig(_CNOD, nn)

Number of Arguments: 1

Argument 1: Address
Type: Unsigned 8-bit
Min: 0 Max: 127
Default: See datasheet

Where:
nn = Node address

CSRT - MiniCAN SendRate


HexCode: 5C CANOpen id: 0x305C

Description:
Rate, in ms, at which MiniCAN frames are sent.

Syntax Serial: ^CSRT nn


~CSRT

Syntax Scripting: setconfig(_CSRT, nn)

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

CTPS - CANOpen TPDO SendRate


HexCode: 5D CANOpen id: 0x305D

Description:
Sets the send rate for each of the 8 TPDOs when CANOpen is enabled.

Syntax Serial: ^CTPS nn mm

Syntax Scripting: setconfig(_CTPS, nn, mm)

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

CTT – CANOpen Transmission Type


HexCode: 70 CANOpen id: 0x3070

Description:
Sets the transmission type of the respective TPDOs.

Syntax Serial: ^CTT nn mm

Syntax Scripting: setconfig(_CTT, nn, mm)

Number of Arguments: 2

Argument 1: TPDOnbr
Min: 1 Max: 8

Argument 2: Type: Unsigned 8-bit


Min: 0 Max:255

Where:
nn = TPDO number, 1 to 8
mm = Transmission Type

Advanced Digital Motor Controller User Manual 475


Commands Reference

ECAT - EtherCAT Enable Mode


HexCode: F7 CANOpen Object: 0x30F7

Description:
Enables EtherCAT and selects operating mode.

Syntax Serial ^ECAT nn


~ECAT

Syntax Scripting SetConfig(_ECAT, nn)

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

ECT - EtherCAT Cycle Time

HexCode: F8 CANOpen Object: 0x30F8

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).

Syntax Serial ^ECT nn


~ECT

Syntax Scripting SetConfig(_ECT, nn)

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)

EDID - EtherCAT Explicit Device ID

HexCode: 104 CANOpen Object: 0x3104

Description:

Configures the explicit slave device identification. It is useful for distinguishing identical
devices in the same network.

Syntax Serial ^EDID nn


~EDID

Syntax Scripting SetConfig(_EDID, nn)

Number of Arguments: 1

Argument 1: ID
Type: Unsigned 16-bit
Min: 0 Max: 65535
Default: 5

Where:
nn = Explicit Slave Device ID

FSA – DS402 PDS Finite State Automation Enable


HexCode: CC CANOpen id: 0x30CC

Description:
Enables or disables the PDS Finite State Automation (FSA), as dictated in DS402 specifi-
cation.

Syntax Serial: ^FSA nn


~FSA

Syntax Scripting: setconfig(_FSA, nn)

Advanced Digital Motor Controller User Manual 477


Commands Reference

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.

RPDC - CANOpen RPDO COB-ID


HexCode: 10B CANOpen id: 0x310B

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

Syntax Serial: ^RPDC nn mm

Syntax Scripting: setconfig(_RPDC, nn, mm)

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

RPDM - CANOpen RPDO Mapping


HexCode: 9F CANOpen id: 0x309F

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.

Syntax Serial: ^RPDM nn mm

478 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024
CAN/EtherCAT Communication Commands

Syntax Scripting: setconfig(_RPDM, nn, mm)

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

mm= (index << 16) + (subindex << 8) + length.

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

TPDC - CANOpen TPDO COB-ID


HexCode: 10C CANOpen id: 0x310C

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

Syntax Serial: ^TPDC nn mm

Advanced Digital Motor Controller User Manual 479


Commands Reference

Syntax Scripting: setconfig(_TPDC, nn, mm)

Number of Arguments: 2
Argument 1: TPDO Item Type:Unsigned 8-bit Min: 1 Max:8
Argument 2: COB-ID Type:Unsigned 32-bit

TPDM - CANOpen TPDO Mapping


HexCode: A0 CANOpen id: 0x30A0

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.

Syntax Serial: ^TPDM nn mm

Syntax Scripting: setconfig(_TPDM, nn, mm)

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

mm= (index << 16) + (subindex << 8) + length.

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

TCP Communication Commands

This section describes all the configuration parameters uses for TCP operation.

TABLE 15-43. TCP Commands

Command Arguments Description


DHCP Enable Enable DHCP
GWA IP Octet Gateway Address
IPA IP Octet IP Address
IPP None IP Port
PDNS IP Octet Primary DNS
SBM IP Octet Subnet Mask
SDNS IP Octet Secondary DNS
WMOD Mode TCP Mode

DHCP - Enable DHCP


HexCode: 6F CANOpen id: 0x306F

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.

Syntax Serial: ^DHCP nn


~ DHCP

Syntax Scripting: setconfig(_DHCP, nn)

Number of Arguments: 1

Argument 1: Enable DHCP


Type: Unsigned 8-bit
Min: 0 Max: 1
Default: 0

Where:
nn = Enable DHCP
0: Disabled.
1: Enabled.

Example:
^DHCP 1: Enable DHCP.

Advanced Digital Motor Controller User Manual 481


Commands Reference

GWA - Gateway Address


HexCode: 69 CANOpen id: 0x3069

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.

Syntax Serial: ^GWA cc nn


~GWA

Syntax Scripting: setconfig(_GWA, cc, nn)

Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4

Argument 2: Gateway Address


Type: Unsigned 8-bit
Min: 0 Max: 255
Default:

TABLE 15-44. GWA default values


Octet Value
1 192
2 168
3 1
4 1

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.

Syntax Serial: ^IPA cc nn


~IPA

Syntax Scripting: setconfig(_IPA, cc, nn)

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:

TABLE 15-45. IPA default values


Octet Value
1 192
2 168
3 1
4 20

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.

Syntax Serial: ^IPP nn


~IPP

Syntax Scripting: setconfig(_IPP, nn)

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.

Advanced Digital Motor Controller User Manual 483


Commands Reference

PDNS - Primary DNS


HexCode: 6D CANOpen id: 0x306D

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.

Syntax Serial: ^PDNS cc nn


~PDNS

Syntax Scripting: setconfig(_PDNS, cc, nn)

Number of Arguments: 2

Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4

Argument 2: Primary DNS


Type: Unsigned 8-bit
Min: 0 Max: 255
Default:

TABLE 15-46. PDNS default values


Octet Value
1 192
2 168
3 1
4 1

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.

SBM - Subnet Mask


HexCode: 6A CANOpen id: 0x306A

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.

Syntax Serial: ^SBM cc nn


~SBM

Syntax Scripting: setconfig(_SBM, cc, nn)

Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4

Argument 2: Subnet Mask


Type: Unsigned 8-bit
Min: 0 Max: 255
Default:

TABLE 15-47. SBM default values


Octet Value
1 255
2 255
3 255
4 0

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.

SDNS - Primary DNS


HexCode: 6E CANOpen id: 0x306E

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.

Syntax Serial: ^SDNS cc nn


~SDNS

Syntax Scripting: setconfig(_SDNS, cc, nn)

Advanced Digital Motor Controller User Manual 485


Commands Reference

Number of Arguments: 2
Argument 1: IP Octet
Type: Unsigned 8-bit
Min: 1 Max: 4

Argument 2: Primary DNS


Type: Unsigned 8-bit
Min: 0 Max: 255
Default:

TABLE 15-48. SDNS default values


Octet Value
1 192
2 168
3 1
4 1

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.

WMOD - TCP Mode


HexCode: 67 CANOpen id: 0x3067

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.

Syntax Serial: ^WMOD nn


~WMOD

Syntax Scripting: setconfig(_WMOD, nn)

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.

Advanced Digital Motor Controller User Manual 487


Commands Reference

488 Advanced Digital Motor Controller User Manual V3.2, September 28, 2024

You might also like