Ecat_Master_Initial - Delta EtherCAT Programming Manual

Table of Contents

Advertisement

Master Initialization

6.2 _ECAT_Master_Initial

Syntax
6
U16 PASCAL _ECAT_Master_Initial(U16 CardNo)
Purpose
This is for initialiaing EtherCAT communication and switching the slave to OP mode.
Note: After using this API to do the initialization, please apply API "_ECAT_Master_Check_Initial_Done"
(section 6.12) to check the status and wait for it to return "0". Then, you can start using other functions.
Parameter
Name
CardNo
Example
U16 Status;
U16 CardNo = 0;
U16 Cardnum = 0;
U16 InitDone = 100;
Status = _ECAT_Master_Open(&Cardnum);
for (U16 CardSeq = 0; CardSeq < Cardnum; CardSeq ++)
{
Status = _ECAT_Master_Get_CardSeq (CardSeq, &CardNo);
Status = _ECAT_Master_Initial(CardNo);
while (InitDone != 0)
{
if (InitDone == 99)
{
}
}
}
6-4
Data type
Property
U16
Number
Status = _ECAT_Master_Check_Initial_Done(CardNo, &InitDone);
// Error
Status = _ECAT_Master_Get_Initial_ErrorCode(CardNo);
break;
Description
Card No.
EtherCAT Programming Guide
March, 2017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents