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

udiSendFrameCount

UDINT

Number of total EtherCAT frames sent

udiFramesPerSecond

UDINT

Number of frames per second

udiLostFrameCount

UDINT

Number 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.

udiTxErrorCount

UDINT

Number of frames that could be not sent as the runtime function sendethframe returns not ERR_OK.

udiRxErrorCount

UDINT

Number 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.

udiLostCyclesCount

UDINT

Number of lost iec cycles. If the EtherCAT Stack is not called for a complete cycle then this counter will be increased by onee.

ltRecvAvg

LTIME

Average time for receiving Ethernet frame per packet (EnableTimeMeasurements must be set to true otherwise values are zero)

ltRecvMax

LTIME

Maximum time for receiving Ethernet frame per packet

ltSendAvg

LTIME

Average time for sending Ethernet frame per packet

ltSendMax

LTIME

Maximum time for sending Ethernet frame per packet