LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically return to main vi from subi

I have a main VI and a sub VI. The sub vi front panel is opened when it is called and the main VI is updated. But I need to automatically return to the main VI front panel after running the subvi

0 Kudos
Message 1 of 6
(2,552 Views)

Set your subVI as "Dialog" in the VI settings.

Make sure that the front panel of the subVI is closed before calling it, otherwise, it will stay open (refers to development phase).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,544 Views)

The subVI front panels do not open when called.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 6
(2,538 Views)

@paul_cardinale wrote:

The subVI front panels do not open when called.


Oh, they do....if you configure that to happen.

Setting the VI as Dialog (as mentioned before) is the simplest way to achieve this.

 

Norbert

 

EDIT: Looking into the attached code in the initial post, i don't see any purpose in displaying either of the "subVIs" as dialog. None of them contain code waiting for user input or encouraging the user to interact with the front panel.

Despite that, the code and interfaces should be reworked to match common development style guides (e.g. gray scale colors).

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(2,534 Views)

@Norbert_B wrote:
Despite that, the code and interfaces should be reworked to match common development style guides (e.g. gray scale colors).

Agreed!

 

  • What's the point of the outer case structure of the main VI (now encompassing while loop). Are you using "continuous run" for this???
  • Yes, your color scheme is just garish!
  • Why do you have colored case structures on the diagram? Makes the wires hard to see (try a boolean wire in one of you case structures!). Use the default white, or, if you absolutely must, very light pastel colors as background.
  • There is no reason to maximise the front panels of the subVIs, blocking everything else on the desktop. Same for the diagrams.
  • You have a lot of explicit repetitive operations (e.g. string subset). That could be done in a loop instead, reducing the code to <10% of the current complexity.
  • Your small cases all contain "replace substring", since this is common to all cases of each case structure, it belongs after the case structure. The case structure only needs to contain what's different (the string in this case)! Even better use a string array and index into it with the ring. No case structure needed at all!
  • If you want to make the subVIs interactive, they need to wait for user input. Currently they show for a nanosecond, complete, and disappear again. (hint: while loop and event structure, for example.)
  • What is the point of the flat sequence? Seems unecessary.
  • There is a primitive for "equal zero". Alternatively, wire the integer to the case selector and make one case zero and the other "default".
  • Your front panel has a wild mix of fonts (arial. times roman, application, etc.). Make a gobal design decision!
  • Why are your LEDs distorted in random directions? Keep them all round or at least all the same shape.

 

0 Kudos
Message 5 of 6
(2,500 Views)

No.  They don't.  They 'would' if they were so configured.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 6
(2,482 Views)