cRIO Stops Responding After Running For Extended Periods of Time

Updated Jun 7, 2018

Reported In

Hardware

  • CompactRIO Controller

Issue Details

  • I have code running on my cRIO, that works fine for 10 minutes, then disconnects.
  • My code runs for hours, then eventually stops running.  This happens at a relatively consistent time.

Solution

Check the memory and CPU usage of the cRIO. 
  • If the Free Memory is low, and decreases over time, the cRIO will likely run out of memory.  This will crash the cRIO.
    • This can be caused by code that constantly loads values into memory, and never frees the memory again.  Writing the data to disk, rather than storing it in memory is a useful tool to prevent this situation.
  • If the CPU stays around 100%, for extended periods of time, it may disconnect.
    • Try slowing down loops and putting less demands on the CPU.  It is recommended to keep your average CPU usage at or below 75% to allow room for usage spikes.

Additional Information

When running complex code for extended periods of time on a processor, such as a cRIO, there is the danger that you can exceed the resources available, such as CPU power or memory. 

If the CPU hits 100% usage, networking will be de-prioritized, to allow for the CPU to work on higher priority tasks.  This can result in a disconnection.

WAS THIS ARTICLE HELPFUL?

Not Helpful