EtherCAT Programming Guide EtherCAT Master Configuration
March, 2017 5-3
5
5.1 _ECAT_Master_Set_CycleTime
Syntax
U16 PASCAL _ECAT_Master_Set_CycleTime (U16 CardNo, U16 Mode)
Purpose
This is for setting the cycle time
of the EtherCAT master communication. *Set before initialization.
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.
Mode U16 Option
Communication cycle time (us)
0: 2000 us
1: 1000 us
2: 500 us
3: 250 us
4: 125 us
Example
U16 Status;
U16 CardNo=0;
U16 Cardnum=0;
Status = _ECAT_Master_Open (&Cardnum);
if (Cardnum>0)
{
Status = _ECAT_Master_Get_CardSeq (0, &CardNo);
// Execute the API after enabling the motion card and before initialization.
U16 Mode = 3;
Status = _ECAT_Master_Set_CycleTime (CardNo, Mode);
Status = _ECAT_Master_Initial(CardNo);
}