Open search
Advertisement

CAN Newsletter magazine

CANopen FD devices identification via LSS

This article introduces the layer setting services (LSS) used to configure network-ID, node-ID, and bit-timing of devices in CANopen FD systems. The according specification is intended to be released in summer 2021.

(Source: Adobe Stock)

The complete article is published in the June issue of the CAN Newsletter magazine 2021. This is just an excerpt.

CANopen devices require a node-ID in the value range from 1 to 127 used for unique addressing in different CANopen services. The layer setting services (LSS, defined in CiA 305) allow to assign the node-ID and the bit rate via the CANopen network. LSS is used for CANopen devices without a hardware interface (e.g. DIP-switches, EIA-232) or for applications requiring a high level of plug-and-play support. In September 2017, CAN in Automation (CiA) has published the CiA 1301 CANopen FD application layer and communication profile. Since then, the CiA SIG (special interest group) LSS FD discusses how CANopen layer setting services should be adapted to CANopen FD.

The basic requirement for participating devices is the availability of the identity object (1018h) with four implemented 32-bit sub-indexes: vendor-ID, product code, revision number, and serial number. In combination, the sub-indexes provide a 128-bit value, which is called LSS address. The LSS address is a unique number for any CANopen (FD) device. The vendor-ID (object 1018h, sub-index 01h) is mandatory for all classic CANopen and CANopen FD devices. CiA assigns the vendor-ID uniquely to the device manufacturers.

LSS distinguishes between an LSS manager (typically residing in the host controller) and the LSS server, formerly named the LSS master and the LSS slave. The terms LSS manager and LSS server have to be finally approved by the CANopen (FD) community. In a CANopen network, the LSS Fastscan service is used to identify the unconfigured LSS servers. LSS Fastscan service requires up to 128 messages to be exchanged. Using the new service for CANopen FD (LSS switch state selective FD) the complete LSS address can be identified after exchange of maximum 33 messages. This service replaces the LSS switch state selective service in CiA 305. It will be specified in CiA 1305 CANopen FD layer setting services (LSS) and protocols. Benefited from the larger payload of CANopen FD, the complete 128-bit LSS address can be sent in one request.

In case several unconfigured LSS servers exist in a CANopen FD system, they can be identified by means of the LSS switch state selective FD service. All unconfigured nodes will handle the switch state selective FD requests from the LSS manager. All other (configured) nodes will ignore such requests. This service allows the LSS manager to select LSS servers based on their LSS address or portions thereof. To fulfill the service, the 128-bit LSS address was divided into 32 pieces (nibbles) of four bit each. The nibbles are numbered from 0 to 31 (most significant bit to lowest significant bit). The LSS manager consequently asks the LSS servers for the values of each nibble. 16 messages with the CAN-IDs from 07D0h to 07DFh are used as possible feedback. When the LSS manager requests the value of the first nibble, the LSS servers reply with 07D0h if their first nibble is zero, 07D1h if it is one and so forth until 07DFh if their first nibble is 0Fh. Then, the LSS manager takes the first response (all others are ignored for this cycle) and packs the first nibble value into the next request. The LSS servers with the first matching nibble inform the LSS manager about the second nibble value using the 16 messages with the mentioned CAN-IDs. Then, the LSS manager packs the detected first and second nibble value (from a node responded first) into the next request. This cycle is repeated until all nibbles have been processed and a single, unconfigured LSS server is identified. Then, the identified LSS server is switched into the LSS configuration state in which a network-ID and a node-ID can be assigned.

To decrease the boot-up time in CANopen FD systems that may be modified by the end user, the LSS manager could store LSS addresses that have been identified. On each power-up, the LSS manager could try those LSS addresses first and if there is then still an unconfigured LSS server left in the system, the LSS switch state selective FD cycle is started.

If you would like to read the full article from Yao Yao (CAN in Automation), you can download it free of charge or you download the entire magazine.

cw

Publish date
2021-06-07
Company

CAN in Automation
CAN Newsletter June issue

Breadcrumb