Communication Protocols
Copyright IXXAT Automation GmbH
93
IEM Manual, 1.5
5.2
Ethernet/IP
5.2.1 Device Description File
A template of an Electronic Data Sheet (EDS) file for the IEM is included in the
software package. The EDS provides information about the device configura-
tion data [EIP1]. To modify the Electronic Data Sheet file to your own behavior
you can refer chapter 7 of the CIP Specification published by ODVA.
5.2.2 Variable access
In EtherNet/IP variables are called object attributes. To address the variable
that shall be read or written, the protocol specific address in the object model
of EtherNet/IP has to be specified. The protocol specific address is the triple
(class, instance, attribute). If the addressed variable is located on the host con-
troller 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-4.
COM_t_BOARD_REF td_brdRef = ...
COM_e_ERROR e_ret;
COM_t_CMD_REQUEST s_cmd;
COM_t_CREATE *p_c;
COM_t_CMD_RESPONSE s_response;
UINT32 dw_reference; // variable reference
memset(&s_cmd, 0x00, sizeof(COM_t_CMD_REQUEST));
s_cmd.dw_command = COM_k_CREATE;
p_c = (COM_t_CREATE*)&s_cmd.ab_comData[0];
p_c->w_type = COM_k_COMPLEX;
p_c->w_size = 400; // size of variable
p_c->dw_offset = 0;
// location of read/write variable is acyclic data area of shared memory
p_c->dw_attributes = COM_k_ATTR_READ_WRITE;
// specify EIP address (100,1,2)
p_c->s_address.s_eip.w_class = 100;
p_c->s_address.s_eip.dw_instance = 1;
p_c->s_address.s_eip.w_attribute = 2;
// register variable in output process data area of shared memory
e_ret = EMI_cmdChannelConfigure(td_brdRef,&s_cmd,TRUE,&s_response); // blocking
// read variable reference
dw_reference = *(UINT32*)&s_response.ab_res_data[0];
Figure 5-4: Creating an Ethernet/IP specific variable
Variables that are elements of either the local, built-in object model (see
5.2.2.1
) or the object model of a remote device don’t have to be created.
These variables don’t possess any address reference and can only be ac-