LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error using Matlab Node

Please help.  I am getting a couple errors using the Matlab script node in my.vi file.

 

1) First, I am getting an error message telling me to use fopen to generate a valid file identifier.  I am able to bypass this with by removing the semicolon after the first line of the script, as shown below.  Although I do not understand why this works.

 

2) With the semicolon removed, I am now getting an error message stating I have an undefined function or variable 'Y'.  I am completely stumped.  Please help!

 

sample.jpg

0 Kudos
Message 1 of 6
(2,372 Views)

The 'X' should not be enclosed in single quotes. You are passing in a string, and this is what you want the first parameter. As you have it, the filename is "X".

 

I have no idea about the error with Y. I can enter a simple Y=max(0,2) and have a Y output and it works just fine. What version of LabVIEW are you using, and what version of Matlab are you using.

0 Kudos
Message 2 of 6
(2,368 Views)

I am using Labview Version 10 and Matlab 2009b.

0 Kudos
Message 3 of 6
(2,358 Views)

OK... Did you make the correction I mentioned?

0 Kudos
Message 4 of 6
(2,356 Views)

Yes, I still the get same error:  'undefined function or variable Y'

0 Kudos
Message 5 of 6
(2,354 Views)

Hello krang,

 

Have you been able to get a simple function working correctly using the Matlab Script?  For example, can you try just feeding it a numeric constant x, do a simple y = 4+x then grabbing y?

 

David A.

 

 

 

0 Kudos
Message 6 of 6
(2,336 Views)