NI-Industrial Communications for Ethernet/IP Uses Large Amount of CPU on NI Linux Real-Time Targets in LabVIEW

Updated Feb 20, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-Industrial Communications for Ethernet/IP

Issue Details

  • When using the NI-Industrial Communications for Ethernet/IP (Ethernet/IP) functions on a Real-Time (RT) target in LabVIEW, there is an unexpectedly high CPU load causing it to drop out or crash.
  • I am using the Ethernet/IP functions in my Real-Time application (RTEXE) which I am deploying on my RT controller directly from LabVIEW. The application works fine for a short period and then it unexpectedly restarts. If I look at the kernel logs located at  /var/local/natinst/log I can see there is a line pointing to a thread called EIP Tick Wait, which seems to be related to the Ethernet/IP functions. The complete message can be seen in the following picture:
EIP Tick Wait.png
 
 

Solution

This behavior and the thread called EIP Tick Wait can be produced due to the "TimerTickInterval" property of an Ethernet/IP session. This value gets/sets the tick interval for stack operations. Since this interval is set to 1 ms by default, the RT controller will try to execute all Ethernet/IP-related tasks as fast as possible, resulting in high CPU usage. To solve the issue, you can increase the interval between the timer ticks to reduce CPU usage. This property can be changed through a property node in LabVIEW, as shown in the image below. (Note: "TimerTickPreemption" must also be set to FALSE).

Make sure the "TimerTickInterval" is less than your fastest UDP otherwise you may experience connection issues. A good rule of thumb is at least half of the fastest UDP's period. 

 

Additional Information

If the CPU load still exceeds your requirements:
  1. Consider if a different communications protocol would be suitable for the application
  2. If a different communication protocol is not available then consider upgrading your Real-Time target

Attachments