LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two parallel different subvi running at the same time

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 18
(1,446 Views)

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? 

Certified LabVIEW Architect (CLA)
0 Kudos
Message 12 of 18
(1,445 Views)

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 🙂

 

0 Kudos
Message 13 of 18
(1,441 Views)

sorry I posted this last message before reading your last messages.

I will try the rendez-vous and keep you posted.

0 Kudos
Message 14 of 18
(1,438 Views)

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 😕

 

0 Kudos
Message 15 of 18
(1,424 Views)

@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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 16 of 18
(1,405 Views)

@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.

0 Kudos
Message 17 of 18
(1,402 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 18 of 18
(1,385 Views)