LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display/Skip front panel on subvi?

Hi,
 
In the research phase of building a system I call a number of sub-vi:s that have looots of variables on the front panel.
Eventually most variables will turn into "constants" or will be controlled from the calling .vi.
The sub-vi:s have a button to "Start execution" and to "Exit sub vi" (to allow changing and inspecting data at each step).
Now I entered an "Autorun" button on the calling .vi that, when passed to the sub-vi will bypass the "Start" and "Exit" buttons.
(I.e. when called, the sub-vi just does its job, with no manual intervention.)
---> For the "Auto-run"-mode I also change the sub-vi:s properties to _not_ "Open when called". So far, so good. However...
 
This latter operation I would like to do programmatically based on the "Autorun"-flag passed from the calling .vi.
(I.e. If "Autorun" do not open window, else do.)
I think the thing to do is somehow to "Open Reference" and "Execution-Show front panel when called",
but I feel I am on very soft grounds here, and it has not yet worked as expected. So my questions are ...
  I tried to find an example of this application and found none, but maybe there is?
  Is the basic idea OK, or is there a better way switch between these "Run" and a "Debug" modes programmatically?
  If so, is it OK to do this in the sub-vi (or is it too late then) ?  Is there something else that must be attended to too?
  Can the "Close reference" be done immediately, or does it have to wait until the sub-vi has executed the rest of its code?
(I apologize if my questions are not clearly stated, but they reflect my present state of knowledge in this matter 😉
Any hints are highly appreciated...
 
Best regards / Ake
 
 
0 Kudos
Message 1 of 2
(2,266 Views)
Hi Ake,

why not make it the other way around:
standard is 'no frontpanel' and when needed (=debug mode) the frontpanel will be shown!

You can use the property 'Front Panel Window: State' to realize this.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,257 Views)