LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview matlab crash

When running a matlab script, labview crashes. No labview error number appears. I have matlab 2013 on my Windows 7 computer and I am running labview 2013, as well. The error log file reports: ExceptionCode: 0xC0000005.

 

I have attached a copy of my labview code. However, even when I replace approx_entropy with mean, I still get the same error, which suggests that it is not a problem with the matlab file, but with the labview call of matlab. When I disable the matlab script in my labview code, it works just fine. 

 

 

Download All
0 Kudos
Message 1 of 11
(3,808 Views)

Do you get any more/different informaiton by wiring an indicator to the mathscript error out?

 

When you say "LabVIEW crashes", do you mean you have to restart your VI or you have to restart the entire LabVIEW program?

0 Kudos
Message 2 of 11
(3,793 Views)

Unfortunately, I do not get any more/different information by wiring an indicaator to the mathscript error out.

 

I have to restart the entire LabVIEW program.

 

If it helps, I am loading a one-D array from a text file and wiring it into the matlab script.

0 Kudos
Message 3 of 11
(3,789 Views)

Can I have you test two things?

 

1. Create a blank script node in a new VI.  Does this cause a crash?

2. If number 1 does not caues a crash, create a script that adds two numbers together and outputs them.  Does this crash?

 

0 Kudos
Message 4 of 11
(3,748 Views)

Shane,

 

I just tried that, neither causes it to crash. In fact, I can create an array constant and run it into my Matlab Script and it does not crash. However, when I load data from a txt file and then into the Matlab script, it causes it to crash.

 

Thanks!

0 Kudos
Message 5 of 11
(3,745 Views)

That seems odd.  What if you manually specify a file path on the block diagram instead of allowing the pop up window?

0 Kudos
Message 6 of 11
(3,737 Views)

Even when I manually select a file path, it still crashes. Now I am not even getting an error window. LabView just closes itself without any further display.

0 Kudos
Message 7 of 11
(3,711 Views)

@jcaccese wrote:

Unfortunately, I do not get any more/different information by wiring an indicaator to the mathscript error out.

 

I have to restart the entire LabVIEW program.

 

If it helps, I am loading a one-D array from a text file and wiring it into the matlab script.


"Mathscript" and "matlab script" are two very different things. You are using a matlab script. I don't have matlab on this computer so I cannot test your code. If I replace the matlab script node with a mathscript node containing the same code, the result is fine. No crash.

 

Why do you have inputs to the script node that are not actually used?

 

Is your matlab 32 or 64 bit?

0 Kudos
Message 8 of 11
(3,698 Views)

I do not have inputs that are not actually used. My inputs are m,r,x and the Matlab file is ApEn=approx_entropy(m,r,x); 

 

I am running Matlab 2014 (32 bit). 

0 Kudos
Message 9 of 11
(3,650 Views)

Have you tried Altenbach's other suggestion of switching the node you are using?

0 Kudos
Message 10 of 11
(3,617 Views)