LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed loop & processor allocation

Hi all,

 

When using timed loop we can assign a CPU for each loop or let LabVIEW do it for us, is there any way to assign more than CPU for a given timed loop?

 

Cheers


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 6
(3,179 Views)

AFAIK a timed loop serialises everything so there can be no actual parallel code within a timed loop.

 

Allocating more than 1 CPU for this is therefore not logical.

Message 2 of 6
(3,176 Views)

You can assign a timed loop to run on a given processor by wiring the processor number to the "processor assignment" terminal in the let data node of the loop.  You can also set it in the "Configure Timed Loop" dialog.  Just make sure you select a processor number that actually exists, otherwise you will get a runtime error.

 

Never mind.  I misread your initial question.  It is not possible to assign one timed loop to run on multiple processors.

0 Kudos
Message 3 of 6
(3,162 Views)

Maybe I'm trying to bend the timed loop in a wrong way but I if take a state machine and replace the while loop with a timed loop just to be able to assign the CPU as I wish - for this test I don't care too much about the jitter control features of the timed loop.

 

In that case the compiler cannot serialize my code, so I thought maybe I'd find a way to assign 2 CPUs per timed loop 😮


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 6
(3,158 Views)

ALL code can be serialised.  And it is serialised in the timed loop AFAIK. Without changing this, the idea of assigning multiple cores to a single loop is moot.

 

I would also be VERY interested in a multicpu version of a timed loop.  But today it does not exist.

Message 5 of 6
(3,140 Views)

Each timed loop is a single thread.  Even if you have parallel paths inside of the timed loop, it is all a single thread.  So there is no way to assign a single thread to 2 cores.


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 6 of 6
(3,118 Views)