Canopen dpi full parameter access, Canopen dpi full parameter access -3 – Rockwell Automation 20-COMM-K CANopen Adapter User Manual

Page 55

Advertising
background image

Using Service Data Objects

6-3

20-COMM-K CANopen Adapter User Manual

Publication 20COMM-UM012B-EN-P

CANopen DPI Parameter Access Communication Example

This example describes how to read adapter Parameter 1 - [DPI Port]:

1. Fill out the data structure for CANopen object 0x2228 (DPI Parameter

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 object 0x2229 (DPI Parameter Receive).

CANopen DPI Full
Parameter Access

With the CANopen objects 0x2226 and 0x2227, all DPI objects can be
accessed. The request is written to object 0x2226. When the
acknowledgment is received, the response to the message is placed in object
0x2227 and the response can be read.

The DPI full object access supports messages up to 96 data bytes. That is,
all explicit DPI messages (except flash download) are able to be
transmitted/received.

Table 6.C Data Description for Object 0x2226 DPI Object Send

Table 6.D Data Description for Object 0x2227 DPI Object Receive

Sub Index

Value

1

0x00 (Read)

2

0x05 (DPI Port 5)

3

0x01 (Parameter)

Sub Index

Value

1

0x00 (Service OK)

2

0x00000005 (Parameter value)

Sub Index

Meaning

Type

1

Service (0x00 = Get Attribute, 0x04 = Set Attribute)

Byte

2

DPI Port (0…6)

Byte

3

Class

Byte

4

Instance

16-bit Word

5

Attribute

Byte

6

Length of request data in bytes (Count starts at sub index 7)

Byte

7

Data (First byte)

Byte

102

Data (Last byte)

Byte

Sub Index

Meaning

Type

1

Service (0x00 = OK, 0xFF = Error)

Byte

2

Length of response data in bytes (Count starts at sub index 3)

Byte

3

Data (First byte) / Error Status Value

Byte

98

Data (Last byte)

Byte

Advertising