Auto Recording Function of Motion Axis EtherCAT Programming Guide
25-6 March, 2017
25
25.4 _ECAT_Slave_Record_Read_Data
Syntax
U16 PASCAL _ECAT_Slave_Record_Read_Data (U16 CardNo, U16 NodeID,
U16 SlotNo, U32 *Data)
Purpose
Acquire the recording data of the specified axis. Users can withdraw the data (one by one) in the
buffer and save it to the other files.
Note:
1. It can save 800 data in PAC RTX version and 200 data in EtherCAT motion card. Users can use ththe
API in section 25.3 to check the buffer zone status.
2. When accessing one data by this API, 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
Data U32* Data
Aquire the recording data of the specified axis.
Please note that this API will return 8 data at a time so it
requires sufficient space for storage (Data[8]).
If _ECAT_Slave_Record_Data_Set_Type is not executed,
this API will return 0.
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 ;
U32 Data[8];
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);
if (Cnt>0)
{