11.01.2014 Views

PROFIBUS DP-Master

PROFIBUS DP-Master

PROFIBUS DP-Master

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Application Interface 239/315<br />

6.3.4 <strong>PROFIBUS</strong>_DL_CMD_DATA_ACK_REQ/CNF - Send SDA Service<br />

This packet provides the SDA (Send Data with Acknowledge) service for acknowledged<br />

connectionless data transfer with immediate response. It allows transparently sending an SDA frame<br />

with variable data length to the <strong>PROFIBUS</strong> network. At the remote station, the user data (which is<br />

contained in the Service Data Unit represented by the variable abSDU[]) is delivered to the user.<br />

The length of the Service Data Unit is limited to at most 246 bytes<br />

The local confirmation message of this command informs about the receipt or non-receipt of the user<br />

data in the remote station. Within the confirmation packet, a value of ulSta equal to the following<br />

indicates successful receipt of the SDA message:<br />

• TLR_S_OK (0x00000000)<br />

• TLR_E_<strong>PROFIBUS</strong>_DL_ACK_NR (0xC0060083L)<br />

• TLR_E_<strong>PROFIBUS</strong>_DL_ACK_DH (0xC0060086L)<br />

• TLR_E_<strong>PROFIBUS</strong>_DL_ACK_DL (0xC0060087L)<br />

All other values indicate the failure of the SDA service.<br />

Packet Structure Reference<br />

typedef struct <strong>PROFIBUS</strong>_DL_DATA_ACK_REQ_Ttag {<br />

TLR_UINT8 bSrvCls; /* Service Class */<br />

TLR_UINT8 bDstAddr; /* Destination address */<br />

TLR_UINT8 bDstSAPIdx; /* Destination Service Access Point */<br />

TLR_UINT8 bSrcSAPIdx; /* Source Service Access Point */<br />

TLR_UINT8 abPad[4]; /* Padding needed to bring SDU to a DWORD boundary and to<br />

right position */<br />

TLR_UINT8 abSDU[<strong>PROFIBUS</strong>_DL_MAX_DLPDU_SIZE]; /* Service Data Unit */<br />

} <strong>PROFIBUS</strong>_DL_DATA_ACK_REQ_T;<br />

#define <strong>PROFIBUS</strong>_DL_DATA_ACK_REQ_SIZE (sizeof(<strong>PROFIBUS</strong>_DL_DATA_ACK_REQ_T)-<br />

<strong>PROFIBUS</strong>_DL_MAX_DLPDU_SIZE)<br />

/* Request-Packet for acknowledged connectionless data transfer */<br />

typedef struct <strong>PROFIBUS</strong>_DL_PACKET_DATA_ACK_REQ_Ttag {<br />

TLR_PACKET_HEADER_T tHead;<br />

<strong>PROFIBUS</strong>_DL_DATA_ACK_REQ_T tData; /* Packet Data Unit */<br />

} <strong>PROFIBUS</strong>_DL_PACKET_DATA_ACK_REQ_T;<br />

<strong>PROFIBUS</strong> <strong>DP</strong>-<strong>Master</strong> |<br />

DOC061001API12EN | Revision 12 | English | 2010-12 | Released | Public © Hilscher, 2006-2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!