I. Overview
Our company has a complete Modbus and CAN series of equipment systems, but for users who are selecting, how to determine whether to choose the communication protocol equipment that suits them in the industrial field or other situations is a difficult problem. This article, based on the selection of our series of equipment, distinguishes between the two communication protocols of CAN and Modbus, aiming to further allow customers to choose products that suit their desired application scenarios. First, let's take a brief look at the two communication protocols of CAN and Modbus.
1.1 CAN bus is a bus-type communication protocol proposed by Bosch in the 1980s. Its core is based on the design of the physical layer and data link layer. CAN itself does not contain application layer definitions, but can be expanded through upper-layer protocols such as CANopen, DeviceNet, and J1939. Its original design was for embedded systems with high real-time requirements, such as automotive electronics.
1.2 Modbus protocol is an application layer communication protocol proposed by Modicon. It can run on different physical layers, including serial communication (Modbus RTU/ASCII) and Ethernet (Modbus TCP). The Modbus protocol is widely used in communication between PLCs, inverters, instruments and SCADA systems due to its simplicity, openness and versatility.
1.3 Summary: CAN is a low-level communication protocol, and Modbus is a high-level application protocol.
2.Physical layer and topology
2.1 Transmission media and wiring
CAN: Use differential twisted pair (CAN_H/CAN_L), and 120Ω terminal resistors are required at both ends of the bus.
Modbus RTU: Usually also differential twisted pair (RS485), which can cover about 1200m at a lower rate and also requires terminal resistors.
Modbus TCP: Use standard Ethernet (Cat5/Cat6), and can reuse existing network infrastructure.
2.2 Number of nodes and network topology
CAN: Can support about 110 nodes (depending on the transceiver load), and all nodes are connected at the same level "peer".
Modbus RTU: RS 485 has a maximum of 32 devices per bus (depending on the load), using a master-slave architecture.
Modbus TCP: The number of nodes is only limited by the number of Ethernet switch ports and the size of the network.
3.Data link layer and access mechanism
3.1 Bus access control
CAN: Implement CSMA/CR (Carrier Sense Multiple Access with Collision Resolution) at the bit layer, and achieve deterministic access through identifier ID arbitration. The lower the ID value, the higher the priority.
Modbus: All communications are initiated by the master station, which polls each slave station and sends and receives in turn. The communication delay is affected by the polling interval and the number of devices.
3.2 Error detection and processing
CAN: Hardware-level CRC check, bit stuffing check, response slot and automatic retransmission to ensure frame integrity and reliability.
Modbus: RTU mode uses CRC 16, ASCII mode uses LRC, and error timeout and retry logic must be implemented by the application software/firmware.
4. Frame structure and payload
4.1 CAN frame
Identifier and priority: Standard frame 11 bits or extended frame 29 bits ID, used for ascending arbitration.
Payload: Classical CAN up to 8 bytes; CANFD up to 64 bytes.
4.2 Modbus frame
Address and function code: 1-byte device address + 1-byte function code + data + 2-byte CRC (RTU).
Payload length: up to 252 bytes in RTU mode; in TCP mode, it is limited by the Ethernet packet length and can be regarded as "unlimited".
5.Rate and distance trade-off
CAN: up to 1Mbps (≤40m); the longer the distance, the lower the speed (e.g. 125kbps at 500m).
Modbus RTU: common 9600–115200bps; up to about 1200m at ≤100kbps.
Modbus TCP: can support 100Mbps or 1Gbps, subject to Ethernet hardware limitations.
6.Typical applications
CAN: automotive internal networks, multi-axis robots, medical equipment and other scenarios requiring deterministic control.
Modbus: PLC and I/O communication, SCADA telemetry, energy management and building automation and other scenarios.
Our company has a complete Modbus and CAN series equipment system:
CAN series equipment can refer to: ECAN series equipment products, such as ECAN-E01, ECAN-W01, ECAN-S01, etc.
Modbus series devices can refer to: remote IO series devices, such as distributed IO module series products, MA01 serial port IO module series products, temperature acquisition module ME31 series products.