From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FIle path issues in EXE

With a dozen VIs modules I would not make 12 identical cases, but use dynamic referencing:

Build VI name, Open VI Reference.vi, run VI, insert into subPanel

 

A few notes

It works best if VIs have the same connection panel.

Modules are no more subVIs of the mainVI, so

    You have to include them manually into build (always include section of build specification or place them separately from main.exe - llbs, etc)

    When main.vi loads it does not load all 12 subVIs, loading only of the required VI starts when you open reference to it.

    Modules still run in the same application instance, so no problems with queues, global vars, accessing path inside exe, etc.

0 Kudos
Message 11 of 16
(1,101 Views)

@Bob_Schor wrote:

 Here's an example:

Sub-Panel II.png



Bob_Schor, two questions:

1. Why do you have the Open vi following the Insert VI invoke node?  Is this instead of invoking the Run VI method?  Is so, what is the benefit?

2. Wouldn't you need to invoke the Remove VI method prior to inserting the next vi into the subpanel?

 

^TeraTech.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Check out this lengthy post of mostly complaints)
0 Kudos
Message 12 of 16
(576 Views)

@TeraTech wrote:
Bob_Schor, two questions:

 

1. Why do you have the Open vi following the Insert VI invoke node?  Is this instead of invoking the Run VI method?  Is so, what is the benefit? 
2. Wouldn't you need to invoke the Remove VI method prior to inserting the next vi into the subpanel?

Recall what we are doing.  We want to run a sub-VI (named "Open" in this example) and have its front panel show up in our Sub-Panel while it is running.  In this example, I simply run the sub-VI Open (I rarely use the Run VI method anymore -- if I want a detached VI, I'm more likely to use the Start Asynchronous Call), and while it is running, I can see its Front Panel.  Note if I reverse the order, then Open will run (but I won't see its Front Panel, and if it has a "Stop" button, I won't be able to push it), and when it exits, I'll open its Front Panel.  Oops, that's pretty useless ...

 

As to your second question, when we finish the code in the Snippet, i.e. when the sub-VI Open exits, the sub-Panel will continue to display Open's Front Panel until another VI's Front Panel is "Inserted" or, as you note, until we do a Remove VI (which renders the sub-Panel "blank").  I've got a project where there are 24 "clones" showing the results of 24 experimental Stations, and an control that lets me choose which set of 24 VIs I wish to display at any one time.  If I go from Station 1 to Station 2, I just do a different "Insert VI", but if I want to "turn off" the displays, I do a "Remove VI".

 

I hope that clarifies things.  The other thing you can do is to simply "try it yourself" and see what happens.  You could easily have answered both of your questions by simply writing a little simple LabVIEW code and trying it out for yourself ...

 

If you have more questions, please start a new thread (rather than hijacking this one).  Be sure to post your code so I (and other Forum Readers) can see what you are trying to do.

 

Bob Schor

0 Kudos
Message 13 of 16
(562 Views)

Thanks Bob_Schor - re hijacking the thread: having read through many forum threads, I often see the opposite reaction, which is ' instead creating a new thread, your question is answered <here> and <here> ' when the persons question is slightly different than <here> and <here>'.  So, I'm never sure if I'm hijacking or preventing a redundant thread.

^TeraTech.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Check out this lengthy post of mostly complaints)
0 Kudos
Message 14 of 16
(552 Views)

@TeraTech... I think in this particular case the "hijacking"stuff actually was good !! 

 

Yes i am now working on a project which involves all the earlier stuff - MAIN calling many SUBs based on user choice.. but only one at a time. Except that in this instance i have two display monitors and to complicate things ( life) one monitor is a touch with 800 x 600 resolution and the other monitor is a regular no-touch with 1366 x 768 resolution .... this monitor is used for only displaying indicators like gauges / graphs etc.  The touch monitor uses no indicators but only controls. Thus when user pushes the button for SubVI_01 , i have to change both the VIs in both monitors. So obviously Sub-Panel stuff is ruled out ( the touch monitor way too small to accommodate all indicators + controls on one side  ) and i am back to my "Flat 8.x file structure" 

 

I don't know what other options exist...

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 15 of 16
(541 Views)

MogaRaghu,

 

     You clearly do not understand how to use sub-Panels.  Start a new Thread and I will tell you how we've used multi-screen Displays and "selective" sub-Panels.  I'm not going to continue this "dead" (and hijacked) Thread.

 

Bob Schor

0 Kudos
Message 16 of 16
(533 Views)