LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Compile VI with mathscript problem

Hello,
 
I have a VI that has one line of mathscrip code in it (x=str2double(a)).  When I run the VI in Labview it works just fine, but when I compile it I get a NaN for output.  I made sure to check the enable mathscript support in the advanced tab of the properties in the exe.  I am using Labview 8.2.  Any idea what could be going wrong during the compile?  Also just to make sure the mathscript was the problem, I created a new VI with only the one line of mathscript code and a constant for the input and I get the same problem.
 
Thanks in advance,
Mike
0 Kudos
Message 1 of 4
(7,377 Views)
Well, it seems to be a problem with the str2double function.  I changed it to str2num and it works just fine. Smiley Tongue
0 Kudos
Message 2 of 4
(7,374 Views)
Hello Mike,

You have identified a problem with the str2double function.  It is currently not supported in the run-time engine.  However, it is not appropriately blocked from executing.  Consequently, it returns NaN instead of an error code.  Our documentation is also incorrect.  It should list str2double as not being available in the run-time engine.  We will look into making the function behave consistently with the various pieces it should work with (e.g. desktop, built-app, etc.).  However, since, as you mention, str2num works in the run-time engine, perhaps str2double can be made to work as well.  We will look into implementing this for a future release.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
Message 3 of 4
(7,369 Views)

Hello Grant

I have Labview 2011 with Mathscript module , and i can't get str2dobule to work, it seems that you still haven't been able to fix this problem, am i right? Is there an alternative for using this command? thanks!

0 Kudos
Message 4 of 4
(5,966 Views)