LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variables not correctly sent to Matlab script server

When using a Matlab script node in my LabVIEW code, I've noticed that variables are sometimes improperly sent to the script server. What happens is an m-by-n matrix in LabVIEW arrives in Matlab as a 0-by-n or 0-by-0 empty matrix. Typically the affected matrices are large -- 500 to 20,000 elements.

Unfortunately, we haven't been able to recreate the error intentionally. On the other hand, when the error does occur by chance, it frequently continues to show up until the system is rebooted.

This error has appeared using the same code on multiple systems, all of which are running Matlab 6.1 and LabVIEW 6.0.2.

If anyone has encountered similar problems or has any insight into this problem, your help would be
greatly appreciated.

Zach Lerner
OnWafer Technologies, Inc.
0 Kudos
Message 1 of 4
(2,943 Views)
I encountered this problem several times too.

I passed a 'real vector' of size ~80 to a MatLAB input node, and it turned out to be a 0-by-0 empty matrix in MatLAB. This happens nearly every time after I reboot the computer.

What I do is first to find out which variable is empty (from the MatLAB command window). Then stop the VI and rewire that input node.

p.s. I have LabVIEW 6.0.2 with MatLAB 6.0.

Dan
0 Kudos
Message 2 of 4
(2,943 Views)
oh and that problem only happens on the PXI running that VI.
There's no problem when running the same VI on other PCs with same versions of LabVIEW and MatLAB

dan
0 Kudos
Message 3 of 4
(2,943 Views)
I get the same problem when passing a 'real vector' to a Matlab script. I am running labview 6.0 and matlab 6.0.0. There is an ActiveX problem with matlab 6.1, but there is no solution posted for matlab 6.0. I send about 10 arrays with 200,000 elements to matlab and sometimes some of them show up as 0x0 empty matrices.

-David
0 Kudos
Message 4 of 4
(2,943 Views)