Can Networking Manual
Can Networking Manual
CANOpen
RawCAN
MiniCAN
RoboCAN
1
Brushless Motor Connections and Operation
Revision History
The information contained in this manual is believed to be accurate and reliable. How-
ever, it may contain errors that were not noticed at the time of publication. Users are
expected to perform their own product validation and not rely solely on data contained
in this manual.
Introduction................................................................................................. 5
Refer to the Datasheet for Hardware-Specific Issues................................. 5
User Manual Structure and Use.................................................................. 5
SECTION 1 CAN Networking on Roboteq Controllers.................................................................7
Supported CAN Modes............................................................................... 7
Connecting to CAN bus.............................................................................. 8
Introduction to CAN Hardware signaling..................................................... 9
CAN Bus Pinout.......................................................................................... 9
CAN and USB Limitations......................................................................... 10
Basic Setup and Troubleshooting.............................................................. 10
Cable polarity, integrity and termination resistor.......................................11
Check CANbus activity using a voltmeter..................................................11
Check CANbus activity using a CAN sniffer...............................................11
Mode Selection and Configuration............................................................11
Common Configurations........................................................................... 12
MiniCAN Configurations........................................................................... 12
RawCAN Configurations........................................................................... 12
Using RawCAN Mode............................................................................... 12
Checking Received Frames....................................................................... 12
Reading Raw Received Frames................................................................ 13
Transmitting Raw Frames.......................................................................... 13
Using MiniCAN Mode............................................................................... 14
Transmitting Data...................................................................................... 14
Receiving Data.......................................................................................... 14
MiniCAN Usage Example......................................................................... 15
SECTION 2 RoboCAN Networking............................................................................... 17
Network Operation................................................................................... 18
RoboCAN via Serial & USB....................................................................... 18
Runtime Commands................................................................................. 18
Broadcast Command................................................................................ 18
Realtime Queries...................................................................................... 19
Remote Queries restrictions..................................................................... 19
Configurations Read/Writes...................................................................... 20
Remote Configurations Read restrictions................................................. 20
Remote Maintenance Commands............................................................ 20
Self Addressed Commands and Queries.................................................. 21
RoboCAN via MicroBasic Scripting........................................................... 21
Sending Commands and Configuration.................................................... 21
Reading Operating values Configurations................................................. 22
Continuous Scan....................................................................................... 23
Checking the presence of a Node............................................................. 25
Self Addressed Commands and Queries.................................................. 25
Broadcast Command................................................................................ 25
Remote MicroBasic Script Download....................................................... 25
SECTION 3 CANopen Interface....................................................................................................27
Use and benefits of CANopen.................................................................. 27
CAN Connection....................................................................................... 27
CAN Bus Configuration............................................................................. 28
Node ID..................................................................................................... 28
Introduction
Some controller models are equipped with a standard CAN interface allowing up to 127
controllers to work together on a single twisted pair network at speeds up to 1Mbit/s.
1 - RawCAN
2 - MiniCAN
3 - CANopen
4 - RoboCAN
RawCAN is a low-level operating mode giving total read and write access to CAN frames.
It is recommended for use in low data rate systems that do not obey to any specific stan-
dard. CAN frames are typically built and decoded using the MicroBasic scripting language.
MiniCAN is greatly simplified subset of CANopen, allowing, within limits, the integration
of the controller into an existing CANopen network. This mode requires MicroBasic script-
ing to prepare and use the CAN data.
CANopen is the full Standard from CAN in Automation (CIA), based on the DS402 specifica-
tion. It is the mode to use if full compliance with the CANopen standard is a primary requisite.
Microcomputer
Motor Controllers
PLC
CANH
Resistors should be 120 ohm and located at each end of the cable. However, on a short
network communication will take place with a single resistor of 100 to 200 ohm located
anywhere on the network. Communication will not work if no resistor is present, or if its
value is too high.
CANbus will be operational upon enabling the desired CAN protocol and speed using the
PC utility.
Important Warning
A ground difference up to around 10V is acceptable. A difference of 30V or higher
can cause damage to one or more nodes. CANbus isolators must be used if a similar
ground level cannot be guaranteed between nodes.
0 0 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 0
3.5V
2.5V
1.5V
0V
Differential signaling reduces noise coupling and allows for high signaling rates over twist-
ed-pair cable. The High-Speed
14 CANbus specifications
25 (ISO 11898 Standard) are given for
a maximum signaling rate of 1 Mbps with a bus length of 40 m with a maximum of 30
nodes. It also recommends a maximum unterminated stub length of 0.3 m.
9 6
5 1
The pins on the DB9 connector are mapped as described in the table below.
9 15
1 8
The pins on the DB15 connector are mapped as described in the table below.
14 25
1 13
The pins on the DB25 connector are mapped as described in the table below.
9 6
TABLE 1-3. CAN Signals od DB25 connector
The controller will automatically enable USB and disable CAN as soon as the USB is con-
nected to the PC. The CAN connection will then remain disabled until the controller is
restarted with the USB unplugged.
See the controller model datasheet to verify whether simultaneous CAN and USB is sup-
ported.
The CANOpen and RawCAN protocol should not be used for this test as these do not gen-
erate data traffic on their own and will not cause measurable voltage changes.
Common Configurations
CAN Mode: Used to select one of the 4 operating modes. Off disables all CAN receive
and transmit capabilities.
Node ID: CAN Node ID used for transmission from the controller. Value may be be-
tween 1 and 126 included.
Bit Rate: Selectable bit rate. Available speeds are 1000, 800, 500, 250, and 125 kbit/s.
Default is 125kbit and is the recommended speed for RawCAN and Mini-
CAN modes.
Heartbeat: Period at which a Heartbeat frame is sent by the controller. The frame is
CANopen compatible 0x700 + NodeID, with one data byte of value 0x05
(Status: Operational). The Heartbeat is sent in any of the selected modes. It
can be disabled by entering a value of 0.
MiniCAN Configurations
ListenNodeID: Filters to accept only packets sent by a specific node.
SendRate: Period at which data frames are sent by the controller. Frames are struc-
tured as standard CANopen Transmit Process Data Objects (TPDOs). Trans-
mission can be disabled by entering a value of 0.
RawCAN Configurations
In the RawCAN mode, incoming frames may be filtered or not by changing the Listen-
NodeID parameter that is shared with the MiniCAN mode. A value of 0 will capture all
incoming frames and it will be up to the user to use the ones wanted. Any other value will
cause the controller to capture only frames from that sender.
CAN packets are essentially composed by a header and a data payload. The header is an
11 bit number that identifies the sender’s address (bits 0 to 6) and a packet type (bits 7 to
10). Data payload can be 0 to 8 bytes long.
Syntax: ?CF
When the query is sent from serial or USB, without arguments, the controller replies by
outputting all elements of the frame separated by colons.
Examples: Q: ?CAN
R: CAN=5:4:11:12:13:14:0:0:0:0
Q: ?CAN 3
R: CAN=11
Notes: Read the header to detect that a new frame has arrived. If header is dif-
ferent than 0, then a new frame has arrived and you may read the data.
After reading the header, its value will be 0 if read again, unless a new
frame has arrived.
New CAN frames will not be received by the controller until a ?CAN
query is sent to read the header or any other element.
Once the header is read, proceed to read the other elements of the
received frame without delay to avoid data to be overwritten by a new
arriving frame.
Syntax: !CS ee nn
Transmitting Data
In MiniCAN mode, data to be transmitted is placed in one of the controller’s available In-
teger or Boolean User Variables. Variables can be written by the user from the serial/USB
using !VAR for Integer Variables, or !B for Boolean Variables. They can also be written from
MicroBasic scripts using the setcommand(_VAR, n) and setcommand(_B, n) functions.
The value of these variables is then sent at a periodic rate inside four standard CANopen
TPDO frames (TPDO1 to TPDO4). Each of the four TPDOs is sent in turn at the time peri-
od defined in the SendRate configuration parameter.
Header:
Data:
Integer Variables are loaded into a frame with the Least Significant Byte first. Example
0x12345678 will appear in a frame as 0x78 0x56 0x34 0x12.
Boolean Variables are loaded in a frame as shown in the table above, with the lowest
Boolean Variable occupying the least significant bit of each byte. Example Boolean Var 1
will appear in byte as 0x01.
Receiving Data
In MiniCAN mode, incoming frames headers are compared to the Listen Node ID number.
If matched, and if the other 4 bits of the header identify the frame as a CANopen standard
RPDO1 to RPDO4, then the data is parsed and stored in Integer or Boolean Variables ac-
cording to the map below. The received data can then be read from the serial/USB using
the ?VAR or ?B queries, or they can be read from a MicroBasic script using the getval-
ue(_VAR, n) or getvalue(_B, n) functions.
Header:
Data:
Integer Variables are loaded from frame with the Least Significant Byte first. Example, a
frame with data as 0x78 0x56 0x34 0x12 will load in an Integer Variable as 0x12345678.
Boolean Variables are loaded from a frame as shown in the table above, with the lowest
Boolean Variable occupying the least significant bit of each byte. Example a received byte
of 0x01 will set Boolean Var 33 and clear Vars 34 to 40.
top:
speed = getvalue(_VAR, 9)
setcommand(_G, 1, speed)
motor_amp = getvalue(_A, 1)
setcommand(_VAR, 1, motor_amp)
wait(10)
goto top:
Note: This script does not check for loss of communication on the CAN bus. It is provided
for information only.
In RoboCAN, every controller can send commands to, and can read operational data from,
any other node on the network. One or more controller can act as a USB to CAN or Serial
to CAN gateway, allowing several controllers to be thus managed from a single PC or mi-
crocomputer.
Using a small set of dedicated Microbasic function, scripts can be written to exchange
data between controllers in order to create automation systems without the need for a
PLC or external computer.
In addition, RoboCAN includes support for processing raw can data as defined in the
RawCAN specification (See page 154), in order to incorporate simple CAN compatible 3rd
party devices in the network.
Microcomputer
USB or
RS232
CAN
CAN
Adapter
3rd Party CAN Accessory
Network Operation
RoboCAN requires only that a controller has a unique node number (other than 0)
assigned and that the RoboCAN mode is selected and enabled. All nodes must be
configured to operate at the same bit rate. Each enabled node will emit a special
heartbeat at a set and unchangeable rate of 128ms so that each node can create and
maintain a map of all nodes alive in the network.
Important notice: On many controller models, CAN and USB cannot be operated at the
same time. Please see product datasheet to verify if this is the case on the model used.
In case USB is not available, this section only applies to RS232 connections.
RoboCAN commands and queries can be sent from a USB or serial port using a modi-
fied syntax of the normal serial protocol: By simply adding the @ character followed by
the node as a 2 digit hex address, a command or query is sent to the desired node. This
scheme works with every Command (! Character), Query (?), Configuration setting (^),
Configuration read (~), and most Maintenance commands (%)
Runtime Commands
Below is a Command example:
!G 1 500
This is the normal command for giving a 50% power level command to motor 1 of the
controller that is attached to the computer.
@04!G 1 500
This will send the same 50% command to motor 1 of the controller at node address 4.
When a command is sent to a remote node, the reply is also a + or – sign. However, in
addition, the reply can be a * sign to indicate that the destination node does not exist or is
not alive. Note that the + sign only indicates that the command syntax is valid and that the
destination node is alive.
Broadcast Command
Node address 00 is used to broadcast a command simultaneously to all the nodes in the
network. For example
@00!G 1 500
Will apply 50% power to all motor 1 at all nodes, including the local node
Realtime Queries
Queries are handled the same way but the reply to a query includes the responding
node’s address. Below is a Query example:
?V 2
This is the normal query for reading the battery voltage of the local controller. The control-
ler will reply V=123
@04?V 2
Replies to remote nodes queries are identical to these to a local controller with the excep-
tion of an added latency. Since the reply must be retrieved from the remote node depend-
ing on the selected bit rate, the reply may come up to 10ms after the query was sent.
?AI
Is a local query that will return the values of all analog capture channels in a single string
as
AI=123:234:345:567
@04?AI
Is a remote query and it will return only the first analog capture channel as
@04 AI=123
Broadcast remote queries are not supported. For example @00?V 1 will not be executed.
Queries that return strings, such as ?FID or ?TRN are not supported. They will return the
value 0
See the Command Reference section in the manual for the complete list and description
of available queries
Configurations Read/Writes
Configuration settings, like Amp Limit or Operating Modes can be read and changed on a
remote node via the CAN bus. For example
@04^ALIM 1 250 will set the current limit of channel 1 of node 4 at 25.0A
Note that changing a configuration via CAN only makes that change temporary until the
remote controller is powered down. The %EESAV maintenance command must be send
to the remote node to make the configuration change permanent.
A configuration write can be broadcast to all nodes simultaneously by using the node Id
00. For example
@00^OVL 250
See the Commands Reference section for the complete list and description of available
configurations
~AMOD
Will return the operating mode of all analog capture channels in a single string as
AI=01:01:00:01:02
@04~AMOD
@04 AI=01
@04!G 1 500
No data will be sent on the network and it will be interpreted and executed the same way as
!G 1 500
A set of functions have been added to the MicroBasic language in order to easily send
commands to, and read data from any other node on the network. Functions are also
available to read and write configurations at a remote node. Maintenance commands are
not supported.
Where:
ch is the channel number. Put 1 for commands that do not normally require a channel
number
vv is the value
Example:
Will set the overvoltage limit of all nodes to 25.0V. Note that even though the Overvoltage
is set for the controller and does not normally require that a Channel, the value 1 must be
put in order for the instruction to compile.
Script execution is not paused when one of these function is used. The frame is sent on
the CAN network within one millisecond of the function call.
The wait step can be done using one of the 3 following ways
1. Pause script execution for a few milliseconds using a wait() instruction in line.
2. Perform other functions and read the results a number of loop cycles later
3. Monitor a data ready flag
The following functions are available in microbasic for requesting operating values and
configurations from a remote node.
Where:
id is the remote Node Id in decimal
cc is the Command code, eg _G
cc is the channel number. Put 1 for commands that do not normally require a channel number
The following functions can be used to wait for the data to be ready for reading:
IsCANValueReady()
IsCANConfigReady()
These functions return a Boolean true/false value. They take no argument and apply to the
last issued FetchCANValue or FetchCANConfig function
The retrieved value can then be read using the following functions:
ReadCANValue()
ReadCANConfig()
These functions return an integer value. They take no argument and apply to the last is-
sued FetchCANValue or FetchCANConfig function
Below is a sample script that continuously reads and print the counter value of node 4
top:
FetchCANValue(4, _C, 1) ‘ request data from remote node
while(IsCANValueReady = false) ‘ wait until data is received
end while
Counter = ReadCANValue() ‘ read value
print (Counter, “\r”) ‘ print value followed by new line
goto top ‘ repeat forever
Continuous Scan
In many applications, it is necessary to monitor the value of an operating parameter on a
remote node. A typical example would be reading continuously the value of a counter. In
order to improve efficiency and reduce overhead, a technique is implemented to automat-
ically scan a desired parameter from a given node, and make the value available for read-
ing without the need to send a Fetch command.
A function is provided to initiate the automatic sending of a value from the remote node,
at a specific periodic rate, and to be stored to user selected location in a receive buffer.
The remote node will then send the data continuously without further commands.
A function is then provided to detect the arrival of a new value in that buffer location, and
another to read the value from that location.
Since the scan rate is known, the execution of the script can be timed so that it is not
necessary to check the arrival of a new value.
Remote node
Request value to be issued at
every t ms, to buffer location n
The scan rate can be up to 255ms. Setting a scan rate of 0 stops the automatic sending
from this node.
Unless otherwise specified, the buffer can store up to 32 values.
The arrival of a new value is checked with the function
IsScannedCANReady(aa)
Where
aa is the location in the scan buffer.
The function returns a Boolean true/false value
top:
IsCANNodeAlive(id)
Where:
id is the remote Node Id in decimal
The function returns a Boolean true/false value.
Broadcast Command
Node address 00 is used to broadcast a command, or a configuration write simultaneous-
ly to all the nodes in the network.
The local node, however, will not be reached by the broadcast command.
RoboCAN includes a mechanism for loading MicroBasic scripts into any node in the net-
work. Use the “To Remote” button in the Scripting Tab of the Roborun PC utility. A win-
dow will pop-up asking for the destination node Id. Details of the command used to enter
the download mode and transferring scripts is outside the scope of this manual.
SECTION 3 CANopen
Interface
This section describes the configuration of the CANopen communication protocol and the
commands accepted by the controller using the CANopen protocol. It will help you to en-
able CANopen on your Roboteq controller, configure CAN communication parameters, and
ensure efficient operation in CANopen mode.
The section contains CANopen information specific to Roboteq controllers. Detailed information
on the physical CAN layer and CANopen protocol can be found in the DS402 documentation.
• Standardized in EN50325-4
• Widely supported and vendor independent
• Highly extensible
• Offers flexible structure (can be used in a wide variety of application areas)
• Suitable for decentralized architectures
• Wide support of CANopen monitoring tools and solutions
CAN Connection
Other
Controller Controller
CAN Device
CANH
120 Ohm
120 Ohm Termination
Resistor
CANL
Connection to a CAN bus is as simple as shown on the diagram above. 120 Ohm Termina-
tion Resistors must be inserted at both ends of the bus cable. CAN network can be up to
1000m long. See CAN specifications for maximum length at the various bit rates.
Use the CAN menu in the Configuration tab in order to enable the CANopen mode. Addi-
tionally, the utility can be used to configure the following parameters:
• Node ID
• Bit rate
• Heartbeat (ms)
• Autostart
• TPDO Enable and Send rate
Node ID
Every CANopen network device must have a unique Node ID, between 1 and 127. The val-
ue of 0 is used for broadcast messaging and cannot be assigned to a network node.
Bit Rate
The CAN bus supports bit rates ranging from 10Kbps to 1Mbps. The default rate used in
the current CANopen implementation is set to 125kbps. Valid bit bates supported by the
controller are:
• 1000K
• 800K
• 500K
• 250K
• 125K
Heartbeat
A heartbeat message is sent to the bus in millisecond intervals. Heartbeats are useful for de-
tecting the presence or absence of a node on the network. The default value is set to 1000ms.
Autostart
When autostart is enabled, the controller automatically enters the Operational Mode of
CANopen. The controller autostart is disabled by default. Disabling the parameter will pre-
vent the controller from starting automatically after the reset occurs. When disabled, the
controller can only be enabled when receiving a CANopen management command.
SDO messages provide generic access to Object Dictionary and can be used for obtaining
parameter values on an irregular basis due to the excessive network traffic that is generat-
ed with each SDO request and response message.
The list of commands accessible with SDO messages can be found in the “Object Dictio-
nary” on page 33.
TPDOs are runtime operating parameters that are sent automatically on a periodic basis
from the controller to one or multiple nodes. TPDOs do not alter object data; they only
read internal controller values and transmit them to the CAN bus.
TPDOs are identified on a CANopen network by the bit pattern in the 11-bit header of the
CAN frame.
4 bits 7 bits
}
CANopen allows up to four TPDOs for any node ID. Unless otherwise specified in the
product datasheet, by default, TPDO1 to TPDO4 are used to transmit up to 8 user vari-
ables which may be loaded with any operating parameters using MicroBasic scripting.
Each of the 4 TPDO can be mapped with any mappable SDO query. For more details see
chapter PDO Mapping below.
Each of the 4 TPDOs can be configured to be sent at user-defined periodic intervals. This
is done using the CTPS parameter (See “CTPS - CANOpen TPDO Send Rate” in “Roboteq
Controllers User Manual v2.0”).
PDO Mapping
The Process Data Object (PDO) service allows exchanging one or several process vari-
ables in one single CAN message. The PDO mapping parameter describes which objects
in the CANopen object dictionary are transmitted by the sender. The PDO receiver uses
also a PDO mapping parameter, which specifies where to store the received process data
in the CANopen object dictionary. The PDO mapping parameter of the transmitter and
the sender may use different pointers (16-bit index and 8-bit sub-index) depending on the
CANopen profile.
In some simple devices, the user does not have the possibility to configure the PDO
mapping parameters. This is called static PDO mapping, but our controllers provide vari-
able PDO mapping. This means the system designer can re-configure the default PDO
mapping or generate new PDOs. Normally, this is done in the NMT pre-operational state,
when the PDOs are disabled. Of course, the user can also reconfigure the PDO mapping
in the NMT operational state, but then it is necessary to avoid inconsistencies in the PDO
mapping on the producer and the consumer side. To avoid this, the PDO must not be pro-
duced until the entire reconfiguration is finished.
The CiA 301 application layer specification requires a dedicated re-mapping procedure:
1. “Destroy” the PDO by setting the valid bit to 1b of sub-index 01h of the PDO communi-
cation parameter.
2. Disable PDO mapping by setting the sub-index 00h of the PDO mapping parameter to
00h.
3. Modify PDO mapping by changing the values of the corresponding sub-indices of the
PDO mapping parameters.
4. Enable PDO mapping by setting the sub-index 00h to the number mapped process
data.
5. “Create” a PDO by setting the valid bit to 0b of sub-index 01h of the PDO communica-
tion parameter.
If the controller detects that the index and subindex of the mapped object does not exist
or the object cannot be mapped during step 3, the controller responds with the SDO abort
transfer service (abort code: 06020000h or 06040041h). If the controller detects that the
RPDO mapping is not valid or not possible during step 4, the controller responds with the
SDO abort transfer service (abort code: 06020000h or 06040042h).
In the following example, we will show how to remap TPDO1 (0x1800) to transfer the fol-
lowing:
• 0x210001: Motor amps for channel 1 (U16).
• 0x210002: Motor amps for channel 2 (U16).
• 0x210D01: Internal voltage (U16).
• 0x210F01: MCU temperature (U8).
The transmission type of a PDO can be set via the second sub-index.
(1)
Not supported in Roboteq controllers.
(2)
In Roboteq controllers, it behaves exactly like value 255.
Object Dictionary
The CANopen dictionary shown in this section is subject to change. The CANopen EDS
file can be downloaded from the roboteq web site.
The Object Dictionary given in the table below contains the runtime queries and runtime
commands that can be accessed with SDO/PDO messages during controller operation.
Communication Profile
Runtime Commands
Runtime Queries
DS402 Profile
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x600+nd 8 css n xx index subindex data
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x580+nd 8 css n xx index subindex Data
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x600+1 8 2 0 0 0x2003 0x02 0x0A
601h 8 20 03 20 02 0A 00 00 00
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x580+1 8 6 0 0 0x2003 0x02 0x00
581h 8 60 03 20 02 00 00 00 00
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x580+1 8 6 0 0 0x200C 0x00 0x00
58Ch 8 60 0C 20 00 00 00 00 00
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x600+1 8 4 2 0 0x210D 0x02 0x00
601h 8 48 0D 21 02 0A 00 00 00
Payload
Byte0
Header DLC bits 4-7 bits2-3 bits0-1 Byte1-2 Byte 3 Bytes4-7
0x580+1 8 4 2 xx 0x210D 0x02 0x190
581h 8 48 0D 21 02 90 01 00 00
Abbreviations
C Constant
CiA CAN in Automation
FSA Finite State Automation
PDS Power Drive System
PP Profile Position Mode
PV Profile Velocity Mode
RO Read Only
RW Read Write
SDO Service Data Object
TQ Torque Mode
VL Velocity Mode
Introduction
This documentation will describe the implementation of CiA DS402 standard on Roboteq
motor controllers.
What is DS402
DS402 is an open standard, that is designed specifically for motion control. There are a
number of CANOpen SDOs with which one can control the motor by commanding the
motor controller.
The standard describes all the required SDOs, as long as the actions the motor controller
should take upon receiving these SDOs. Additionally the standard describes a Finite State
Machine (FSA) which should run on motor controller.
Implementation
The implementation has been directed under standard version 4.1.0.
Modes of Operation
Roboteq Controllers support the following operation Modes:
A. Open Loop
B. Closed Loop Speed, controls Speed using Speed as feedback.
C. Closed Loop Speed Position, controls Speed using Position as feedback.
D. Closed Loop Count Position, controls Position.
E. Closed Loop Position Relative, controls Position within specific boundaries.
F. Closed Loop Position Tracking, controls Position within specific boundaries, with
abrupt transition.
In order to conform the above operation modes to the operation modes described, the
DS402 modes of operation supported by Roboteq are shown in Table 4-1 - Operation Table 1.
Any other mode described in DS402 standard is not supported by Roboteq controllers.
Supported SDOs
Table 4-2 shows the SDOs described in DS402 standard and supported by Roboteq Motor
Controllers.
PDS FSA
The standard requires the implementation of a specific finite state machine called FSA.
The FSA is designed not only to react to CANOpen commands (Controlword and Sta-
tusword), but also to local commands (in this case the use of CW command and SW
query). For backward compatibility reasons, the FSA is not active by default. It can be acti-
vated by using a special configuration command (^FSA 1, see Figure 4-1).
Figure 4-2 describes The states and the transitions of the finite state machine, while Table
4-3 describes the actions and the events of the transitions.
SDO Description
Table 4-4 gives a short description of the object, Table 4-5 the mapping of the respective
variable and Table 4-6 the usage of the bits that are independent to operation mode.
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
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, After releasing the halt function, the commanded motion shall be continued if
possible, see Table 4-7.
In Profile Position Mode the operation specific bits are mapped in Table 4-8. With bits 4, 5
and 9, user can define when the command for next Position (0x607A - POS) will be pro-
cessed. Bit 6 defines whether the command is absolute or relative to the current position.
Velocity Mode
TABLE 4-10. control word mapping in Velocity Mode
15 9 8 7 6 5 4 3 0
see Reference Unlock Enable
see Table 4 Halt see Table 4
Table 4 Ramp Ramp Ramp
MSB LSB
In Velocity Mode the operation specific bits are mapped on Table 4-10. With bits 4, 5 and
6, user can configure the available ramp related options as shown in Table 4-11.
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 al-
ways 1. 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 alter 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 4-15). If bit 11 (in-
ternal limit active) of the statusword is 1, this shall indicate that an current limit has been
reached.
In Profile Position Mode the operation specific bits are mapped in Table 4-16. With bits 10
and 12 user can acknowledge the status of the controller as shown in Table 4-15 and Table
4-17. Bit 13 is always 0.
In Profile Velocity Mode the operation specific bits are mapped in Table 4-18. With bits 10
and 12 user can acknowledge the status of the controller as shown in Table 4-15 and Table
4-19. Bit 13 is always 0.
This object shall indicate the configured minimum and maximum amount of velocity in
RPM. The vl velocity max amount sub-object shall be mapped internally to the vl velocity
max positive and vl velocity max negative values. The vl velocity min amount sub-object
shall be mapped internally to the vl velocity min positive and vl velocity min negative val-
ues. as shown Figure 4-3.
The position unit are in sensor counts in Closed Loop Count Position mode. In Closed
Loop Position Relative mode and in Closed Loop Tracking Position mode the position unit
is in range -1000 to 1000 scaled by the minimum and maximum sensor value.
The position unit are in sensor counts in Closed Loop Count Position mode. In Closed
Loop Position Relative mode and in Closed Loop Tracking Position mode the position unit
is in range -1000 to 1000 scaled by the minimum and maximum sensor value.
References
1. CiA® 402 Draft Standard Proposal, v4.1.0, https://www.can-cia.org/can-knowledge/
canopen/cia402/