IoDrvEtherCAT.GetStatistics (METH)¶
METHOD GetStatistics
Reads the statistics data and copies it to the output values. The number of sent frames or TX error counts could be then used within the application. The statistic information could be reset by calling ClearStatistics In a well working runtime system the values of udiLostFrameCount, udiTxErrorCount and udiRxErrorCount should be always zero. The same information is also shown at the status page of each EtherCAT master.
- InOut:
Scope
Name
Type
Comment
Output
udiSendFrameCountUDINTNumber of total EtherCAT frames sent
udiFramesPerSecondUDINTNumber of frames per second
udiLostFrameCountUDINTNumber of total lost frames. A frame is lost due to EMC, connection or other hardware problems for example. In addition, if the CRC does not match then this counter is increased as the network driver skips the frame.
udiTxErrorCountUDINTNumber of frames that could be not sent as the runtime function sendethframe returns not ERR_OK.
udiRxErrorCountUDINTNumber of missing received frames. Each sent frame must be also received at least in the next IEC cycle. If the runtime system (TCP-IP stack) is busy or the priority is low then frames could be delayed for sending or receiving and this counter will increase.
udiLostCyclesCountUDINTNumber of lost iec cycles. If the EtherCAT Stack is not called for a complete cycle then this counter will be increased by onee.
ltRecvAvgLTIMEAverage time for receiving Ethernet frame per packet (EnableTimeMeasurements must be set to true otherwise values are zero)
ltRecvMaxLTIMEMaximum time for receiving Ethernet frame per packet
ltSendAvgLTIMEAverage time for sending Ethernet frame per packet
ltSendMaxLTIMEMaximum time for sending Ethernet frame per packet