CANopen
Introduction
- CiA technical groups develop CiA specifications (e.g. IG CANopen, IG Profiles, IG J1939, etc)
- Many CANopen specifications can be downloaded after free registration at can-cia.org. Some specifications can only be downloaded by members for political reasons (e.g. to make the membership more attractive, or because they are subject of a official standard).
- CANopen is specified in CiA 301. Version 4.0 (1999) is equivalent to EN 50325-4. The latest version is 4.2 (2007, public since 2011).
- Electronic Data Sheets (EDS) describe the device in INI-format or XML. CANopen FD allows only XML format. (Vector CANeds)
- J1939 is usually used for cars and trucks, CANopen is used for the superstructure/bodywork (e.g. on cranes, dustcarts, etc), lifts, medical equipments, solar power plants, etc.
- CANOpen Bit-Timing is defined in CiA 301. It is highly recommended to place the sampling point near to 87.5%.
- A star topology can be converted to a linear CAN bus by use of repeaters (each repeater "costs" 40m cable length).
- The connector pin assignment is defined in "CiA 303 Part 1" as recommendation.
- The Node-ID assignment can be done by local switches (e.g. DIB switch), serial interface, local HMI, bus connector pins, LSS (layer setting services), node claiming procedure (CiA 416-1, members-only), etc.
- Invalid prioritization can happen if low-prio messages are sent to early (e.g. because of slightly different clock speeds on devices)
- Message dupplication can happen if overload frames/error frames are sent to early (e.g. because of slightly different clock speeds on devices):
- Don't use toggle messages!
- Don't send relative data (e.g. angle increments, delta counts)
- Use protected protocols or sequence numbers
- CANopen implementation needs a VendorID (1500 euro for non-members or free for members, 2019)
- The EDS references to values from the CANopen object dictionary:
- General parameters (SDO, PDO, etc) are defined in CiA 301
- Parameters for program control (e.g. Firmware update): CiA 302-3 (members only)
- Index 0x1029 "Error Behavior" has default behavior, even if not implemented!
- The device type describes 0 to 8 profiles, which are implemented by the device. 0 profiles when everything is implemented with SDO/PDOs. Possible use-case referencing 3 identical profiles: device with 3-axos drive (3 logical devices)
- CANopen provides device profiles.
CANfestival:
TestMasterSlave -s 0 -S 250K -m 0 -M 250K -l libcanfestival_can_socket.so