1291 views|13 replies

2865

Posts

4

Resources
The OP
 

Relationship between CAN bus packet ID and device [Copy link]

 

When I talked about CAN bus with my friends, I always thought that the device and the package ID were bound, that is, the function of a device and the package ID were fixed. A device can have multiple functions, and each function is bound to an ID. For example, a thermometer and hygrometer has two parameters, temperature, humidity, and dew point. Then the parameters can be assigned three IDs.

But my friend said: CAN's total ID is a feature of the package, so there is no restriction that the ID and device must be bound, so any device can send the ID of other devices.

I don't know how you understand it, please give me some scientific knowledge.

This post is from Automotive Electronics

Latest reply

It is better than 485. 485 is a question-and-answer mode, and users can talk freely when the bus is idle.   Details Published on 2024-3-19 21:40

108

Posts

0

Resources
2
 

Simply understand, two points:

(1) CAN ID is part of the protocol. - means you can define it at will.

(2) CAN filters data frames by ID. - This allows you to customize and filter different devices/protocols.

This post is from Automotive Electronics
 
 

2549

Posts

0

Resources
3
 

Regardless of the usage scenario, any device can send a CAN signal with any ID. But in reality, this is not the case. For example, in a car, there are strict regulations on what each device can send, especially gateway frames and diagnostic frames. The original poster did not understand the difference between a CAN ID and a CAN message. Temperature and humidity can be under the same CAN ID. If you look at the CANFD protocol, you can also see who sent it and to whom from the CAN ID It's a bit complicated


This post is from Automotive Electronics

Comments

I'm talking about the protocol layer, not management and application. CAN packets only have one ID, unlike TCP/IP packets which have two address fields.  Details Published on 2024-3-18 16:04
 
 
 

2865

Posts

4

Resources
4
 

My understanding is that every CAN MESSAGE packet must have an ID. This ID is used to identify who the message is sent to, regardless of who sends it. That is why the above question arises. As long as my understanding is correct, it doesn't matter whether the correspondence between devices and messages should be managed.

This post is from Automotive Electronics
 
 
 

2865

Posts

4

Resources
5
 
Digital Leaf published on 2024-3-18 15:46 Regardless of the usage scenario, any device can send a CAN signal of any ID. But in reality, for example, in a car, what each device can send is strictly...

I'm talking about the protocol layer, not management and application. CAN packets only have one ID, unlike TCP/IP packets which have two address fields.

This post is from Automotive Electronics

Comments

The standard CAN does not have it, but it does have it after the protocol is added. The source address and the destination address are an ordinary ID, which contains a lot of information.  Details Published on 2024-3-18 22:12
 
 
 

7422

Posts

2

Resources
6
 

can id or package id?

This post is from Automotive Electronics
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

2549

Posts

0

Resources
7
 
bigbat posted on 2024-3-18 16:04 I am talking about the protocol layer, not management and application. The CAN packet has only one ID, unlike the TCP/IP packet which has two address fields.

The standard CAN does not have it, but it does have it after the protocol is added. The source address and the destination address are an ordinary ID, which contains a lot of information.

This post is from Automotive Electronics
 
 
 

2

Posts

0

Resources
8
 
When receiving this ID, the data it carries can be used as temperature data; CAN ID is designed at the software level, so different devices can send the same ID, which is what your friend said, there is no restriction that the ID and the device must be bound.
This post is from Automotive Electronics
 
 
 

364

Posts

0

Resources
9
 

The relationship between can id and device is name. You can call the other party any name, and the other party will know it. If no filter is set, all devices can receive all the data on the bus. They just use the name they know, or the data they want, and ignore the ones they don't care about.

This post is from Automotive Electronics

Comments

You can take a look at Zhou Ligong's can easy begin  Details Published on 2024-3-19 09:43
 
 
 

364

Posts

0

Resources
10
 
LitchiCheng posted on 2024-3-19 09:42 The relationship between can id and device is the name. You can call the other party any name, and the other party will know it. If you don't set a filter, all devices can receive the total...

You can take a look at Zhou Ligong's can easy begin

This post is from Automotive Electronics
 
 
 

6818

Posts

11

Resources
11
 
This post was last edited by lugl4313820 on 2024-3-19 16:32

You may think that the ID you understand is the address of the hardware firmware. In fact, the CAN ID is also used to identify the communication method in order to achieve efficient communication and filter out some information that he does not care about. However, it is not fixed and is specified in the configuration. A device can be bound to several IDs.

This post is from Automotive Electronics

Comments

The CAN protocol only defines the physical layer and data link layer of ISO 7. The message ID function is used to manage the destination of the message and the priority of the message. When applied, it is the setting of the filter, just like the address of RS485.  Details Published on 2024-3-19 18:40
 
 
 

2865

Posts

4

Resources
12
 
lugl4313820 posted on 2024-3-19 16:30 You may think that the ID you understand is the address of the hardware firmware. In fact, the CAN ID is also used to identify the communication method in order to achieve efficient communication and filter out some...

The CAN protocol only defines the physical layer and data link layer of ISO 7. The function of message ID is used to manage the destination of the message and also to manage the priority of the message.

When applied, it is the filter setting, just like the RS485 address

This post is from Automotive Electronics

Comments

It is better than 485. 485 is a question-and-answer mode, and users can talk freely when the bus is idle.  Details Published on 2024-3-19 21:40
 
 
 

6818

Posts

11

Resources
13
 
bigbat posted on 2024-3-19 18:40 The CAN protocol only defines the physical layer and data link layer of ISO 7. The function of the message ID is used to manage the destination of the message and also to manage the priority of the message...

It is better than 485. 485 is a question-and-answer mode, and users can talk freely when the bus is idle.

This post is from Automotive Electronics

Comments

RS485 has no priority management, but CAN has priority management. Therefore, CAN can achieve better real-time performance when communicating with multiple machines. In addition, the physical characteristics of CAN are that the electrical design of each device occupying the bus can be "wired and", while 485 has no requirements, only differential signals. The address of RS485 is  Details Published on 2024-3-20 09:50
 
 
 

2865

Posts

4

Resources
14
 
lugl4313820 posted on 2024-3-19 21:40 It is better than 485. 485 is a question-and-answer system, but here you can talk freely when the bus is idle.

RS485 has no priority management, but CAN does. Therefore, CAN can achieve better real-time performance when communicating with multiple machines. Moreover, the physical characteristic of CAN is that the electrical design of each device occupying the bus can be "wired and connected". 485 has no such requirement, but only requires differential signals. The address signal of RS485 is realized by increasing the signal length, while CAN is realized by wired and connected. Therefore, I only said that the address is similar to that of RS485.

This post is from Automotive Electronics
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list