04-22-2015 10:08 AM
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
04-22-2015 10:11 AM
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.
04-22-2015 10:43 AM - edited 04-22-2015 10:45 AM
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.
04-22-2015 10:46 AM
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
04-22-2015 01:55 PM
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.
04-22-2015 06:33 PM
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.