CANopen and the OSI reference model
The Open System Interconnection (OSI) reference model by ISO specifies seven layers. The CANopen application layer and communication profile as specified in CiA 301 or EN 50325-4 (equivalent to CiA 301 version 4.0) covers mainly the transport layer and the application layer. The presentation, session, and network layers are not used. The data link layer complies with ISO 11898-1 and uses data frames in CBFF (Classical Base Frame Format) by default and optionally data frames in CEFF (Classical Extended Frame Format). Remote frames are allowed, but not recommended at all.
CANopen uses by default the CAN physical layer as defined in ISO 11898-1 (physical signaling sub-layer) and in ISO 11898-2 (physical media access sub-layer). This enables bit-rates up to 1 Mbit/s. In order to improve interoperability, CiA 301 limits the bit-rates to the following values and sample-point ranges (given in percentage of the bit-time):
- 1 Mbit/s (75 % to 90 %)
- 800 kbit/s (75 % to 90 %)
- 500 kbit/s (85 % to 90 %)
- 250 kbit/s (85 % to 90 %)
- 125 kbit/s (85 % to 90 %)
- 50 kbit/s (85 % to 90 %)
It is recommended to use daisy-chained line topologies or line topologies with short stubs. Bus ends of the network cable needs to be terminated by resistors (nominally 120 Ω each). The network length at a given bit-rate depends not only on the configured sample, but for example also on the used cables and not terminated stubs. In 1-Mbit/s networks you can achieve about 25 m. Using 500 kbit/s network length of up to 125 m are possible. In 250-m networks bit-rates of up to 250 kbit/s can be reached. Setting the bit-rate to 125 kbIt/s allows up to 500 m and at 50 kbit/s the maximum length is 1 km.
Optionally, transceivers compliant to ISO 11898-3 with low-power capability and fault-tolerant function are allowed, but not recommended for new designs. They are limited to 125 kbit/s.
The network designer must assign uniquely the CANopen node-ID to each connected CANopen device. Additionally, all CANopen nodes must use the very same bit-rate.
The CANopen profile specifications defining the process data, configuration parameters, and the diagnostic information are above the OSI reference model. This includes also the mapping of process data into PDOs.
CiA 302-7 specifies a network layer. The described protocols allow accessing CANopen devices from another CANopen network segment (remote SDO services). This could be used to configured from a single point a complex CANopen system comprising several segments. Of course, this network layer can be also used for diagnosis purposes (remote EMCY services).
|Application level||User program(s)|
|Data level||CiA 4XX: Device and application profiles|
|Application layer||CiA 301: NMT, Heartbeat, SDO, PDO, SYNC, EMCY, TIME|
|Presentation layer||CiA 301: Data types ans encoding rules|
|Session layer||Not applicable|
|Transport layer||CiA 301: Segmented SDO|
|Network layer||(CiA 302-7: SDO and EMCY routing, PDO bridging)*|
|Data link layer||ISO 11898-1|
|Physical layer||ISO 11898-2, CiA 301 (bit-timing), CiA 303-1 (cable and connectors)|
* only necessary in multiple CANopen network architectures
Repeater, bridge/switch, router, and gateways
CANopen applications can make use of CAN repeaters (OSI layer 1). Repeaters enables more CAN nodes in one CANopen segment or longer network length due to the refreshing of the bus signals. CAN bridges or switches (OSI layer 2) can be used to separate CANopen network systems into different segments, in order to limit impacts or to reduce busloads. For that purpose the system variables as specified in CiA 302-7 are used. Routers (OSI layer 3) compliant to CiA 302-7 can be used to forward SDO messages and EMCY messages to other network segments. If connections to other network technologies are needed, gateways can be used. The CiA 309 series specifies the access from TCP/IP-based networks to CANopen networks. This includes Profinet (CiA 309-4) and ModbusTCP (CiA 309-2). CANopen also provides gateway specifications for AS-i (CiA 446) and IO-Link (CiA 463 series, under development).
This means, homogeneous CANopen network systems as well as heterogeneous network systems are supported by CANopen specifications. Of course, the CANopen router function requires the assignment of a unique 8-bit network ID. Considering that 127 nodes can reside in one network segment, this allows addressing thousands of CANopen devices in network system.
Learn more about repeaters and bridges for CAN and CAN FD...