EtherCAT Programming Guide EtherCAT Master Configuration
March, 2017 5-9
5
5.7 _ECAT_Autoconfig_Save_File
Syntax
U16 PASCAL _ECAT_Autoconfig_Save_File (U16 CardNo, I8 *FilePath)
Purpose
This is for saving the communication topology and DC data to the configuration file.
Before initializing the master (_ECAT_Master_InitialEtherCAT in section 6.2), you can use
“_ECAT_Autoconfig_Open_File” (section 5.6) to import this configuration file so that the
EtherCAT Master will able to check if the actual topology complies with the configuration and
return an error code.
Note: This API can only be executed after the EtherCAT Master has been started by API
“_ECAT_Master_Open” (section 6.1).
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
FilePath I8* String
Save the communication topology and DC data to the
configuration file
Example
U16 Status;
U16 CardNo=0;
I8 FilePath[255];
U16 Cardnum=0;
Status = _ECAT_Master_Open (&Cardnum);
if (Cardnum>0)
{
Status = _ECAT_Master_Get_CardSeq (0, &CardNo);
strcpy(FilePath, "C:\\EtherCAT_Information.dat");
Status = _ECAT_Autoconfig_Save_File (CardNo, FilePath);
}