LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting -90031 (can't find function) error from Mathscript node when running executable, but works when I run the pre-compiled VI

I have set the Mathscript preferences 'Path' and 'Working Directory' parameters to the folder containing my scripts, and it works when
I run the VI, but I get a -90031 error when I run the executable.
 
What am I doing wrong?
 
 
0 Kudos
Message 1 of 4
(3,337 Views)
Hi Umars,
 
What version of LabVIEW are you using?
 
Could you please post your VI?
0 Kudos
Message 2 of 4
(3,324 Views)
Hi Umars,
 
Please take a look at the following link:
 
MathScript Functions Not Supported in the LabVIEW Run-Time Engine
 
This list of functions is not supported by the LabVIEW Run-Time Engine and therefore cannot be used in a stand-alone application. 
0 Kudos
Message 3 of 4
(3,320 Views)

Hi Umars,

 

I had the same problem. In my case it turned out that it was caused the surrounding code. Plus the error

message was missleading. I got the error message -90031 (unknown symbol CalcWelchCorr2) for the

following piece of code:

 

ecorr= 1;
if setup & src== 1

   for lag= 1:50

   rho=  CalcWelchCorr2( lag, win );
   if rho > 0.001, ecorr= [ecorr; rho]; else, break; end
end

 

CalcWelchCorr2 is a user defined function located in the MS search path. The problem was caused by the

"break" in line 5. Actually this line was marked by some little warning symbol. Eventualle I modified the code

to get rid of the break

 

ecorr= 1;
if setup & src== 1

   lag= 1; rho=  CalcWelchCorr2( lag, win );
   while rho > 0.001 && lag <= 50

      ecorr= [ecorr; rho];
      lag= lag+ 1; rho= CalcWelchCorr2( lag, win );
   end
end

 

and voila, the executable worked fine.

 

However, I had to check all my VIs ( > 200 !) for similar errors which gave me headaches.

Why does the application builder doesn't produce some appropriate error message ?

E.g. "Line xxx in MathScript node in VI xxx cannot be executed"? Currently you get the

impression that the application was build successfully but eventually you get strange errors

or even erroneous results. Keep in mind that tracking down bugs in the final application is

much more difficult that in LV. Also the error message produced by the executable was not

helpfull at all.

 

 

 

 

0 Kudos
Message 4 of 4
(2,999 Views)