Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
35
Добавлен:
11.10.2020
Размер:
2.21 Mб
Скачать

CANopen • 127

Network Communication

5.3.1.2 Service Data Object - SDO

The SDOs can be used to read and/or write entries in the object directory. In this manner, a CANopen subscriber can be fully configured. The default SDO is pre-assigned with a low priority identifier. The transmitted data has to be distributed to several messages if it exceeds 4 bytes.

5.3.1.2.1 SDO Protocol

A specific protocol overhead that is indispensable for transmission and contains the command specifier, the index and the sub-index of the entry to be read/written.

5.3.1.2.1.1General Design

Receive Service Data Object (RxSDO)

Client

 

 

 

 

 

Server

 

 

 

 

COB-ID = 1536 + Module ID

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

2

3

4

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

Index

Index

Sub

 

Data

 

 

 

 

 

 

specifier

Low Byte

High Byte

Index

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Transmit Service Data Object (TxSDO)

Client

 

 

 

 

 

Server

 

 

 

 

COB-ID = 1408 + Module ID

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

2

3

4

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

Index

Index

Sub

 

Data

 

 

 

 

 

 

specifier

Low Byte

High Byte

Index

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 5-7: SDO Protocol

 

 

 

 

 

 

 

g012405x

5.3.1.2.1.2Download SDO Protocol

This protocol is used to write data from the master into the bus coupler.

5.3.1.2.1.2.1Initiate SDO Download

This protocol is used to initiate the data transmission from the master to the bus coupler. When transmitting data of max. 4 bytes, these are also transmitted within the protocol.

WAGO-I/O-SYSTEM 750

CANopen

128 • CANopen

Network Communication

 

Initiate SDO Download

Client

Server

 

 

0

 

 

 

1

4

8

 

 

 

 

 

 

 

 

 

 

 

request

 

 

 

 

 

 

 

 

 

 

 

 

 

indication

 

 

.7 .6 .5

.4

.3 .2

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ccs = 1

x

n

e

s

 

m

 

Data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initiate SDO Download

Client

Server

 

 

0

 

 

 

 

1

4

8

 

 

 

 

 

 

 

 

 

 

 

 

confirm

 

 

 

 

 

 

 

 

 

 

 

 

 

response

 

.7 .6 .5

.4

.3

.2

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

scs = 3

x

x

x

e

s

 

m

 

Data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 5-8:

Initiate SDO

g012406x

ccs:

client command specifier

1: initiate download request

scs:

server command specifier

3: initiate download response

n:

only valid if e = 1

If n is valid, it displays the number of bytes which

 

and s = 1, otherwise 0.

do not contain any data. Example:

 

 

3 data bytes, e = 1 and s = 1, n = 4 - 3 = 1

e:

transfer type

0: normal transfer, number of the bytes to be writ-

 

 

ten >= 5 byte

 

 

1: expedited transfer, number of the bytes to be

 

 

written < 5 byte

s:

size indicator

0: data set size is not displayed

 

 

1: data set size is displayed

 

 

s is always 1

m:

multiplexor

Index and Sub-Index of object directory

 

 

Index, Low Byte : Byte #1

 

 

Index, High Byte: Byte #2

 

 

Sub-Index: Byte #3

d:

data

e = 0, s = 0: d is reserved for further use of CiA

 

 

e = 0, s = 1: d contains the number of bytes for

 

 

download

 

 

Byte 4 contains the LSB and Byte 7 contains the

 

 

MSB.

 

 

e = 1: d contains the data

X:

 

Not used, always 0

reserved:

 

Reserved for further use of CiA

 

 

 

 

 

WAGO-I/O-SYSTEM 750

 

 

CANopen

CANopen • 129

Network Communication

5.3.1.2.1.2.2Download SDO Segment

This protocol is used to transmit more than 4 data, i. e. this follows after fully processing the „Initiate SDO Download Protocol" which initiates the data transmissions.

 

Download SDO Segment

Client

Server

 

0

 

 

 

1

8

 

 

 

request

 

 

 

 

 

 

 

 

 

 

 

indication

 

.7 .6 .5

.4

.3

.2

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

ccs = 0

t

 

n

 

c

 

Segment data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Download SDO Segment

Client

Server

 

 

0

 

 

1

8

 

 

 

confirm

 

 

 

 

 

 

 

 

 

response

 

.7 .6 .5

.4

.3

.2 .1 .0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

scs = 1

t

 

x

 

reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 5-9: Download SDO Segment

g012409x

ccs:

client command specifier

0: download segment request

scs:

server command specifier

1: download segment response

seg-data

Contains the data to be

The meaning of the data is determined by the

 

transmitted.

application.

n:

 

Displays the number of bytes not containing any

 

 

data. n is 0 if no segment size is displayed.

c:Indicates whether or not a download is necessary for further data.

0:There is more data to be downloaded.

1:There is no more data to be downloaded.

t:

Toggle Bit

This bit must be able to toggle for each segment

 

 

for which a download is made. The first segment

 

 

zeroes the toggle bit. The toggle bit is identical

 

 

both for the enquiry and the reply message.

X:

 

Not used, always 0

reserved:

 

Reserved for further use of CiA

WAGO-I/O-SYSTEM 750

CANopen

130 • CANopen

Network Communication

5.3.1.2.1.3Upload SDO Protocol

This protocol is used to read data out of the bus coupler.

5.3.1.2.1.3.1Initiate SDO Upload

The data transmission from the bus coupler to the master is initiated with this protocol. When transmitting data of max. 4 bytes, these are also transmitted within the protocol.

 

Initiate SDO Upload

Client

Server

 

 

0

 

1

4

8

 

 

 

 

 

 

 

 

 

request

 

 

 

 

 

 

 

 

 

 

 

indication

 

 

.7 .6 .5

.4 .3 .2

.1 .0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ccs = 2

x

 

 

m

 

reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initiate SDO Upload

Client

Server

 

 

0

 

 

 

1

4

8

 

 

 

 

 

 

 

 

 

 

 

confirm

 

 

 

 

 

 

 

 

 

 

 

 

 

response

 

 

.7 .6 .5

.4

.3 .2

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

scs = 2

x

n

e

s

 

m

 

Data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 5-10: Initiate SDO Upload

g012410x

ccs:

Client command specifier

2: initiate upload request

scs:

Server command specifier

2: initiate upload response

n:is only valid if e = 1 and s = If n is valid, it displays the number of bytes in d 1, otherwise 0. which do not contain any data. The bytes [8-n, 7]

 

 

do not contain segment data.

e:

transfer type

0: normal transfer, number of bytes to be written

 

 

>= 5 bytes

 

 

1: expedited transfer, number of bytes to be

 

 

written < 5 bytes

s:

size indicator

0: the number of bytes to be transmitted is not

 

 

displayed

 

 

1: the number of bytes to be transmitted is dis-

 

 

played (depending on the number of bytes)

m:

multiplexor

Index and sub-index of the object directory:

 

 

Index, Low Byte : Byte #1

 

 

Index, High Byte: Byte #2

 

 

Sub-Index: Byte #3

 

 

 

 

 

WAGO-I/O-SYSTEM 750

 

 

CANopen

Соседние файлы в папке 750-837