目录
- Segment
- PATH
- 举例
最近在学习EtherNET/IP,PATH不太明白,翻了翻规范,在这里记个笔记。下面的叙述可能是中英混合,有一些是规范中的原文我直接搬过来的。我翻译的不准确。
Segment
PATH是CIP Segment中的一个分类。要了解PATH先要了解Segment
参考规范卷1,附录C-1
A CIP segment is a stream of encoded items used to reference, describe, and/or configure a specific CIP entity。
CIP Segment 分类如下
• Port segment – used for routing from one subnet to another
• Logical segment - logical reference information (such as class/instance/attribute IDs)
• Network segment - specifies network parameters needed to transmit on some networks
• Symbolic segment - symbolic name
• Data segment - embedded data (such as configuration data)
Segment使用一个字节编码,包含Segment类型和格式。格式根据Segment类型不同而不同
PATH
PATH属于其中的Logical segment.
一个PATH包含多个Logical segment,在一个object中引用其他object的类,实例,属性。
PATH用途如下
• In Connection and Connection Manager Objects, paths indicate the object(s) to/from which
I/O data is moved.
• In Assembly Objects, paths indicate the attributes in other objects which are used to form
the assembled I/O data.
• In Parameter Objects, paths indicate the actual attribute in another object which is being
described by the Parameter Object.
PATH结构如下,需要注意的是,这里的PATH只有一个段属性,PATH可以包含多个段属性,访问到更深入的数据。后面会给例子。
logical segment 编码如下
举例
举三个例子
- 8-Bit Service ID Segment (0x38)
- Electronic Key Segment (0x34)(The Electronic Key segment shall be used to verify/identify a device)