LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview crash when calling matlab script?

Solved!
Go to solution

My labview version is 8.6 , Matlab is 7.1. At first , I always get error 1047 when calling matlabscript, then I downloaded recommended matscript.dll(7.1.0.2) and override the original one (8.6) with this one. The error 1047 doesn't happen again. And the matlabscript code can be run. However the labview crashes after Matlab is called.

 

Actually my matlab file runs well. At the end of the matlab code, the datas should be shown in the picture. And it is. But after the picture is shown, my labview crashes ,and when I reload the labview, it only prompts me " the last time you run labview, it did not shut down normally. The following files were automatically saved and are available for recovery"

I even used process monitor recommended. But I can not find any reason. I deleted the output of scriptnode, it does the same.

 

anyone has some suggestion. I really appreciate your help.

 

Jessie

0 Kudos
Message 1 of 7
(4,861 Views)
even if I delete the plot code of matlab, it still works the same.
0 Kudos
Message 2 of 7
(4,833 Views)

Hi Jessie,

 

Do you get a message like the one in the link below?  

 

Where is the Error Log File Saved After a LabVIEW Crash?

http://digital.ni.com/public.nsf/allkb/7E9EBE4CA3B6DCE786257633005E7121?OpenDocument

 

Also, since you were getting the 1047 errors, following the troubleshooting steps in the link below might help.

 

Why Do I Get Error 1047 When Trying to Use The MATLAB script node in LabVIEW?

http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53?OpenDocument

 

Take a look at those documents and see if they provide any insight.  If you find that you are getting a CPP error please let me know.

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
Message 3 of 7
(4,823 Views)

Hi,

     Maybe my first post made you confused. 

     Actually, the first time  I load my matlabscript, it showed 1047error. And I read the "Why Do I Get Error 1047 When Trying to Use The MATLAB script node in LabVIEW" , then I followed the instruction and used the recmmended downloadable matscript.dll to override my original one. the 1047 error never showed up and the matlabscript can be run afterwards.

      However, the problem is that after my matlabscript runs, my labview closes all of sudden without any information.

      And then , I read articles "Where is the Error Log File Saved After a LabVIEW Crash" , but I found that there is no error log file .

      And also I used process monitor recommended in the article "Using process monitor to obtain information about a labview crash that doesn't generate a CPP log ", I still cannot find any information about this crash.

 

     When I reload my labview, it only prompts me to recover that file.

 

        So I came here for help from you. Thanks for your patience.

 

Jessie

     

0 Kudos
Message 4 of 7
(4,811 Views)

Why did you replace the matscript DLL with an older version? That makes no sense. The revised matscript DLL that's on the NI site is for older versions of LabVIEW and Matlab, not for current versions.

 

Do the Matlab examples that ship with LabVIEW work? What does your Matlab script do?

Message 5 of 7
(4,801 Views)

Hi,

     Before I replaced my matscript.dll (8.6) with the downloadable one which is 7.1 version, the two matlab examples can not work. However, after I replaced the matscript.dll, it can work. And error 1047 didnot show up.  I am also wondering why this happened.

 

    My matlab program is an optimization, it takes about 20 seconds to run. I used linear programming toolbox in it.

 

     But would anybody upload the matscript.dll (8.6) for me? My bad, I replaced it without backup.

 

     Thanks.

 

Jessie

0 Kudos
Message 6 of 7
(4,787 Views)
Solution
Accepted by topic author flysinger
I would suggest deleting the matscript DLL that you copied over and running a Repair on the LabVIEW installation to see if that replaces missing files.
0 Kudos
Message 7 of 7
(4,778 Views)