Can I control a labview executable with matlab?

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.

 채택된 답변

Mitch Lautigar
Mitch Lautigar 2022년 5월 17일

0 개 추천

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

I have to admit I'm not quite sure what pass inputs/outputs fully entails. Would it be possible to essentially push the buttons on the labview program with matlab?
No. MATLAB can directly link with an in-between software (like an arduino) and pass data live, or MATLAB can pass data to a file which labview then opens.
I feared as much. Thanks for you answer :)
No problem. Glad I could help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 LabVIEW에 대해 자세히 알아보기

제품

릴리스

R2020b

태그

질문:

2022년 5월 17일

댓글:

2022년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by