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.
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.
03-13-2015 07:49 PM
Hello,
I haven't done this for a while and it's not working like expected. I'm trying to "Open VI Reference" from executable A.exe to B.exe. I'm trying to get a control value from B.exe in A.exe. Can someone send me an example?
Right now I'm at this stage: I have A.exe running as a LabVIEW executable. I'm trying to "Open VI Reference" to A.exe from LabVIEW development without success. Not sure what I'm doing wrong.
Don't hesitate to ask more info if you need some.
LabVIEW 2012, Windows 8.1.
Thanks,
Michel
Solved! Go to Solution.
03-13-2015 08:25 PM
You need to refeernce the VI that is INSIDE of the exe. If your exe was built with the 8.x format, then the the VI's location will be A.exe\blah.vi. If in the newer format, then you need to know the directory structure of the project to get the the VI you want since the newer formats make the executables like a zip file.
03-13-2015 08:27 PM
03-13-2015 08:31 PM
03-13-2015 08:36 PM
I don't think you can do this with executables. "Open VI by Reference" is analogous to calling the VI by putting its icon on your block diagram. What you are trying to do is to execute another executable (which has nothing to do with LabVIEW -- it could be any executable, such as Microsoft Word). You could uses a System Command (that may be the wrong term), something like going to a Windows Command Prompt and typing the name of the program (the Executable) that you want to run, but it is a little clumsy.
BS
03-13-2015 08:49 PM
03-13-2015 09:41 PM
Once you have an Executable, does it matter that the underlying Development system is LabVIEW, rather than (say) Visual Studio, or Matlab? I suppose you could write an application that "knows" to, for example, listen to a TCP/IP port and interpret/execute commands, but that doesn't sound like the question being asked.
BS
03-13-2015 10:30 PM
@Bob_Schor wrote:
Once you have an Executable, does it matter that the underlying Development system is LabVIEW, rather than (say) Visual Studio, or Matlab? I suppose you could write an application that "knows" to, for example, listen to a TCP/IP port and interpret/execute commands, but that doesn't sound like the question being asked.
BS
LabVIEW-built executables still run as VI's in the RTE, though. Their identities have not been abstracted away into one single object or anything, and they still have name-based VI server access.
You can configure a build specification to include almost nothing, and require the VI files to be present in expected locations (i.e build specification's data or support directories). By default, all items in an executable application build specification are set to be put in the same location as their caller, which results in most things going into the .exe file, internally referenced in a directory-esque form like crossrulz mentioned, "MyExecutable.exe\MySubVI.vi".
03-13-2015 10:58 PM
03-13-2015 11:31 PM
Hello,
Lot's of answers, thanks. The 2 executables are LabVIEW built. I have tried different path option but nothing is working, I must miss something simple here. I will try tomorow with two simple LabVIEW executabe and report the status.
Good night,
Michel