What is the Syntax in .xml File if I Want to Show Hex Format for Number in TestStand?

Updated Apr 1, 2025

Reported In

Software

  • TestStand

Issue Details

When I use Building a Sequence Using API - XML.seq to generate a seq file, I want to show number data in a Hex format like below. What is the syntax I should follow?
 

Solution

When a user modifies the "Numeric Format" in the step settings pane in SeqEdit, it updates the "NumericFormat" property for the following four

  • Step.Result.Numeric

  • Step.Limits.Nominal

  • Step.Limits.Low

  • Step.Limits.High

To achieve the same behavior when creating a sequence file using the example "Building a Sequence Using API - XML.seq", you should set the "NumericFormat" for the above four properties in the XML as shown below:
 
 <Prop LookupString="Limits.Low">0XC223</Prop>
<Prop LookupString="Limits.High">0XC233</Prop>
<Prop LookupString="Comp">EQ</Prop>
<Prop LookupString="DataSource">Step.Limits.Low</Prop>
<Prop LookupString="Result.Units">Hex</Prop>
<Prop LookupString="Limits.Low.NumericFormat">%#x</Prop>
<Prop LookupString="Limits.High.NumericFormat">%#x</Prop>
<Prop LookupString="Limits.Nominal.NumericFormat">%#x</Prop>
<Prop LookupString="Result.Numeric.NumericFormat">%#x</Prop>
 
The "%#x" value for "NumericFormat" represents hexadecimal. The numeric format string is identical to the format string that the C printf function accepts. Same is also mentioned in TestStand API Reference: https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/tsref/numeric-format-dialog-box.html
 
Example:
 
 
Identifying Changes Made in the UI
To understand what changes occur when you modify a setting in the UI, follow these steps to identify the underlying properties that are modified so you can replicate the same:
 
1. Create a sequence file with a numeric limit step.
2. Create a clone of the sequence file and, in that copy, modify the numeric format using the UI.
3. Use the TestStand Sequence File Differ to compare the two files.
 
The differences will highlight all the changes made for modifying the numeric format. These are the changes you need to replicate to achieve the same.