EtherCAT Programming Guide Auto Recording Function of Motion Axis
March, 2017 25-5
25
25.3 _ECAT_Slave_Record_Get_Cnt
Syntax
U16 PASCAL _ECAT_Slave_Record_Get_Cnt (U16 CardNo, U16 NodeID,
U16 SlotNo, U16 *Cnt)
Purpose
Acquire the data entry number of the specified axis.
EtherCAT master saves one data in each communication cycle. Each slave can save up to 8
groups of OD data.
Note:
1. It can save 800 data in PAC RTX version and 200 data in EtherCAT motion card. Users can use this
API to check the buffer zone status. Then, use the API in 25.4 to access the data and save it to another
space.
2. When accessing one data by the API (_ECAT_Slave_Record_Read_Data) in 25.4, the acquired data
numbers will reduce 1 automatically.
Parameter
Name Data type Property Description
CardNo U16 Number Card number
NodeID U16 Number Node ID
SlotNo U16 Number Slot ID
Cnt U16*
Value
Acquire current data count of the specified axis
Example
U16 Status = 0;
U16 CardNo=16 , NodeID =1, SlotNo=0;
U16 MonitorIndex =0;
U16 IOType =0, Index=0x607A, SubIndex=1;
U16 Enable =0x07;
U16 Cnt ;
Status= _ECAT_Slave_Record_Set_Type (CardNo, NodeID, SlotNo, MonitorIndex,
IOType, Index, SubIndex);
Status= _ECAT_Slave_Record_Set_Enable (CardNo, NodeID, SlotNo, Enable);
while (1)
{
Status= _ECAT_Slave_Record_Get_Cnt (CardNo, NodeID, SlotNo, &Cnt);
}