EtherCAT Master Configuration EtherCAT Programming Guide
5-12 March, 2017
5
5.10 _ECAT_Autoconfig_Set_NodeID_Alias
Syntax
U16 PASCAL _ECAT_Autoconfig_Set_NodeID_Alias (U16 CardNo, U16 NodeID, U16
MapNodeID)
Purpose
This is for configuring user-defined station alias of each node. *Set after initialization.
Note:
1. This API is only applicable to Delta R1-EC series remote modules.
2. After executing this API, users still need to validate the new station alias. To validate it, please set the
station alias of each node first and by using “_ECAT_Autoconfig_Save_NodeID_Alias” (refer to section
5.12). Meanwhile, the station alias information can be acquired by
“_ECAT_Autoconfig_Get_NodeID_Alias” (refer to section 5.11)
3. This API can only be executed after the EtherCAT Master has been started
( “_ECAT_Master_Open” in section 6.1) and before setting the user-defined station alias of each node
( “_ECAT_Autoconfig_Save_NodeID_Alias” in section 5.12) and
( “_ECAT_Master_NodeID_Alias_Enable” in section 5.3) also before ( “_ECAT_Master_Initial” in section
6.2).
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
NodeID U16 Number Node ID
MapNodeID U16 Number Specify Node ID
Example
U16 Status;
U16 CardNo=0,NodeID=1;
U16 MapNodeID = 2;
U16 Cardnum=0;
Status = _ECAT_Master_Open (&Cardnum);
if (Cardnum>0)
{
Status = _ECAT_Master_Get_CardSeq (0, &CardNo);
// Reset EtherCAT communication
Status = _ECAT_Master_Reset(CardNo);
// Specified first node of slave device as station 2
Status = _ECAT_Autoconfig_Set_NodeID_Alias (CardNo, NodeID, MapNodeID);
// Save user-defined alias to all of the connected device, and then EtherCAT
communication will stop automatically.
Status = _ECAT_Autoconfig_Save_NodeID_Alias (CardNo);
// ………….waiting for reboot all of the device manually………….
bool module_reboot = false;
While(!module_reboot)