EtherCAT Master Configuration EtherCAT Programming Guide
5-10 March, 2017
5
5.8 _ECAT_Autoconfig_Set_Slave_DCTime
Syntax
U16 PASCAL _ECAT_Autoconfig_Set_Slave_DCTime (U16 CardNo, U16 NodeID,
U16 Mode)
Purpose
This is for setting the DC time of each node, which default is 1000 us.
Note: This API can only be executed after the EtherCAT Master has been started
( “_ECAT_Master_Open” in section 6.1) and before EtherCAT communication is initialized
( “_ECAT_Master_Initial” in section 6.2).
Parameter
Name Data type Property Description
CardNo U16 Number Card No.
NodeID U16 Number Node ID
Mode U16 Option
Set DC time for each node.
0: 2000 us
1: 1000 us
2: 500 us
3: 250 us
4: 125 us
Example
U16 Status;
U16 CardNo=0,NodeID=1;
U16 Mode=1; // 1ms
U16 Cardnum=0;
Status = _ECAT_Master_Open (&Cardnum);
if (Cardnum>0)
{
Status = _ECAT_Master_Get_CardSeq (0, &CardNo);
Status = _ECAT_Autoconfig_Set_Slave_DCTime (CardNo, NodeID, Mode);
Status = _ECAT_Master_Initial(CardNo);
}