Canopen: Cia Draft Standard Proposal 305
Canopen: Cia Draft Standard Proposal 305
Canopen: Cia Draft Standard Proposal 305
Version 1.0
Date: 31.05.00
DIRECTORY
1 SCOPE.................................................................................................................................................................... 3
2 NORMATIVE REFERENCES........................................................................................................................... 3
2
CANopen LSS Services and Protocol CiA DSP-305
1 Scope
This document contains the protocol specification of the Layer Setting Services (LSS) for CANopen.
2 Normative references
/1/ ISO 11898: Road vehicles - Interchange of digital information Ð Controller area network (CAN) for
high-speed communication, 1993-11-15
/2/ CiA DS 301: CANopen - Application Layer and Communication Profile, Version 4.0, 1999-06-16
COB-ID Each COB is uniquely indentified in a CAN network by a number called the COB Identifier (COB-
ID). The COB-ID determines the priority of the COB for the MAX sub-layer.
LMT Layer Management. Functions to inquire and change the settings of certain parameters of the local
layers on a CAL module.
LSS Layer Setting Services. Functions to inquire and change the settings of certain parameters of the local
layers on a CANopen module.
MAC Medioum Access Control. €one of the sub-layers of the Data Link Layer in the CAN Reference
Model that controls who gets access to the medium to send a message.
NMT Network Management. One of the service elements of the application layer in the CAN Reference
Model. The NMT serves to configure, initialise, and handle errors in a CAN network.
3.2 Definition
LSS offers the possibility to inquire and change the settings of certain parameters of the local layers on
a CANopen module with LSS Slave capabilities by a CANopen module with LSS Master capabilities via the
CAN Network.
The following parameters can be inquired and/or changed by the use of LSS:
By using LSS a LSS Slave can be configured for a CANopen network without using any devices like DIP-
switches for setting the parameters. There are several solutions available for LSS Slaves with and without a
unique LSS-address or non-volatile storage.
3
CANopen LSS Services and Protocol CiA DSP-305
CONFIGURATION
MODE
OPERATION
MODE
The LSS services are described in a tabular form that contains the parameters of each service primitive.
4
CANopen LSS Services and Protocol CiA DSP-305
Besides the LSS Switch Mode Services there may be other (local and module specific) means to change
the mode of an LSS Slave, that are not within the scope of this document.
Parameter Request/Indication
Argument Mandatory
mode Mandatory
configuration_mode Selection
operation_mode Selection
Parameter Request/Indication
Argument Mandatory
LSS_address mandatory
Argument Mandatory
Node-ID mandatory
This service allows only one LSS Slave in configuration mode. The remote result parameter confirms
the success or failure of the service. In case of a failure optionally the reason is confirmed.
5
CANopen LSS Services and Protocol CiA DSP-305
Argument Mandatory
table_selector mandatory
table_index mandatory
Remote Result
success Mandatory
failure selection
reason selection
optional
By means of the table_selector the bit timing parameter table to be used is specified. In the bit timing
parameter table the bit timing parameters for different baud rates are specified. With table_selector value «0« the
standard CiA bit timing parameter table is referenced. The table_index selects the entry (baud rate) in the
selected table (value Ô0Õ referes to the highes baud rate).
This service allows all LSS Slaves in configuration mode. The service has to be followed by an Activate
Bit Timing Parameters service to activate the configured parameters. After execution of the Configure Bit
Timing Parameters service the node may not execute any remote LSS services except the services Configure Bit
Timing Parameters, Activate Bit Timing Parameters and Switch Mode.
The remote result parameter confirms the success or failure of the service. In case of a failure optionally
the reason is confirmed.
Parameter Request/Indication
Argument Mandatory
switch_delay mandatory
The switch_delay parameter specifies the length of two delay periods of equal length, which are
necessary to avoid operating the bus with differing bit timing parameters. Each node performs the actual switch
of the bit timing parameters «switch_delay« milliseconds after the reception of the command. After performing
the switch, a node does not transmit any messages before the second time «switch_delay« has passed.
Note
Nodes may have different processing times for performing the Activate Bit Timing Parameters
command and messages that are transmitted before this command may still be in the receive queue of a node.
6
CANopen LSS Services and Protocol CiA DSP-305
This means that a node may still transmit CAN messages with the old bit timing during the duration of the
processing delay. Therefore switch_delay has to be longer than the longest processing time of any node in the
network to avoid that a node already switches while another node still transmits using the old bit timing
parameters. After the time specified by switch_delay has passed the first time, every node must perform the
switch during the second duration of switch_delay. Therefore after switch_delay has passed the second time, all
nodes are guaranteed to be listening with the new bit timing parameters. The diagram in figure 3 shows the
location of the two switch_delay periods.
.....
....................... .....
Argument Mandatory
The remote result parameter confirms the success or failure of the service. In case of a failure optionally
the reason is confirmed.
7
CANopen LSS Services and Protocol CiA DSP-305
Argument Mandatory
Exactly one LSS slave may be in configuration mode when this service is executed. The remote result
parameter confirms the LSS address of the LSS Slave in configuration mode or the failure of the service. In case
of a failure optionally the reason is confirmed.
Parameter Request/Indication
Argument Mandatory
LSS_Address_sel mandatory
Parameter Request/Indication
Argument Mandatory
8
CANopen LSS Services and Protocol CiA DSP-305
Requesting Messages (from LSSMaster) using COB-ID 2021. Response Messages (from LSSSlave)
using COB-ID 2020.
LSS uses command specifiers to identify the commands. Command specifiers from 0 - 07fh are
reserved for use by LMT, respectively LSS. The range from 0 Ð 03fh are reserved for use by LMT services. The
range from 040h Ð 07fh are reserved for use by standard LSS services. Command specifiers from 080h - 0ffh are
free for application specific purposes and may only be used with at most one LSS Slave in configuration mode.
In the description of the COB data format, bytes are numbered from zero to and including seven. Bits
within a byte are numbered from zero to and including seven. Byte zero is transmitted first, byte seven is
transmitted last. Within a byte, bit zero is the least significant bit, bit seven is the most significant bit.
The terms 'lsb' and 'msb' stand for 'least significant byte' and 'most significant byte' respectively and are
used to define how an integer number is represented in more than one byte for the LSS Protocol. The order of
significance is increasing from lsb to msb.
3.9 SWITCH MODE PROTOCOLS
COB-ID = 2021
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
04 for Switch Mode Global
· mode:
The LSS mode to switch to:
0: switches to operation mode
1: switches to configuration mode
· reserved:
reserved for further use by CiA.
9
CANopen LSS Services and Protocol CiA DSP-305
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2020
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifiers;
64 to 68 for Switch Mode Selective
· vendor-id:
Vendor name part of the LSS address, with respect to index 1018h, subindex 1
· product-code:
Product name part of the LSS address, with respect to index 1018h, subindex 2
· revision-number:
Revision part of the LSS address, with respect to index 1018h, subindex 3
· serial_number:
Serial number part of the LSS address, with respect to index 1018h, subindex 4
· mode:
The actual LSS mode of the Slave
0: operation mode
1: configuration mode
10
CANopen LSS Services and Protocol CiA DSP-305
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2020
0 1 2 3 4 5 6 4 5
error spec. reserved
cs =17 code error
· cs:
LSS command specifier
17 for Configure Node-ID
· NID:
The new Node-ID to configure, see /2/
· error_code:
0: protocol successfully completed
1: Node-ID out of range
2 ... 254 : reserved for further use by CiA
255 : implementation specific error occured.
· specific_error_code:
If error_code equals 255, specific_error_code gives an implementation specific error code,
otherwise it is reserved for further use by CiA.
· reserved:
reserved for further use by CiA
COB-ID = 2021
0 1 2 3 4 5 6 7 8
table table reserved
cs =19
selector index
COB-ID = 2020
0 1 2 3 4 5 6 7 8
error spec. reserved
cs =19 code error
· cs:
LSS command specifier
19 for Configure Bit Timing Parameters
11
CANopen LSS Services and Protocol CiA DSP-305
· table_selector:
selects which bit timing parameters table has to be used
0: standard CiA bit timing table (see /4/)
1..127: reserved for further use by CiA
128..255: may be used for manufacturer specific bit timings
· table_index:
selects the entry (bit timeing parameters) in the selected table; see 3.5.2 for valid indices when
using the standard CiA bit timings (table_selector = 0)
· error_code:
0: protocol successfully completed
1: bit timing not supported
2..254: reserved for further use by CiA
255: implementation specific error occured
· specific_error_code:
if error_code equals 255, specific_error_code gives an implementation specific error code,
otherwise it is reserved for further use by CiA.
COB-ID = 2021
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
21 for Activate Bit Timing Parameters
· switch_delay:
The duration of the two periods of time to wait until the bit timing parameters switch is done
(first period) and before transmitting any CAN message with the new bit timing parameters
after performing the switch (second period). The time unit of switch delay is 1 ms.
· reserved:
reserved for further use by CiA.
COB-ID = 2021
0 1 2 3 4 5 6 7 8
cs =23 reserved
COB-ID = 2020
0 1 2 3 4 5 6 7 8
error spec. reserved
cs =23 code error
12
CANopen LSS Services and Protocol CiA DSP-305
· cs:
LSS command specifier
23 for Store Configuration
· error_code:
0: protocol successfully completed,
1: store configuration is not supported,
2: storage media access error
3 . . 254: reserved for further use by CiA,
255: implementation specific error occured.
· specific_error_code:
If error_code equals 255, specific_error_code gives an implementation specific error code,
otherwise it is reserved for further use by CiA.
· reserved:
reserved for further use by CiA.
COB-ID = 2021
0 1 2 3 4 5 6 7 8
cs =90 reserved
COB-ID = 2020
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
90 for Inquire Manufacturer Name
· vendor-id:
The vendor-id (see /2/) of the selected module.
· reserved:
reserved for further use by CiA.
13
CANopen LSS Services and Protocol CiA DSP-305
COB-ID = 2021
0 1 2 3 4 5 6 7 8
cs =91 reserved
COB-ID = 2020
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
91 for Inquire Product Name
· product-code:
The product-code (see /2/) of the selected module.
COB-ID = 2021
0 1 2 3 4 5 6 7 8
cs =92 reserved
COB-ID = 2020
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
92 for Inquire Serial Number
· revision-number:
The revision-number (see /2/) of the selected module.
14
CANopen LSS Services and Protocol CiA DSP-305
COB-ID = 2021
0 1 2 3 4 5 6 7 8
cs =93 reserved
COB-ID = 2020
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
93 for Inquire Serial Number
· serial-number:
The serial-number (see /2/) of the selected module.
15
CANopen LSS Services and Protocol CiA DSP-305
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
COB-ID = 2021
0 1 2 3 4 5 6 7 8
· cs:
LSS command specifier
70 to 75 for LSS Identify Remote Slaves
· vendor-id:
The manufacturer name part of the LSS Address
· product-code:
The product name part of the LSS Address
· revision-number-low:
The lower boundary of the requested revision numbers range. The Minore range must be set to
0000h.
· revision-number-high:
The higher boundary of the requested revision numbers range. The Minor range must be set to
FFFFh.
· serial-number-low:
The lower boundary of the requested serial numbers range
· serial-number-high:
The higher boundary of the requested serial numbers range
16
CANopen LSS Services and Protocol CiA DSP-305
The boundaries are included in the interval. All LSS Slaves with matching vendor-id and product-code whose
major revision-number and serial-numbers lie within the given ranges, are requested to identify themselves with
the LSS Identify Slave service.
COB-ID = 2020
0 1 2 3 4 5 6 7 8
cs =79 reserved
· cs:
LSS command specifiers
79 for Identify Slave
· reserved:
all bytes set to '0'
To distinguish between LMT and LSS, all for LSS services used command specifiers are fixed to a range from
040h Ð 07fh.
Invalid COB's
A COB is invalid if it has a COB-ID that is used by the LSS Protocol, but contains invalid parameter values
according to the LSS Protocol. This can be caused by errors in the data link layer (see /1/) or implementaton
errors. Invalid COB's must be handled locally in an implementation specific way that does not fall within the
scope of the /2/. As far as the LSS Protocol is concerned, an invalid COB must be ignored.
Time-Outs
Since COB's may be ignored, the response of a confirmed LSS service may never arrive. To resolve this
situation, an implementation may, after a certain amount of time, indicate this to the service user (time-out). A
time-out is not a confirm of the LSS service. A time-out indicates that the service has not completed yet. The
application must deal with this situation. Time-out values are considered to be implementation specific and do
not fall within the scope of the /2/. However, it is recommended that an implementation provides facilities to
adjust these time-out values to the requirements of the application.
17