07-10-2009 01:00 PM
Hi:
I am looking for a way to pass a null value as a result in a multiple numeric test limit type of test. My tests are written in Labview.
The tests currently pass a value of "-999" to TestStand to signify that this measurement was not made, but this requires additional processing and code in our database analysis tools. Passing a null value would simplify the tool and reduce the amount of work.
Thanks,
Mike
Solved! Go to Solution.
07-10-2009 02:58 PM
You could pass NaN instead. At least I think you can. Teststand supports NaN, but I've never passed it through the Labview adapter, so I'm not 100% sure if that will work. NaN is processed in labview limit tests as follows (hat tip to James Grey here😞
(NAN > x) == false
(NAN == x) == false
(NAN < x) == false
(NAN == NAN) == true
I'm not sure how it would be processed when writing to a database though. I suppose it depends on the database and what special numeric values it supports. A quick search shows that Sybase doesn't support NAN (not sure if it would throw an error or what), MySQL stores NAN as NULL in numeric fields, SQLite stores NAN as a special string code, Access stores it as NAN.
So you may still have to write a step to translate NAN's to Nulls, but I think it would be easier to write and maintain than vs. some arbitrary number.