CIP Services and User-created Tags
Rockwell Automation Publication 1756-PM020F-EN-P - January 2019 55
The offset given in the Member n offset value in the Example of retrieving
member information topic is where the member is located in the stream of
bytes returned from reading a tag of this type in the controller.
See also
Analysis on page 16
Example of retrieving member information on page 55
This example uses the Template Read service to retrieve the member
information for an instance of the Template object. This examples explains
how to interpret the member information stored in the template instance.
The structure that is accessed in this example is a user defined structure
named STRUCT_B that was defined with the following members:
• BOOL named pilot_on
• INT array of 12 elements named hourlyCount
• REAL named rate
A tag of the type STRUCT_B was created and given the name
MachineSummary. This tag name is used in the following example. The
instance ID used in this example was determined by examining the Symbol
Type attribute of the tag MachineSummary, as described in Step 2: Isolating
user-created tags from system tags/identifying structured tags. The Template
Read service request and response to that instance is shown in the following
examples.
See also
Step 2: Isolating user-created tags from system tags/identifying
structured tags on page 49
Read the structure information for the MachineSummary tag, which is the
STRUCT_B user-defined type
Message Request Field Bytes Description
Request Service 4C Read Template Service (Request)
Request Path Size 03 Request Path is 3 words (6 bytes) long
Request Path 20 6C 25 00 E9 02 Logical Segment: Class 0x6C, Instance 0x02E9
Request Data 00 00 00 00
61 00
Offset to start reading from (should be zero, initially)
The number of bytes to be read.
Message Reply Field Bytes Description
Reply Service CC Read Template Service (Reply)
Example of retrieving member
information