NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

check string for number

Solved!
Go to solution

Hi,

 

In my application, TestStand receives a response from a DLL I call. This DLL can either return a numeric value (casted in a string), like "120" or some text casted in a string, like "ERROR". I would like to make the test step fail, if the returning string is NOT a number.

Anyone any clues on how to do this? I looked for something like a IsNumeric function, but could not find one.

 

Jeroen 

0 Kudos
Message 1 of 2
(3,692 Views)
Solution
Accepted by topic author Jeroen_Mechatronics

Hi,

 

You can use the function Val(string, <isValid>) in an expression to convert your string to a value. Check the help for this function.

Regards
Ray Farmer
Message 2 of 2
(3,688 Views)