CANopen PDO 和通信配置文件
如果数据包含多个值,我如何知道这些值代表什么? 如何将数据分解为单独的值? 我是否可以说 PDO 和数据之间的关系在通信配置文件中定义了要传输的内容?
(我感谢 Matli 解释了 CAN 接口 API 可能具有检索 ID 的功能,数据长度和 CANopen 消息的数据 根据解释,人们可以判断是否帧是一个 PDO,并从 COB-ID 中得出发送方节点的 ID。)
If the data contains more than one value, how do I know what these values represent? And how do I break up the data into individual values? Am I right to say that the relationship between the PDOs and data to be transmitted are defined in the communication profile?
(I thank Matli for having explained that the CAN interface API probably has functions to retrieve the ID, data length and the data of a CANopen message. Based on the explanation, one could tell if the frame is a PDO and derive the sender node's ID from the COB-ID.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PDO 和数据之间的关系在对象字典中的 PDO 映射条目中定义。 但这可能不是找出答案的最简单方法。
由于我不知道您正在尝试与什么设备进行通信,因此我无法向您提供有关其数据输出的任何信息。 您必须查阅设备的文档或询问制造商。 但是,例如,如果您有一个完全符合特定设备配置文件的通用 I/O 模块(例如通用 I/O 模块的 401),则它可能会根据该设备配置文件具有默认映射。
我建议您阅读 CiA DS 301 以及任何适用的设备配置文件。 这些文档可从 CiA 获取
The relationship between PDOs and data is defined in the PDO mapping entries in the Object Dictionary. But that is probably not the easiest way to find out.
Since I don't know what device you are trying to communicate with, I cannot give you any information about its data output. You will have to consult the documentation for the device or ask the manufacturer. However, if you for example have a generic I/O module fully compliant with a specific Device Profile (e.g. 401 for generic I/O modules), it will probably have default mappings according to that device profile.
I recommend that you read CiA DS 301 and also any applicable device profile. Those documents are available from CiA
OD 中有两个位置,您可以在其中获取有关巴士周围 PDO 所需的所有信息。 前提是您知道所有连接的节点:
如需了解更多信息:
与 PDO 进行数据交换(“过程数据对象”)
There are two places in the OD, where you can get all the information you need about PDOs that swirl around the bus. That is provided you know of all the connected nodes:
For further information:
Process data exchange with PDOs ("Process Data Objects")