LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

return from a sub vi

Hi,
I am trying to return from my sub-vi to my main vi with no success.
in the sub-vi i connect the STOP button to a STOP sign .
i am attaching my vi .
CTM-config - main vi.
CTM-Main - sub vi
 
 
Thanks
Asaf
Download All
0 Kudos
Message 1 of 8
(3,036 Views)

Hi asaf

In your subvi's while loop (which contains the event structure) you wired a true constant to the condition terminal. Just wire the result of the stop button to the terminal (as you did in your main vi).

Hope this helps.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 8
(3,036 Views)

Hi thomas,

That's what i did in the first time but when i do it it stuck the LABVIEW.

Here is the new vi .

 

Asaf

 

0 Kudos
Message 3 of 8
(3,031 Views)
I have no problem if I run it. The only thing i saw is in the sequence-structure, you also have a while-loop where the length of a path is checked. As long as you don't enter a path, you can't return.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 8
(3,029 Views)

Hi Tomas,

Did you run it as a sub-vi or a vi.

if i run it as stand-alone i also have no problem , but when i call it from the second vi (CTM-Config) than the problem occurs.

Asaf

0 Kudos
Message 5 of 8
(3,024 Views)

I always ran from CTM-Config and had no problems.

Did you check the loop that checks the path? This may cause problems if you don't enter a value and want to stop the subvi.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 8
(3,018 Views)

Hi  Tomas,

I don't understand why it can cause a problem ,the vi is waiting for events and if it gets the STOP - change value event  it needs to "do"

the event  and to stop/close the vi (sub-vi).

Any way even if i don't push the button before selecting the file (only after the file has been selected) i don't succed in returnning to the main vi.(CTM-Config)

by the way how did you manage to return if i did not send you the file ?

can there be any other reason (maybe configuration of the LAB-VIEW or something else ?

I am working on an evaluation demo 7.0

 

Asaf

0 Kudos
Message 7 of 8
(3,016 Views)

I don't understand why it can cause a problem ,the vi is waiting for events and if it gets the STOP - change value event  it needs to "do"
the event  and to stop/close the vi (sub-vi).
As long as there are other loops running, it can't finish (unless you use the STOP-function). So you have to select a file.
 

can there be any other reason (maybe configuration of the LAB-VIEW or something else ?

This might be a reason - I use LV7.0 full version (Developer Suite).
 
I also just found the following: If I start CTM-Config.vi and just once select "PCI charactarisation mode" and then select another value, CTM-Main is opened twice.
I attach the vi's I tested. Don't replace your original ones because I deleted some subvis.
 
Thomas

 

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Download All
0 Kudos
Message 8 of 8
(3,013 Views)