![NANOTEC ELECTRONIC N5 Скачать руководство пользователя страница 107](http://html.mh-extra.com/html/nanotec-electronic/n5/n5_technical-manual_705153107.webp)
Technical Manual N5 (CANopen)
8 CANopen
•
If no further errors are pending, the following message is sent:
80 + Node-ID | 00 00 00 00 00 00 00 00
8.2.4 Service Data Object (SDO)
A "Service Data Object" permits read or write access of the object dictionary.
In the following, the owner of the object dictionary is referred to as the "server"; the CAN node – which
wants to request or write the data – is referred to as the "client". An "upload" refers to the reading of a
value of an object from the object dictionary; a "download" refers to the writing of a value in the object
dictionary. In addition, the following abbreviations are used in the diagrams:
•
<IDX>
: Index of the object that is to be read or written in the object dictionary; the LSB of the index
is in byte 1 here. Example: The statusword of the controller has index
6041
h
; byte 1 is then written
with
41
h
and byte 2 with
60
h
. With Expedited Transfer, the SDO answer contains the same index
as that of the request.
•
<SUBIDX>
: Subindex of the object in the object dictionary from
00
h
to
FF
h
Transfer, the answer of the SDO message of the controller also contains the subindex of the
request.
Because CAN messages of type SDO contain a large amount of metadata, SDO messages should
only be used to configure the controller. Should it be necessary to exchange data cyclically during
running operation, it makes more sense to make use of CANopen messages of type PDO (see
subsection Process Data Object).
The SDO transfers are divided into three types of access:
•
"expedited transfer" for transferring objects with up to four bytes.
•
"normal transfer" for transferring any number of bytes, whereby each CAN message is confirmed
individually.
•
"block transfer" is also for any number of bytes; here, a given block of CAN tickets is confirmed at
once.
An SDO message is sent to CAN-ID 600
h
+ node-ID, the answer comes from CAN-ID 580
h
+ node-ID.
Expedited Transfer
This method is used to write (download) or read (upload) values in objects of type (UN)SIGNED8,
INTEGER16 oder INTEGER32 in the object dictionary. This service is confirmed, i.e., each access is
answered with data, with a confirmation or with an error message.
SDO Download
An expedited SDO message for writing data in the object dictionary of the server is structured as
follows:
CAN ID
Data
Byte 1
Byte 2
600+NodeID
<CMD>
<IDX>
Byte 3
Byte 4
<SUBIDX>
Byte 5
Byte 6
Byte 7
Byte 0
<Data>
Init SDO Download request
Client
Server
Here, the
<CMD>
byte is dependent on the length of the data that are to be written.
<CMD>
can be one
of the following values:
•
1 byte data length:
2F
h
•
2 byte data length:
2B
h
Version: 2.0.1 / FIR-v1650
107