85BExplicit Messaging
12BAppendix D: Example Messages
112
Example 1: Sending an Explicit Request Message
To query the Vendor ID for your transducer, enter the command:
42C 01 0E 01 01 01
where:
CAN Identifier Field
CAN Data Field
42C
01
0E
01
01
01
MESSAGE HEADER
(Frag Bit, XID Bit, &
Source MAC ID)
GROUP 2 MESSAGE ID
DESTINATION MAC ID
MESSAGE TYPE ID
SERVICE CODE
(Request Bit &
Service ID)
CLASS
CODE
INSTANCE
ID
ATTRIBUTE
ID
Calculated
hex
value:
Calculated
hex value:
Calculated
hex
value:
Assigned
hex value:
Assigned
hex value:
Assigned
hex value:
Figure 10: Explicit Request Message
To calculate the request message components shown in Figure 10:
1. Calculate the hexadecimal value of the CAN Identifier Field.
Refer to Figure 11, step 1, page 113. This 11-bit field represents the fixed Group 2 Message
ID (bits 10 and 9), the
destination
node address (the MKS device) as a hexadecimal number
(bits 8 to 3), and the fixed Message Type ID for an explicit request (bits 2 to 0). The
hexadecimal value of the CAN Identifier Field components is 42C
hex
.
2. Calculate the hexadecimal value of the message header in the CAN Data Field.
Refer to Figure 11, step 2, page 113. This 8-bit field represents the fragment bit (bit 7, set to 0),
the XID bit (bit 6, set to 0), and the
source
node address (the Master device) as a hexadecimal
number (bits 5 to 0). The hexadecimal value of the Message Header is 01
hex
.
3. Calculate the hexadecimal value of the Service Code in the message body of the CAN Data
Field.
Refer to Figure 11, step 3, page 113. This 8-bit field represents the request bit (bit 7, set to 0)
and the assigned Service ID (bits 6 to 0) as a hexadecimal number. The assigned hex value
for the Get_Attribute_Single service is 0E
hex
. The hexadecimal value of the Service Code is
0E
hex
.
4. Confirm the assigned Class Code, Instance ID, and Attribute ID for the desired parameter.
Refer to Figure 11, step 4, page 113. The requested Vendor ID information is part of the
Identity Object (Class Code 01
hex
). Its Instance ID is 01
hex
and its Attribute ID is 01
hex
.
Tables listing the Class Codes, Instance IDs , and Attribute IDs for each parameter are
provided throughout this document. This information in summarized for easy reference in
Table 51, page 95.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com