
6 Operation | IL•1F CANopen DS301 |
6.2.2Reading a parameter
Task The parameter Status.n_act, 31:9 (actual speed) is to be read.
Index and subindex must be converted to hexadecimal notation and the constant 3000h added to the index for the SDO access:
•Index:31 = 1Fh + 3000h = 301Fh
•Subindex 9 = 09h
The value "40h" must be entered as the CCD. This value identifies a "Read Request".
Transmit data
Object | COB ID | CCD | Idx | Sdx | Data | Description |
Tx 301Fh:09h Sta- | 600h+ID | 40h | 1Fh 30h | 09h | XX XX XX XX Reads the actual speed. The data | |
tus.n_actT |
|
|
|
|
| has no significance. |
|
|
|
|
|
|
|
The 4 data bytes have no significance for a read request.
Receive data
Object | COB ID | CCD | Idx | Sdx | Data | Description |
Rx 301Dh:09h Status.n_act | 580h+ID | 43h | 1Fh 30h | 09h | E8 03 00 00 | The data 000003E8 corresponds |
|
|
|
|
|
| to 1000 |
The product transmits the data as 32 bit values back to the master (CCD is "43h"). It also sends back data as a 32 bit value which are described as INT16 or UINT16 data types in the product manual. When an INT16 or a UINT16 value is read, it is therefore possible to evaluate all 4 data bytes. However, for 16 bit data it is also correct to evaluate only the first two data bytes and to ignore the last two data bytes.
6.2.3Synchronous errors
Receive data with error frame "Error If an SDO write or read command fails, the product responds with an er- Response" ror frame "Error Response". This may happen if, for example, you try to
read or write a
Object | COB ID | CCD | Index | Sub | Data | Description |
Rx 3028h:20h | 580h+ID | 80h | 28h 30h | 20h | 00 00 02 06 | Error value 06020000h means |
|
|
|
|
|
| "object does not exist in object dic- |
|
|
|
|
|
| tionary" |
|
|
|
|
|
|
|
The example shows the response to a write or read request for a non- existent object 40:32.
The error number of a synchronous error message is stored as a UINT16 value and the corresponding CCD (Error Response) is as- signed the value 80h. Refer to 7.3.2 "Error code table" for a table with the error numbers.
0198441113586, V2.01, 11.2008
62 | Fieldbus interface |