LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO FPGA CPU 100%

My system consists of a host PXI host running a VI front panel and communicating with three NI-9112 cRIOs using shared libraries.   Two of the cRIO's utilize an FPGA and it is these two that consume 100% CPU according to the Distributed System Manager.   I have no idea why these two cRIOs are consuming 100% CPU.  Looking for any suggestions that may help.

0 Kudos
Message 1 of 4
(2,717 Views)

Greedy loop (loop with no timing in it so it just runs as fast as it can taking up 100% CPU)?  Extreme processing?  We would need to see some code to diagnose anything without completely guessing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,711 Views)

Another guess - you have DMA communication between the RT and FPGA parts and you set a long or infinite timeout on that read or write operation. In normal LV, this would cause a reduction in CPU usage, because the code would wait for an interrupt to continue. In the case of a DMA read, it causes high CPU usage.

 

 

Generally, for debugging CPU consumption issues it is helpful to start disabling parts of the code. You do this until you find that the consumption is down and then you know which part is responsible. Another variation on this is to use case structures with boolean controls, which then allow you to dynamically play with this.


___________________
Try to take over the world!
0 Kudos
Message 3 of 4
(2,673 Views)

Sorry for the long delay.   I was  assisting the Labview developer on and off and posted this problem in order to help facilitate a solution.   Short story is that it was indeed a loop, actually two loops that starved the CPU.   We had one loop communicating to the FPGA and another running the main application.   Both were running at 100Hz and when analyzing the processing of each loop, we dropped the loop rates down to the bare minimum to properly crunch the data.   Once the loops were dropped ~60Hz CPU drop down to ~60Hz. 

 

Although the developer viewed this response, he past and tried the "everything else under the sun approach."   Eventually he had a NI support engineer come in house where the loop starvation issue was discovered.  Many other issues were found by the "everything under the sun" approach (missed updates, etc.) so it wasn't a complete waste of time.

 

Thanks for your quick response and help in this matter!  Much appreciated.

0 Kudos
Message 4 of 4
(2,573 Views)