LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab script problem after maintenance release

I've been having a problem with Matlab script nodes...
After upgrading LV 7.1 to 7.1.1 and performing the mass compile per the maintenance release instructions, all data passed to Matlab scripts are received by Matlab (v6.5)  as complex arrays. This has been causing errors in many VI's that worked fine before the upgrade. An example of which is the "MATLAB Script - Lorenz Diff Eq.vi" example. This VI now returns the following error:
"Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: ??? Error using ==> char
Complex values cannot be converted to chars."
 
The script input, s, though defined as a real vector is received by Matlab as a complex array thus causing the first line of the script (pa=char(s)) to error out. Prior to the upgrade this worked without error and I could pass any data type I wanted to Matlab (including real and string).
 
Has anybody else experienced this problem?  Are there any solutions other than removing the maintenance pack or converting each input from complex to real in the script?
 
Thanks - Ryan
0 Kudos
Message 1 of 11
(3,445 Views)

What does the right-click pop-up menu at the input at the Matlab node says? It is Real or Complex?

cheers

Pawel

 

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

Hello Pawel.

The input node says Real Vector. NI's tech support has replicated this problem (by trying the Lorenz example after the 7.1.1 upgrade), and is working on a fix.

According to NI, the two fixes are as mentioned in my original post, either remove the 7.1.1 maintenance patch, or change the data type from complex to whatever it should be within the script node (i.e. real(x) for real vectors, char(real(x)) for strings).

If anybody has run into a better solution, I'd like to hear it. If not, I'll roll back to 7.1 and wait for a fix from NI.

Thanks,

Ryan

Message 3 of 11
(3,424 Views)

I am using MATLAB 7.1 and had the problem before and after installing the maintenance patch. I cannot get the MATLAB-script to work at all. Both examples do not work. With "DifferentialEquation" I get 1047 and with "Fractal" I get 1050.

Greets,

Birk

 

0 Kudos
Message 4 of 11
(3,352 Views)
Birk,
 
What service pack of Matlab 7.1 are you using? I think this issue is resolved in SP3. We held off on our Matlab 7.1 migration due to problems with the LV-Matlab interface. I just tested the two examples using Matlab 7.1SP3 and LV 7.1 and they both completed without error.
 
Best of luck,
 
Ryan
0 Kudos
Message 5 of 11
(3,343 Views)

Ryan,

I am already using SP3 on MATLAB 7.1. Maybe it has something to do with the operating system? It's WinXP Professional, Version 2002, SP1.

Thanks,

Birk

 

0 Kudos
Message 6 of 11
(3,333 Views)
Same platform here.
Is the Matlab command window opening when you load one of the example VIs? I was able to replicate the error codes you received by closing the command window on my machine after the VIs loaded and then running them.
 
Here are some links to look into for help:
 
Best of luck,
 
Ryan
0 Kudos
Message 7 of 11
(3,325 Views)

Hi Ryan!

MATLAB is not launching automatically. If I launch it before or after launching LabView or not at all doesn't make a difference.

Thanks!

Birk

 

 

 

0 Kudos
Message 8 of 11
(3,319 Views)
At least the problem is identified now! Refer to the NI support messages I previously posted to get Matlab to open automatically when using a Matlab script node. If you can pull that off, your problem should be resolved.
 
Ryan
0 Kudos
Message 9 of 11
(3,317 Views)

Hi Ryan!

Even with the downloaded matscript.dll it is also not working. I guess the problem is ActiveX. Maybe for some reasons the system prevents execution because it looks unsecure? Could that be?

Thank you so far!

Birk

 

 

 

 

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