Fieldbus is the last communication bridge in the industrial automation system. More and more sensors and actuators integrate communication interfaces such as can bus. However, in the face of many complex large systems, several solidified communication data formats often bring the trouble of underlying data conflict to designers. How to solve this problem perfectly is very important.

1、 Problem description

As we all know, the message IDS sent by different nodes in a can network should also be different, otherwise an error will occur when two nodes with conflicting IDS upload data at the same time. However, we often find that the message ID of some can interface sensors or controllers is fixed and does not have hardware address discrimination. As an example, a motor controller has three standard frame function messages with IDs of 0x0001, 0x0002 and 0x0003. So how to use multiple same motor controllers in the same can network to prevent ID conflict and identify hardware address?

2、 Solution

To solve this problem, the can bridge Canbridge + of Zhiyuan electronics can be installed between each device and the bus, and the function ID of each device can be mapped into a new ID with address field by using its ID mapping function. This can not only prevent ID conflict errors in messages uploaded by the device, but also distinguish different devices through the added address field. As shown in the figure below, the upper 8 bits of the standard frame ID are defined as the address field, so that the uplink and downlink messages of different devices can be distinguished by the ID.

Teach you how to solve the problem of Fieldbus data conflict

Figure 1 networking of the same canid equipment

Teach you how to solve the problem of Fieldbus data conflict

Figure 2 networking of the same canid equipment using can bridge

3、 Setup process

1. Baud rate setting

Use the communication line to connect Canbridge + and PC, open cancfg software, click the drop-down menu of Can1 and can2 baud rate in the basic information tab, and select the corresponding baud rate of the connected can device.

Teach you how to solve the problem of Fieldbus data conflict

Figure 3 baud rate setting of Canbridge +

2. Frame mapping settings

Click enable frame mapping in the frame mapping tab. It is assumed that the Can1 port of the bridge is connected to the can device and the can2 port of the bridge is connected to the can network. Add the mapping relationship shown in the figure below to associate all function IDs of device 1 with the hardware address. Similarly, the networking of the same canid equipment can be realized by making similar settings for the can bridge connected to other equipment.

Teach you how to solve the problem of Fieldbus data conflict

Figure 4 frame mapping setting of Canbridge +

Leave a Reply

Your email address will not be published. Required fields are marked *