NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Small floating point numbers in StationGlobals

Very small floating point numbers are represented in TestStand in exponential notation, e.g., 4.518658784946e-316.

TS2012 and TS2014 (64-bit) read these as 0 from a StationGlobals.ini in INI file format.

Both fail to read these from a StationGlobals.ini file in XML format with the following message:
"XML value on line NNN character MM is the wrong type. Floating point number expected.

The station globals file ... could not be loaded."

I did not check the behavior with a binary StationGlobals file.

For the application in question, we can live with those values read as 0, as they have to be recreated at runtime anyway. However, we would like to use XML format for easier comparison of changes. Is this a known issue?

Best regards

Peter

0 Kudos
Message 1 of 3
(3,385 Views)

 

I have not actually tried XML specifically, but I tried the Sequence Editor variables view and an expression in a statement step.   You cannot enter your example number (4.518658784946e-316) either of those places.  I searched our bug database and this is a known issue.  We discovered this internally a little while back, but the bug has existed since TestStand 1.0.  Since nobody outside our group had noticed for over a decade, the issue was deemed low priority.  I will add the notes from this conversation to the bug and raise the priority.  At present, I am not sure which version of TestStand it will be targeted to. 

 

FYI, the general nature of the bug is that the number of digits in the significand minus the exponent cannot be less than -308.  (I am simplifying just a bit, but that is the gist.)  1.0e-307 will work.  1.00e-307 will not.   Note that because this is a string parsing bug, adding zeros does make a difference here.

 

0 Kudos
Message 2 of 3
(3,343 Views)

Thank you.

0 Kudos
Message 3 of 3
(3,334 Views)