NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

set the NumericFormat property

Hi,
I am writing a C# Programm  that is supposed tocreate a Teststand sequence  with some steps. One of the steps is a Numeric Limit Test. Since i want to test several types ( Hex,integer, Real )  i want to customize the Numeric Format (fractional Digits, Field With) for each Test, so that the Step can handle and  display the numbers with the right format.
I tryed to set the Property NumericFormat, but i became the error Expected Number, found Container   .
I hope somedy can help me.
I am using Teststand 3.5.
Regards,
Noubissi André
Teststand 3.5
Visual Studio 2005
0 Kudos
Message 1 of 5
(3,930 Views)
Hi,

I don't understand wich step is causing the error.

To set the numeric format of a step you should :
  • Get the step as a property object.
  • Get the "Result.Numeric" property object.
  • Set the numeric format as a string (the syntax is identical to the format string that the C printf function accepts).
I use only property objects and a string. I don't use any number or container.
Maybe the data source of your numeric limit step is not a number but a container. But you should have the error even if you don't set the numeric format.

Bruno
0 Kudos
Message 2 of 5
(3,886 Views)

Hi,

You have to make sure you have an property object to the Step.Result.Numeric, or the Step.Limits.Low or Step.Limits.High properties.

If you use say the Step.Limits property you would get the error 'found container' if you try to set the format.

Hope this helps

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 5
(3,883 Views)

HI,

thank you for the reply, i've  already solved the problem.

Regards,

Noubissi 

Teststand 3.5
Visual Studio 2005
0 Kudos
Message 4 of 5
(3,878 Views)

Hi Bruno,

 

Could you explain more in details how you achieve these two steps : 

  • Get the "Result.Numeric" property object.
  • Set the numeric format as a string (the syntax is identical to the format string that the C printf function accepts).
Thanks a lot !
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 5 of 5
(3,344 Views)