02-26-2009 07:28 AM
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!
02-26-2009 07:39 AM - edited 02-26-2009 07:43 AM
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
02-26-2009 12:48 PM
02-26-2009 07:01 PM
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...
02-26-2009 08:12 PM
02-26-2009 08:55 PM
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...
02-27-2009 07:21 AM