Can I control a labview executable with matlab?

11 views (last 30 days)
I'm aware this is a bit of a long shot, but it wouldn't be the first time matlab's capabilities have surprised me.
For a project, I have to make rovibrational fits to a nitrogen optical emission spectrum. The problem is that I have several thousand spectra and more to come. It would take me weeks to process them manually and so I want to automate this using Matlab. I got a program that can do these fits, but it is a labview .exe file and I have not received the source code. I was wondering if it is still possible to connect the two.
What I would like to do:
- Have Matlab give LabView a file
- Tell LabView to make a fit (the program has a designated button for this, if that helps)
- Save or extract the fitted parameters (it has a button for this as well)
- Save or extract the fitted curve (also a button)
e=actxserver('LabVIEW.Application');
vipath='C:\Users\...\fit_spectra_N2_SPS_main.exe';
vi=invoke(e,'GetVIReference',vipath);
Obviously this wants a vi, so I tried finding what sort of method the ‘.exe’ file would be, but couldn’t find that. If I try it like this, I get the error:
Error using COM.LabVIEW_Application/GetVIReference
Invoke Error, Dispatch Exception:
Source: LabVIEW
Description: LabVIEW: (Hex 0x423) Unexpected file type.
I've also tried a suggestion on the National Instruments website (https://forums.ni.com/t5/LabVIEW/MATLAB-calling-subVi/td-p/906758) But that seems to only change the way the invoke function is called. Either way, it gives me the exact same error.
After a lot of googling and coming up empty-handed, the last thing I tried was ask a friend who - though he's not very familiar with matlab - has a lot of programming experience. He expected it to be impossible, but recommended I ask here regardless.
So is it possible to control a labview executable (which I do not have the source code for) with matlab?
If it does happen to be possible, can you point me in the right direction to get started? Because I honestly have no idea how to go about it anymore.

Accepted Answer

Mitch Lautigar
Mitch Lautigar on 17 May 2022
MATLAB and LABVIEW are two very distinctly different programs. If you wanted to pass inputs/outputs, you could do that. But having MATLAB call a labview program is impossible.
  4 Comments
Wouter Meekes
Wouter Meekes on 17 May 2022
I feared as much. Thanks for you answer :)

Sign in to comment.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!