Acyclical communication
75/98
SmartWire-DT Gateway | EU5C-SWD-ETHERCAT
DOC140901UM01EN | Revision 1 | English | 2015-03 | Released | Public
© Hilscher 2015
10.2 Read request: reading data of an SWD Slave
10.2.1
Activating read request
A reading task (
Read Request
) for a SmartWire-DT slave is conveyed in
an
SDO Download Request
from the EtherCAT
®
master to the
index
0x2200
,
sub index 1
object in the gateway.
The
SDO Download Request
contains the following elements:
Element
Description
Data type
Value / value
range
Header
Address
Node ID of the gateway (according to project configuration)
uint16
0…65535
Index
Object index for acyclical communication
uint16
0x2200
Sub index
Index for SDO Download
uint8
0x01
Size
Amount of data of the SDO Download
-
10 Bytes
Data for SWD slave
Slave Address
Address of the SWD slave that you want to read (according
to project configuration)
uint8
1…99
SWD Index
SWD-specific index of the SWD slave. Determines which
kind of data you want to read, e. g. error counter or
firmware version.
uint8
0…255
Request Type
Type of request. A read request must have the value
1
uint8
1
Length
Maximum length of the expected response in bytes. Must
be at least as long as the SWD object (in bytes).
uint8
1…120
Job ID
Freely selectable value, serves as job identification
uint8
0…255
Reserved Bytes
Five reserved bytes
uint8[5]
0x00
,
0x00
,
0x00
,
0x00
,
0x00
Table 19: Elements SDO Download of a read request
The gateway acknowledges the reception of the task by sending back an
SDO Download Confirmation
to the EtherCAT
®
master. The gateway also
forwards the task to the SWD slave, where the reading task is performed in
the specified SWD Index. The SWD slave then sends back the answer to
the gateway, where it is stored in the
index 0x2200
,
sub index 2
object.
The EtherCAT
®
master can then fetch the answer by sending an
SDO
Upload Request
.