Rockwell Automation 20-COMM-K CANopen Adapter User Manual
Page 56
6-4
Using Service Data Objects
20-COMM-K CANopen Adapter User Manual
Publication 20COMM-UM012B-EN-P
CANopen DPI Full Access Communication Example
This example describes how to read adapter Parameter 1 - [DPI Port]:
1. Fill out the data structure for CANopen object 0x2226 (DPI Object
Send) as follows, filling in sub index 1 last.
2. Send the message by writing to sub index 1.
3. Wait for the acknowledgement.
4. Read the response in CANopen object 0x2227 (DPI Object Receive).
Sub Index
Value
1
0x00 (Service Get Attribute)
2
0x05 (DPI Port 5)
3
0x03 (Parameter Class)
4
0x0001 (Instance, Parameter 01)
5
0x09 (Attribute - Parameter value)
6
0x00 (Number of bytes that follows)
Sub Index
Value
1
0x00 (Service OK)
2
0x01 (Length of response data in bytes;
count starts at sub index 3)
3
0x05 (Attribute value)