LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read input from executable to separate VI

Hey,

 

So I'm trying to read some information into my VI from an executable that was made by a third party using LabVIEW.

 

The .exe (Fianium AOTF Controller) allows the user to activate/deactivate any one of a set of channels to choose what wavelength of light should be output by a laser (so a set of clusters, each containing a wavelength numeric control and a de/activate Boolean control). In my own VI I want to read which wavelength is being output (the wavelength control value for the channel that has Boolean control TRUE).

 

I believe I have the all the VIs/sub-VIs that were used to build the .exe, and found one that outputs a so-called 'megacluster' of parameters including the wavelength and status of each channel. I have tried to use this sub-VI in my own VI to read these parameters (see attached section of code), but the issue is that apparently the .exe no longer updates the values in this sub-VI, so all channels remain in the default inactive state and I read that no light is being sent—output of my attached .vi is always 0, regardless of active channel.

 

While a possible solution is to use the .vi version of the laser software (instead of .exe) to control the light being output, I wondered if there is any way of successfully reading this information from the .exe so that another machine wouldn't need to have all the laser VIs/sub-VIs to be able to run my VI.

 

Thanks,

Kenneth

0 Kudos
Message 1 of 3
(2,244 Views)

It sounds to me you have a wrong idea about VI's.

 

When programming LabVIEW, VI's live in LabVIEW.exe. When you build an executable, the VI's live in the executable. Those VI's will not communicate with each other. To establish communication, it needs to be build, for instance with TCP\IP, shared variables, memory mapped files, etc..

 

There are ways to hack your way into executables, and it helps that you seem to have the source code. It might be easier to recompile the executable with build in communication so you can read it from other applications.

 

The way to do it is to:

a) make a VI that get's the information and communicates it. Drop the VI on the exe (from windows explorer) and it will run in the executable.

b) use an application reference, and try to use VI server to get the information.

 

In both cases, it could get complicated. Note that it is likely that the compiler removed the front panel of the VI(s) you want to get information from. So a lot of the usual VI Server candidates are not working...

0 Kudos
Message 2 of 3
(2,226 Views)

If you have the VI's it should be easy enough to create a new application which uses those functions. If you have the code i'd wager that's the most common case.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,216 Views)