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,882 Views)
Solution
Accepted by topic author Foreshadow20

Solution in the First Post.

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