NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional Results Step: Log Number As Hex In Report

I am trying to use the Additional Results teststand step to log an Array element (which is a cluster of numeric values) after it is iterated through a for loop. The problem is that I want the value to be displayed as in HEX format not decimal. So instead of logging "2015" in the report I want it to log "0x7DF" Instead. See my current step settings below:

 

Step Settings.png

 

Any idea how to force the step to log these numeric values in hex format?

 

Thanks

0 Kudos
Message 1 of 5
(3,095 Views)

Try right clicking on the local variable field, select Numeric Format, and choose hex.  That worked to get the hex format into the report for me in a simple test case.

0 Kudos
Message 2 of 5
(3,065 Views)

I have tried that and it doesnt seem to have any impact on the logged result in this case. Also how would this work in a case where the local is an array with an "empty" bounds? My point is I don't think that is a very flexible solution unfortunately.

 

Thanks

0 Kudos
Message 3 of 5
(3,059 Views)

I'm not sure about the details of your sequence, but I've attached a sequence that logs locals.a, which appears in the report as decimal. It also logs locals.hexformat = locals.a, which logs the same value but it appears in the report as hex.

0 Kudos
Message 4 of 5
(2,998 Views)

You can try

str(variableName, "%x")

Best Regards
Sumit Memane
CLAD, CTD
0 Kudos
Message 5 of 5
(1,146 Views)