www.fgks.org   »   [go: up one dir, main page]

This button brings you to the IXXAT WebpageThis button brings you to the canAnalyser WebpageThis is where you are at the moment IXXAT - Products, Services and Training for CAN, CANopen, DeviceNet, CAL, FlexRay, LIN, Embedded TCP/IP
Home
Introduction &
Network Structure
Object Dictionary & Electronic Data Sheet
Device Configuration (SDO)
Process Data Exchange (PDO)
Emergency
Messages
Network
Management (NMT)
Guarding & Heartbeat
Predefined
Connection Set
Layer Setting
Services (LSS)
Device and
Application Profiles
Implementation
of CANopen
Protocol Stacks
Tools / Interfaces
Books & Literature
Articles, News
Links
Downloads
Contact / Impressum


CANopen Solutions - Basics, Profiles, Protocol Stacks, Tools, Articles ...

About CANopen

Layer Setting Services (LSS)

As already mentioned, exactly two conditions must be fulfilled for the interconnection of CANopen devices to a network: all devices must use the same baudrate, and the CANopen node-IDs must be unique. But what happens if devices do not have switches to set these properties? The CANopen specification DS-306: Layer Setting Services (LSS) describes how these can be set via the bus with the aid of a simple protocol. The condition for the use of the LSS is, in addition to support by the device itself, to establish a 1:1 wiring to the node. Then the baudrate and the node-ID are set in dialog mode. The COB-ID 0x7E5 is used for CAN messages to the device, the device responds to COB-ID 0x7E4. LSS messages are always a full 8 bytes long. Unused bytes are reserved and should be initialized with 0.
 
To make contact with a device to be configured, the "Switch Mode Global" command is transmitted:
 
0x04 0x01 reserved

 
This command sets the device to LSS configuration mode. Unfortunately, this very service is the only unacknowledged LSS service, to which the device will therefore not respond, even if it has carried it out. The system integrator can therefore only find out with the following command whether the device has reacted.
 
Next the node-ID is requested via the "Inquire Node-ID" service:
 
0x5E reserved

 
If successful, the device responds with:
 
0x5E Node ID reserved

 
If there is no response, then either the device does not support the LSS service or the baudrate is not correct. If, namely, the baudrate when supplied is not known, the above-mentioned communication sequence must be tested with all permissible CANopen baudrates until the device is found.
 
The "Configure Node-ID" service is used to configure the new node-ID:
 
0x11 Node ID reserved

 
The error code is included in the device response:
 
0x11 Error code Error extension reserved

 
Error code 0 means success; error code 1 means inadmissible node-ID; the other error codes are reserved. The error extension contains vendor-specific information but is only valid for error code 0xFF.
 
The baudrate is configured with the "Configure Bit Timing Parameters" service:
 
0x13 Bit timing table Table entry reserved

 
The standardized CANopen bautrates are listed in the following table:
 
Baudrate table 0x00
Table indexBaudrate
01000 kBit/s
1800 kBit/s
2500 kBit/s
3250 kBit/s
4125 kBit/s
5reserved
650 kBit/s
720 kBit/s
810 kBit/s

 
Again the device response is:
 
0x13 Error code Error extension reserved

 
Error code 0 means success; error code 1 means inadmissible baudrate; the other error codes are reserved. The error extension contains vendor-specific information, but is only valid for error code 0xFF.
 
Now that the node-ID and the baudrate are configured, these settings should be saved with the "Store Configuration" service:
 
0x17 reserved

 
Whereupon the device acknowledges:
 
0x17 Error code Error extension reserved

 
Error code 0 means success; error code 1 means that the device does not support saving; error code 2 means that there is a problem with access to the storage medium; the other error codes are reserved. The error extension contains vendor-specific information, but is only valid for error code 0xFF.
 
Finally, the device is switched back from configuration mode to normal mode via "Switch Mode Global":
 
0x04 0x00 reserved

 
After being switched physically off and on again, the device now works with the new settings.