LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview crashes when Matlab output is array

Solved!
Go to solution

Hi,

 

I'm struggling for a while with Matlab script and arrays. When I use arrays for outputs Labview crashes without any error message. I have attached a sample VI which crashes. Can someone tell me how to fix this? I need a Matlab script that can return 1D arrays.

0 Kudos
Message 1 of 4
(775 Views)

I'm attaching another VI which doesn't work and crashes Labview. I don't understand what I'm doing wrong?

0 Kudos
Message 2 of 4
(754 Views)

It's likely the same thing I mentioned here:

https://forums.ni.com/t5/LabVIEW/labview-crashed-when-attempting-to-send-array-to-matlab-program/m-p...

Some form of mismatch of the array dimensions (1D vs 2D) and the data type itself. Matlab is probably creating a 2d array in this case.

0 Kudos
Message 3 of 4
(752 Views)
Solution
Accepted by topic author walchu

This post helped me solve the problem: Solved: Re: Using array as a MATLAB script input in a subVI - labview crashes - Page 2 - NI Communit...

 

I replaced MATLAB script node with MATLAB function and the error dissapeared.

0 Kudos
Message 4 of 4
(680 Views)