LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep matlab open after doing some calculations over ActiveX

I am using LabVIEW 7 Express and I am trying to interface with MatLab to do some calculations. The connection works fine, but when I stop the software, it closes matlab, which is a bad thing. Is there a way I can keep matlab open after the labVIEW software stops? Any thoughts would be appreciated as long as it does not involve placing the matlab script in a script node.
0 Kudos
Message 1 of 3
(2,616 Views)
I have not investigated this angle myself because I do not have Matlab on my machine. What I am thinking is calling Matlab via ActiveX Automation Reference rather than using the node in LabVIEW. This will be a particullary challenging way to solve the problem but it will allow Matlab to remain open after LabVIEW exits. You may need to dig through mathworks site for more specific information.
0 Kudos
Message 2 of 3
(2,616 Views)
I have found exaclty the same problem with all versions of Labview and matlab 6.5 (running in /automation mode). It appears that Labview closes TWO ref nums instead of 1.
A simple solution - when you start matlab get it to run a script which does
KEEPME = actxserver('matlab.application');
As long as KEEPME is not cleared, then the matlab sessions remains valid. I will report this bug to NI who are also trying to fix a problem with Matlab 6.5 - without previous installations of earlier versions of Matlab then there is no communication either through activex or through script. Doing upgrades from earlier versions works fine though : it appears to be something related to IDISPATCH interfaces.
Marc
0 Kudos
Message 3 of 3
(2,616 Views)