LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Loops Question

I have a loop with a 100ms delay in it that also has a counter in it. When I run this it increments as it should, 10 times a second. When I add a second identical parallel loop it cuts the speed in half. Is this just the way it works because it is doing twice the work or is there a way around this?

Thanks
0 Kudos
Message 1 of 4
(2,993 Views)
There must be something in your loop that is serializing access. It could be as simple as a subVI that is not reentrant. The execution of one loop must wait for the subVI in the other loop to complete. If your delay is inside a VI "wrapper" that is not reentrant, you'll see that speed cut in half with two loops. When I create a VI with two parallel while loops with "Wait (ms)" functions in them, they run at the same speed.

Daniel L. Press
NI Certified LabVIEW Developer
PrimeTest Corporation
www.primetest.com
0 Kudos
Message 2 of 4
(2,993 Views)
I have installed the toolkit from openg.org. It replaces the wait(ms) vi with a new one. I checked and it was not made reentrant. I changed the properties and that fixed it.

Thanks for the help.
0 Kudos
Message 3 of 4
(2,993 Views)
That's funny. I have the OpenG Toolkit as well, and in the process of testing your problem, I noticed the same thing. It should be reentrant.

Good eye!

Dan
0 Kudos
Message 4 of 4
(2,993 Views)