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.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric Test Failure on VAL("")

Solved!
Go to solution

The following will show how to cause a failure on a Numeric Test that contains an invalid number.

 

In the Post-Expression of your message box:

Val(Parameters.EnteredData,Locals.ValidNumber),
Parameters.EnteredData=(Local.ValidNumber?Parameters.EnteredData:"NAN")

The Numeric Test that follows has the usual Data Source code:

Step.Result.Numeric=Val(Parameters.EnteredData)

This will however replace any entered input to "NAN" in the results/reporting field. "NAN" string through VAL() converts it to "Not A Number".

 

This example uses Parameters, but would be better as a Local.

0 Kudos
Message 1 of 2
(2,875 Views)
Solution
Accepted by topic author Foreshadow20

Solution in the First Post.

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