LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why won't loops execute after assigning processors for timed loops?

Solved!
Go to solution

I have 256 two-frame timed loops in my code. When I execute the code without assigning processors only 128 of the timed loops will execute simultaneously, however when I assign a different processor to each one (0-255) then only 4 will execute at once. Why is this? How can I make them all execute simultaneously?

 

Attached: two snapshots of code. 1 shows a small portion of the timed loops, and the other is the part of the code that communicates with an FPGA VI that controls the state of outputs (using a CRio-9066.) For the timed loops, the little sun icon is a sub-VI that generates values for the dt time delay of the timed loops.

Download All
0 Kudos
Message 1 of 7
(3,032 Views)

Where do the timed loops execute (FPGA, RT, etc.)?

How many processors do you have?

0 Kudos
Message 2 of 7
(3,016 Views)

They execute on the computer VI (FPGA doesn't support multifram timed loops) and I don't know how many available processors I have! I am very new to this so any explanations, tips, or thoughts would be very helpful

0 Kudos
Message 3 of 7
(3,008 Views)

I guess you have four processor cores.

 

Try running CPU information. What does it tell you?

0 Kudos
Message 4 of 7
(3,001 Views)

You were right! It says 4 logical processors, 1 for # of packages, 4 cores per package, and 1 logical processor per core

0 Kudos
Message 5 of 7
(2,994 Views)

Why do you have a control writing to its local variable outside of the timed loops?

0 Kudos
Message 6 of 7
(2,978 Views)
Solution
Accepted by topic author doug333

@doug333 wrote:

They execute on the computer VI and I don't know how many available processors I have!


Windows?  If that is the case, do not bother with the timed loops.  They add overhead and you are very unlikely to gain anything from it.  Even the core affinity rarely helps.  Just use normal While loops with a Wait ms funtion in there.


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
Message 7 of 7
(2,958 Views)