11-18-2014 04:56 AM
Why have them as two sub-vi's? If the functions are such that it makes for good sub-vi's, make a macro one who's function is to gather up all inputs and start them at the same time. It's a dead simple vi, just all inputs from both sub-vi's and place both inside.
/Y
11-18-2014 05:08 AM
Hi,
I would not use notification (only one of the subVI could receive the notification and start). That depend of course how you implement that and what architecture you are using. But this can leads to non synchronization.
A good suggestion was the rendez-vous. You also can find example through: help >> find examples .. and search for rendez-vous. Did you try this?
11-18-2014 05:32 AM
I tried the error cluster as well as a notfier and neither the common error in nor the notifier works 😕
Do you have other suggestions?
Thanks 🙂
11-18-2014 05:34 AM
sorry I posted this last message before reading your last messages.
I will try the rendez-vous and keep you posted.
11-18-2014 07:58 AM
I saw the example of rendezvous in labview and I notice that all the subVIs running in parallel are almost the same, there's no real difference, no one seems requiring much time than the other but I tried anyway the rendezvous in my VI and it didn"t work, I tried a simple one containing two simple subVIs, but unfortunately there's always one which starts executing before the other 😕
11-18-2014 10:09 AM
@Yamaeda wrote:
Why have them as two sub-vi's? If the functions are such that it makes for good sub-vi's, make a macro one who's function is to gather up all inputs and start them at the same time. It's a dead simple vi, just all inputs from both sub-vi's and place both inside.
/Y
Heh, an even simpler version of this is to place both VI's in a flat sequence (same function as making a macro VI). Since the sequence wont execute until all wires have data they'll synch up. 🙂
/Y
11-18-2014 10:16 AM
@Yasmine90 wrote:
I saw the example of rendezvous in labview and I notice that all the subVIs running in parallel are almost the same, there's no real difference, no one seems requiring much time than the other but I tried anyway the rendezvous in my VI and it didn"t work, I tried a simple one containing two simple subVIs, but unfortunately there's always one which starts executing before the other 😕
It could be that you have a function in side one of the subVIs that's blocking and causes your threads to wait. The most common example would be if you use the same subVI in both threads, they would not run at default. The simplest solutions to that senario is to either set the VIs as reentrant or to extract the code out of the subVIs.
11-18-2014 11:24 AM
@Oligarlicky wrote:
@Yasmine90 wrote:
I saw the example of rendezvous in labview and I notice that all the subVIs running in parallel are almost the same, there's no real difference, no one seems requiring much time than the other but I tried anyway the rendezvous in my VI and it didn"t work, I tried a simple one containing two simple subVIs, but unfortunately there's always one which starts executing before the other 😕
It could be that you have a function in side one of the subVIs that's blocking and causes your threads to wait. The most common example would be if you use the same subVI in both threads, they would not run at default. The simplest solutions to that senario is to either set the VIs as reentrant or to extract the code out of the subVIs.
The most common way this happens is when you cleverly make a "Wait with error passthrough" VI and you forget to set it as reentrant.