NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert string (having Hex data) into number?

Solved!
Go to solution

Hello,

 

I am using TestStand 3.5 to automate few test cases related to boot loader.

The requirement is I need to read the value at some specific address locations. The values of these addresses are of stored in Hex format.

We have a customized step in TestStand through which we can read these values by address, but it returns the value as "String" type.

E.g. The value at 0x0000008 is 000001B2, and it is returned in Locals.Value_Read as "000001B2" in string.

 

Is there any way, I can convert string "000001B2" to a number?

I tried using the function -> val(locals.Value_Read), but it is returning 0 as TestStand figures out that the input string is not representing the valid number.

 

Please help me out with this.

 

Thanks and Regards,

Niraj.

0 Kudos
Message 1 of 3
(10,339 Views)
Solution
Accepted by topic author Niraj2810

Try: Val("0x" + Locals.Value_Read)

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(10,335 Views)

Thank you. It works.

0 Kudos
Message 3 of 3
(10,331 Views)