LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Giving computing priority to one parallel loop

Hi,

I'm using multiple parallel while loop in my vi. Since one of those loop absolutly need to be in real-time, I was wondering if there was some way to ive priority to compute on this loop. If there was some way to dedicate one core or more to this loop so that it is always ready to execute.

Thanks.

0 Kudos
Message 1 of 5
(2,922 Views)

Use a Timed Loop instead of a While loop.

 

The Timed Loop has an input that you can use to specify which core it runs in.

 

THen you could use  a Timed sequence for all of the other code and set it to use another core. 

 

But on the other hand...

 

Questions like this often are the first symptoms of a program that needs a little assistance from some of the users here that know about performance and can suggest alternatives.

 

I have not been tempted to reach for a Priority answer to a performance problem in maybe 18 years.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,893 Views)

Thanks, I'll explore what those are.

As fo performance, the device I use aquires a lot of data a rapid speed. My actual code are in parallel loops since it doesn't need to be perectly real-time and is more than fast enough at the moment. 

0 Kudos
Message 3 of 5
(2,882 Views)

There is no way to answer that question without seeing some actual code.

 

What do the loops do? If one loop code is in the middle of a gigantic FFT, your high priority loop might not get a slice of the pie anytime he wants. So:

 

  • Why are there so many loops to begin with? Could some be combined?
  • What are the loop rates of the unimportant loops? What do they do?
  • What are the requirements of the high priority loop? What does it need to do?
  • Are the loop code relatively clean or do they involve the UI thread (property nodes and such).

Are you experiencing any obvious jitter due to the current architecture? What are your timing requirements?

 


@RaphaelMT wrote:

Since one of those loop absolutly need to be in real-time,


Are you running on a real-time platform (LabVIEW RT) or plain windows? Under windows there is no way to guarantee anything. What happens if the timing is not met and how do you tell?

0 Kudos
Message 4 of 5
(2,862 Views)

@RaphaelMT wrote:

Since one of those loop absolutly need to be in real-time,


I hope you're not running on Windows.  You're not going to be finding this requirement if you are.

0 Kudos
Message 5 of 5
(2,859 Views)