Communication Protocols
Copyright IXXAT Automation GmbH
123
IEM Manual, 1.5
5.4
Ethernet Powerlink
5.4.1 Device Description File
A template of an XML Device Description file (XDD-File) for the IEM is includ-
ed in the software package. The XDD provides information about the device
configuration data [EPL1].
To modify the XDD-file to your own behavior you can refer the guideline
“Ethernet POWERLINK XML Device Description – Implementation Guideline”
Variable access
In Ethernet POWERLINK, the variables are called objects. To address the var-
iable that shall be read or written, the protocol specific address in the object
model of Ethernet POWERLINK has to be specified. The protocol specific ad-
dress is the tuple (index, sub index). If the addressed variable is located on the
host controller or stored in the SHM of the IEM it must be created first. For an
example of creating a vendor specific variable see Figure 5-28.
COM_t_BOARD_REF td_brdRef = ...
COM_e_ERROR e_ret;
COM_t_CMD_REQUEST s_cmd;
COM_t_CREATE *s_createCmd;
COM_t_CMD_RESPONSE s_response;
UINT32 dw_reference = 0; // variable reference
memset((void*)& s_cmd, 0, sizeof(COM_t_CREATE));
s_cmd.dw_command = COM_k_CREATE;
s_createCmd = (COM_t_CREATE*)&s_cmd.ab_comData[0];
s_createCmd->w_type = COM_k_UINT8; //UINT8 variable
s_createCmd->w_size = 0x01; //1 byte
s_createCmd->dw_offset = 0x00; //create in shared memory at offset 0
s_createCmd->dw_attributes = COM_k_ATTR_READ; //read only object
//Ethernet POWERLINK specific address (index 0x6200, subindex 0x00)
s_createCmd->s_address.s_epl.w_index = 0x6200;
s_createCmd->s_address.s_epl.w_subindex = 0x00;
// register variable in output process data area of shared memory
e_ret = EMI_cmdChannelConfigure(td_brdRef,&s_cmd,TRUE,&s_response);
if (e_ret == COM_k_OK)
{
dw_reference = *(UINT32*)&s_response.ab_res_data[0];
}
Figure 5-28: Creating a Powerlink specific variable
Variables that are members of either the local, built-in object dictionary (see
chapter 5.4.1) or the object dictionary of a remote dev
ice don’t have to be cre-
ated. These variables can only be accessed by means of their protocol specific