LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run executable in tab control

Hi all,

 

I'm developping a vi for my internship that collects data from different voltage based measurements connected to NI cDAQ boxes, firewire cameras, USB microscopes and a Fiber Bragg Grating scanner connected zith USB. The cDAQ boxes are relatively easy and the cams should work with the IMAQdx extension. The FBG scanner comes with Labview based software that is converted to an .exe file. I have searched the forums and found out it's not possible to retrieve the .vi from the .exe file. Since I'd like to get everything in one application I was wondering if it is possible to run the .exe file inside a tab so that the user can acces the FBG software within the .vi I'm developping. That way the user can get all the measurements by switching between the tab control tabs. I've already studied the example with the windows calculator but I'd rather have the .exe run within tab control. Any suggestions are welcome.

 

Thanks in advance

Cedric1993

0 Kudos
Message 1 of 8
(3,608 Views)
It isn't really possible - there are some hacks that you can do around making a part of your VI transparent and positioning your executable in the transparent area of the VI I believe. There's some more information about it here: https://lavag.org/topic/19189-see-an-exe-front-panel-in-another-exe-front-panel/ I'm pretty sure it's going to be really hacky to get it working in a tab control (hiding window when tab not selected)/

How many other applications do you know of where you can run another program 'inside' of another? It's normally done through some sort of .NET container / ActiveX control but if the program you're using doesn't have one (the VI Server ActiveX might be turned off in their executable) then it won't be possible.

You would have a more reliable and robust solution if you were to contact the manufacturer of the scanner and implement the interface to the scanner yourself as part of your own application - they did it in LabVIEW so it's definitely possible!

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 8
(3,592 Views)

I'm limited in time so rewriting the whole software for the scanner in labview isn't possible. Also I'm a newbie concerning labview so I doubt I'd be able to pull it off anyway. I'll check out the "hack" and container options you mentioned and contact the manufacturer of the software to see if they can help me out with the vi of their program. Otherwise I'll have to run the 2 programs seperately. Thank you for the quick reply though.

0 Kudos
Message 3 of 8
(3,573 Views)

This might help.

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

I found out the executable had something called shared variables which I should be able to access from the .vi I'm writing. Don't really know how it works yet but I'll probably be able to figure it out. Other problems to figure out first though. Thanks for the help.

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

Hi Cedric,

 

For the usefulness of others, you probably should unmark your selected solution. It does not address the problem that was posed, it simply says "actually, I don't need to do that anymore." Also, if someone knows a better way of doing what you are asking, they may not even look at the thread and chime in because they see the question was already "solved."

0 Kudos
Message 6 of 8
(3,462 Views)

@Cedric1993 wrote:

I found out the executable had something called shared variables which I should be able to access from the .vi I'm writing. Don't really know how it works yet but I'll probably be able to figure it out. Other problems to figure out first though. Thanks for the help.


If you open up the 'NI distributed system manager' - you should be able to see the shared variables (they might only be there while the executable is running):

2016-02-18_11-39-28.png

 

You should be able to access the variables from LabVIEW by one of two methods:

 

1) Binding the shared variable to local shared variable library in your project:

2016-02-18_11-45-12.png

 

2) Programmatic access (the bottom example, the top example is once you've done the binding above, you can drag the variable to your block diagram):

2016-02-18_11-46-58.png

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 7 of 8
(3,424 Views)

@Sam_Sharp wrote:

@Cedric1993 wrote:

I found out the executable had something called shared variables which I should be able to access from the .vi I'm writing. Don't really know how it works yet but I'll probably be able to figure it out. Other problems to figure out first though. Thanks for the help.


If you open up the 'NI distributed system manager' - you should be able to see the shared variables (they might only be there while the executable is running):

2016-02-18_11-39-28.png

 

You should be able to access the variables from LabVIEW by one of two methods:

 

1) Binding the shared variable to local shared variable library in your project:

2016-02-18_11-45-12.png

 

2) Programmatic access (the bottom example, the top example is once you've done the binding above, you can drag the variable to your block diagram):

2016-02-18_11-46-58.png

 

 


Hey Sam_Sharp,

 

Thanks again for the help. I was able to get the variables in my .vi and once I have the hardware at my disposal I'll check if it works out but I guess it should work just fine 🙂

0 Kudos
Message 8 of 8
(3,368 Views)