After a variety of CAN-based projects, we decided on creating a range of standard automation / IoT / Industry 4.0 products. To improve market compatibility, we choose to base the communication of these products on the CANopen® standards.
Since commercial stack solutions would become too expensive for a large number of different devices, we choose to roll our own implementation of a CANopen protocol stack. This means there are no third-party licensing fees involved when we develop a custom device for you. Our use is primarily targetted at the various lines of STM32 microcontrollers. But being generic C code, that particular µC family is not a prerequisite.
CAN provides a very robust and reliable infrastructure for transferring messages across a cable. This has been recognized by many industrial applications (DeviceNet, CANopen®), for maritime on-board communications (NMEA 2000), communications in and around trucks (SAE J1939) and by all car manufacturers for data exchange with engine management systems and diagnostics interfaces (OBDII).
CANopen adds a well defined communication layer to CAN. This enables interoperability between different suppliers of hard- and software.
- CiA 301 4.2.0 - CANopen application layer and communication profile; the essence of CANopen, defines Service Data Object (SDO) parameters & handling, Process Data Object (PDO).
- CiA 302-2 4.1.0 - Network management, provides some SDO definitions that define the device startup behaviour.
- CiA 302-3 4.1.0 - Configuration and program download, including firmware update capabilities.
- CiA 302-4 4.1.0 - Network variables and process image.
- CiA 302-9 1.0.0 + custom - Power management & monitoring features.
- CiA 306-1 1.3.7 - Electronic data sheet (EDS) specification. Via services provided by CiA 302-3, this EDS file is generated by the device itself, so the correct EDS is always on hand.
- CiA 305 3.0.0 - Layer setting services (LSS) enable for remote node-ID assignment and Fastscan.
- CiA 401-1 3.1.0 - Device profile for generic I/O devices.
- CiA 404-1 2.1.0 - Device profile for measuring devices.
- CiA 410 2.0.0 - Device profile for inclinometer.
- CiA 458 1.0.0 - Device profile for energy measurements.
- CiA 801 1.0.0 - Automatic bitrate detection between 10kbps and 1Mbps.
The stack is completely build around the SDO concept of CANopen. All device/process parameters and variables are mapped to these 'service data objects'.
Whenever the device updates one of it's process variables, the stack checks wether or not the SDO for that variable has an active Transmit PDO mapping. If it has, that PDO is scheduled for transmission or sent immediately, depending on the PDO configuration. For performance reasons, the stack maintains a simple cache of SDO mappings.
Each PDO entry contains a pointer to the corresponding variable and a pointer to an optional handler function. When a SDO is written - either directly or via a Receive-PDO mapping, the variable is updated and the handler executed. The handler function enables runtime validation of the new value or can perform complex updates.
Our typical default configuration of devices is set to enable out of the box operation of the device without any configuration required. This enables intergration with non-CANopen networks & systems. All you need to do is listen for certain predefined CAN-ID's to receive certain sensor values and write to predefined CAN-ID's to update device outputs or status.
by White Bream, Holland
For time being, this stack is available only as part of our device development services.
|No products yet, please email for your inquiries...|