Communication Protocols
Copyright IXXAT Automation GmbH
113
IEM Manual, 1.5
{
{0x1C12, 0, 1, 1},
/* SM2 count */
{0x1C12, 1, 2, 0x1600}, /* SM2 assignment */
{0x1600, 0, 1, 1},
/* RxPdo count */
{0x1600, 1, 4, 0x62000008}, /* RxPdo assignmment */
{0x1C13, 0, 1, 1},
/* SM3 count */
{0x1C13, 1, 2, 0x1A00}, /* SM3 assignment */
{0x1A00, 0, 1, 1},
/* TxPdo count */
{0x1A00, 1, 4, 0x60000008}
/* TxPdo assignmment */
};
Figure 5-22: Example of a command parameter use
Both of the mechanisms (init configuration area and command parameter) can
be mixed. In that case, the init configuration area is typically used to declare
user configured PDO index values which are filled by the command parameter
method afterwards.
To create a valid mapping using mixed mode, these steps are necessary:
1. Declare PDO count and index
2. Fill mapping contents
See the following code parts for a sample of this use case.
1. Declare user configured PDO count and index (RxPdo entry count fol-
lowed by RxPdo’s, TxPdo entry count followed by TxPdo’s):
/** aw_PdoConfig:
EtherCAT specific PDO config data with FW V1.2.0.
*/
static UINT16 aw_PdoConfig[8] =
{
3, 0x1601, 0x1603, 0x1605,
3, 0x1A02, 0x1A04, 0x1A06
};
Figure 5-23: Example of a PDO init configuration
2. Download the mapping objects (mapped entry identified by index and
subindex, length is necessary to differ between subindex 0 count with 8
bit, PDO index with 16 bit and mapping entry with 32 bit):
/* set PDO config using w_index, b_subindex, b_length and dw_value */
COM_t_CMD_REQUEST s_cmd;
COM_t_CMD_RESPONSE s_response;