07-18-2014 09:17 AM
I am developing a vision system on a CVS-1457RT, and I am having some issues with CPU load.
It seems like about 17% of the CPU is always comsumed by a VI that has "high priority" - and this is also when my system is more or less idle (polling some IOs etc)
I have gone thru all my VI's to see their setting, but can't find the one with high priority.
I have tried the profiler, but no sub vi's are consuming much CPU time in this idle state.
Any idea on how to loctate whatever is using 17% of my CPU?
best regards,
Henrik
07-18-2014 09:26 AM
@Ehlert wrote:
It seems like about 17% of the CPU is always comsumed by a VI that has "high priority"
How did you determine this?
It is, of course, possible for an application to use too much CPU simply due to the way it is written (for example polling vs events).
Mike...
07-18-2014 09:30 AM
07-18-2014 10:14 AM
@Ehlert wrote:
Using "get cpu loads"
Where did you find that? Are you even sure LabVIEW is the culprit? What does the Windows Task Manager say is using up CPU?
07-21-2014 06:06 AM
Hi Henrik.
I will recommend you to use the Real-Time Execution Trace toolkit. It enables you capture and display the timing and execution of VIs and threads for the application running on your RT target.
A trace could look like this:
In the top section you have the Thread View, that shows all the threads that are running on the system, including all the threads you are not explicitly handling, like timing and communication threads.
In the button section, you have the VI View, where you can monitor if your different VIs are executing or if some of them are causing a starvation; meaning that higher priority tasks are using too many resources, so that lower priority tasks are never executed.
Another way of having a look at the resources are the Distributed System Manager. It can basically tell the same as the "Get CPU Loads" VI you are using, however it also offers the possibility to see the running states of the VIs (Note; In order for this to work, you need to enable VI Server on your RT Target).
I hope these tools can bring you closer in determine which VI are consuming your resources.