LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initial order of parallel loop

Hi,

 

I have two parallel loops.  One of them must start first for one iteration.  After the first iteration, order of perference between the loops no longer matter.  I used notifier inside a case structure that gets activated only when i = 0.  Is there a better way?  If I want to do this with semaphore, how would I do that?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 7
(3,513 Views)

Hi jyang72211,

i think semaphore is not the one you need. You should think about a rendezvous.

If you need the notifier also for other communication between these two loops, then i would use this solution.

 

Mike

Message Edited by MikeS81 on 02-26-2009 02:43 PM
Message 2 of 7
(3,507 Views)
Thank you!
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 7
(3,475 Views)

Does the first loop have to complete its first loop before the second one starts, or does the first loop just have to start executing before the second one? If the later, you could also put a short delay in front of the loop you want to start second. This would guarantee that the other loop would always start first.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 7
(3,458 Views)
The first loop must complete 1 iteration between the second loop starts.  On a side note, when you said I can put a delay in the loop I would like to start later, does that have to be a time loop?  If not, how can we can sure that the program will not touch anything in that code before the time delay expired? 
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 5 of 7
(3,454 Views)

Actually what I said was put a delay before the loop that needs to start second. Also you would need to be sure to wire an output from the delay to the border of the loop to establish a data dependency.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 6 of 7
(3,445 Views)
I never thought of it this way.  Thanks!
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 7 of 7
(3,426 Views)