LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best method

Hi Veeru,

here is a simple example, how you can do it with a vi template.

Hope it helps.
Mike

Download All
0 Kudos
Message 21 of 27
(663 Views)


@Pnt wrote:

That is another option to run two subvis in parrallel


Are you sure of this option? I suppose the event-handler won't be able to process next event until the subVI it launches hasn't ended execution.  Maybe you have to launch VI inside event structure, not actually put the subVI, am I right? Sincerely, I don't know so deeply events, I seldom use them...

graziano


Message Edited by Graziano on 07-17-2008 08:07 AM
0 Kudos
Message 22 of 27
(658 Views)
Hi Pnt,
i´m also not happy with your solution. Veeru speak about 18 vi´s and maybe it become more. Furthermore i think one event structure per vi should be enough. Smiley Happy
Mike
0 Kudos
Message 23 of 27
(652 Views)

Hello Veeru,

I am in the middle of doing something very similar to you.  I have a bunch of buttons on a front panel and each button must launch a seperate VI (in parallel).  I store the filename of the corresponding VI in the button labels.  When a button is pressed, first I check to see if the VI is already running.  If it is, I ignore the button, if not, I execute the VI using a run VI invoke node and then open the front panel.  I have each individual subVI close it's own front panel before it stops executing.  To get the output of the each VI I think you can use an invoke node with "Control Value Get".  VI is attached.  Hope that helps! (I am new to labview too).

 

Jorge

0 Kudos
Message 24 of 27
(650 Views)


Graziano wrote:
Are you sure of this option? I suppose the event-handler won't be able to process next event until the subVI it launches hasn't ended execution.  Maybe you have to launch VI inside event structure, not actually put the subVI, am I right? Sincerely, I don't know so deeply events, I seldom use them...


Where i write subvi 1, you put there the sub vi itself.
There is no dependency between two loops so the main vi can launch another vi, before previous has ended.
 
Mike write:

i´m also not happy with your solution. Veeru speak about 18 vi´s and maybe it become more. Furthermore i think one event structure per vi should be enough

I don't like it either because of the 18 vis Smiley Very Happy
But it is the simpler and more safe! Good to know it, even if you don't use it.
0 Kudos
Message 25 of 27
(635 Views)


@Pnt wrote:

Where i write subvi 1, you put there the sub vi itself.
There is no dependency between two loops so the main vi can launch another vi, before previous has ended.
 




Okay, I thought that you put 2 screenshots of the same event structure: my mistake, it was easily seen that then sequence number is the same, so it was impossible, sorry! Smiley Happy

graziano

0 Kudos
Message 26 of 27
(628 Views)

Thanks everyone for your help

The discussion is interesting,when i look at Mikes ex(mesage 21) its interesting.

i will proceed with the tips from this issue.Also thanks Jorgewpi. If there is any problem involved pls let me know.

Thanks

0 Kudos
Message 27 of 27
(618 Views)