Hi Kyle,
It is interesting to note the differences between the Kepserver and libplctag handling of the CIP messages.
Using wireshark we can see that kepserver uses <Multiple Service Packet> requests with up to 120 services (tags) requested per packet. The packet size is 1598 bytes. The tag names do not appear in the request but rather it deals with offsets.
An excerpt from the wireshark trace below shows the request sent from Kepserver and the reply from the PLC for one offset or tag.
Part of request message from Kepserver
Service Packet #1: Class (0xac) - Get Attribute List
Offset: 242
Common Industrial Protocol
Service: Get Attribute List (Request)
0... .... = Request/Response: Request (0x0)
.000 0011 = Service: Get Attribute List (0x03)
Request Path Size: 2 words
Request Path: Class: 0xAC, Instance: 0x01
Path Segment: 0x20 (8-Bit Class Segment)
001. .... = Path Segment Type: Logical Segment (1)
...0 00.. = Logical Segment Type: Class ID (0)
.... ..00 = Logical Segment Format: 8-bit Logical Segment (0)
Class: Unknown (0xac)
Path Segment: 0x24 (8-Bit Instance Segment)
001. .... = Path Segment Type: Logical Segment (1)
...0 01.. = Logical Segment Type: Instance ID (1)
.... ..00 = Logical Segment Format: 8-bit Logical Segment (0)
Instance: 0x01
Get Attribute List (Request)
Attribute Count: 2
Attribute List
Attribute: 1
Attribute: 3
Part of reply message sent from PLC
Service Packet #1: Success: Class (0xac) - Get Attribute List
Offset: 242
Common Industrial Protocol
Service: Get Attribute List (Response)
1... .... = Request/Response: Response (0x1)
.000 0011 = Service: Get Attribute List (0x03)
Status: Success:
General Status: Success (0x00)
Additional Status Size: 0 words
[Request Path Size: 2 words]
[Request Path: Class: 0xAC, Instance: 0x01]
[Path Segment: 0x20 (8-Bit Class Segment)]
[001. .... = Path Segment Type: Logical Segment (1)]
[...0 00.. = Logical Segment Type: Class ID (0)]
[.... ..00 = Logical Segment Format: 8-bit Logical Segment (0)]
[Class: Unknown (0xac)]
[Path Segment: 0x24 (8-Bit Instance Segment)]
[001. .... = Path Segment Type: Logical Segment (1)]
[...0 01.. = Logical Segment Type: Instance ID (1)]
[.... ..00 = Logical Segment Format: 8-bit Logical Segment (0)]
[Instance: 0x01]
Get Attribute List (Response)
Attribute Count: 2
Attribute List
Attribute: 1
Attribute Status: Success (0x00)
Data: aa0003000000604d15bc
======================================
Do you think this approach, using tag offsets instead of tag names, allows for more data to be requested per packet? If so what other benefits could there be? For example does the offset point directly to the PLC memory address whereas supplying a tag name would force the PLC to look up the memory address first?
If this is a more performant approach do you think this is why kepserver would be using it? Could it be added to the library and what benefits are returned for the efforts?
I would be happy to supply more details from my installation if you're interested.
Thanks, Owen