LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use SubPanels to display and run multiple executables from the same GUI?

Solved!
Go to solution
As far as I know you can only have a fixed number of subpanels defined on the front panel. You can maintain an array of your subpanel references and swap the panels in and out on the front panel. You would only be able to see a fixed number panels at the same time. From a user interface perspective you probably want to limt how many individual subpanels you are displaying anyway since too many would be a confusing and clutterer user interface.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 31 of 41
(1,804 Views)

Right now (while testing on my local PC), I run my 'factory' not as an Exe, but just from labview (clicking the Run icon).  The (in this case) four instances of my VIT (also not an exe) appear in their respective SubPanels.  However, none of the VITs is running.  I tried setting the VIT's VI Properties->Execution to "Run When Opened", but that didn't seem to make any difference.  The VITs still do not run.  The VITs are really just VIs, so I thought I could just change the "Run When Opened".  Do I have to make the VIT an exe somehow?

0 Kudos
Message 32 of 41
(1,764 Views)

If you are running in the development environment the "Run when opened" property does not apply.  You can run the VIT progrmamatically by opening a reference to it and using a the RunVI method (Invoke node). 

 

Dan

0 Kudos
Message 33 of 41
(1,749 Views)

I've attached a png to show what I'm doing.  If I just use the Invoke Node, my VIT comes up but doesn't run.  If I try to pass the VI Reference to the Call By Reference Node Function, I get a broken wire. 

0 Kudos
Message 34 of 41
(1,719 Views)

Quoting myself from earlier in this thread;

 


 With that in mind I would like to invite yo uto look at the code i posted in this thread (reply #18 has a zip).


 

That link has a working example that should help. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 35 of 41
(1,715 Views)
Instead of a VIT, can I somehow invoke the DLL equivalent of my main and display it on the subpanel instead?  I'm not sure how to open the reference and run the VI like I currently do for the VIT.  Right now I'm trying to use the Call Library Function Node, but other than passing it its required parameters, I'm not sure what to do to get it to run.
0 Kudos
Message 36 of 41
(1,632 Views)

mrbean wrote:
Instead of a VIT, can I somehow invoke the DLL equivalent of my main and display it on the subpanel instead?  I'm not sure how to open the reference and run the VI like I currently do for the VIT.  Right now I'm trying to use the Call Library Function Node, but other than passing it its required parameters, I'm not sure what to do to get it to run.

If your dll supports an ActiveX interface then you can use an ActiveX container.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 37 of 41
(1,629 Views)

I'd like to take advantage of the ini file associated with my app's exe that contains (and thus) 'allowMultipleInstances'.  However, I need a way in my factory to display each instance in its own tab (subpanel).  Is there a way to do that without using a VIT ?

0 Kudos
Message 38 of 41
(1,588 Views)
Do you need your DLL to work with LabVIEW, or are you trying to use subpanels?  If it is a DLL you are trying to use, I would have a normal tab control with controls and indicators that feed into/out of the call library function node.
National Instruments
Applications Engineer
0 Kudos
Message 39 of 41
(1,559 Views)

I'm fairly certain that the DLL approach is not what I want.  Ideally, I'd like to run 'n' instances of the exe version of my application but I want them contained within the tab control of another application (factory) so that the user can select the desired tab instead of having to go to the Windows task bar and hover over each instance and try to figure out which is which.  The only way I found to do that was to use VIT and sup-panels, but I get resource conflicts (probably due to some re-entrancy I'm not accounting for).  I think with the exe, it will take care of all the re-entrant issues.  That's why I'd like to go that route if possible.

0 Kudos
Message 40 of 41
(1,540 Views)