ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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
(1,476 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
(1,455 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
(1,453 Views)
Solution
Accepted by 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
(1,381 Views)