From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MatLab sscript server not reading passed variable

So I have my MatLab script server that passes something called tMax.  I have a function that gets called in my code that uses this.  When I run the VI, I get.  

 

 

LabVIEW:  Error occurred while executing script. Error message from server: ??? Undefined function or variable 'tMax'.

Error in evalFunctionLabVIEW>ExpRamp (line 19)
   y = (b - a*exp(tMax / tau) + (a-b)*exp(t/tau))/ ( 1 - exp(tMax / tau) );

Error in evalFunctionLabVIEW (line 3)
y = evalin('base',expression);

 

 

 

I can then go to the MatLab command window and type who, sure enough my tMax is defined.  I am hoping someone knows why this would be occuring

 

MAtLab script server error.png

0 Kudos
Message 1 of 2
(2,119 Views)

This is strange. Is this a new project? Has this ever been working in the past? Have you seen this function work anywhere is in your code? Or a different code base?

0 Kudos
Message 2 of 2
(2,060 Views)