NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
SercoSteveB
Posts: 65
0 Kudos
Accepted Solution

Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

I am looking to set the Limit Numeric Format property (for individual steps) programmatically through the TestStand API.  The link below seems to be talking about the property I need to set (Step.Limits.Low.NumericFormat). 

 

http://forums.ni.com/t5/NI-TestStand/How-can-I-tell-that-a-default-numeric-format-has-been-applied-t...

 

Unfortunately on my TestStand 3.1 system, the property doesn't exist (or doesn't work as Raj suggests in the post).  Everything is fine on my TS 4.2.1 system.

 

Does anyone know the name/location of the property in TS 3.1.  It must exist as it is possible to modify the display format of limits in TS 3.1.  I guess it may not be possible to interact with it through the API which would be a shame.

 

Regards

 

Steve

------------------------------------------------------------------------------------------------------------------
Check out my blog at ni.com. https://decibel.ni.com/content/blogs/DailyCLAD
------------------------------------------------------------------------------------------------------------------
Member
ShalB
Posts: 102
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

Hi Steve,

 

I happen to stumble on the document below which might be helpful.

http://zone.ni.com/devzone/cda/epd/p/id/5967

 

Regards,

Shalini B
Applications Engineer
National Instruments UK & Ireland
Member
SercoSteveB
Posts: 65
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

Hi Shalini

 

Thanks for your post.  It was helpful but I am not quite there.

 

If I export a single NumericLimitTest step Step.Limits into LimitLoader format, I get the following:

 

<Step Name> Limits
Numeric Limit Test <Prop Name='Limits' Type='Obj'><Prop Name='Low' Type='Number' NumFmt='%#x'><Value>9</Value></Prop><Prop Name='High' Type='Number' NumFmt='%#x'><Value>11</Value></Prop><Prop Name='LowExpr' Type='String' TypeName='Expression'><Value></Value></Prop><Prop Name='HighExpr' Type='String' TypeName='Expression'><Value></Value></Prop><Prop Name='UseLowExpr' Type='Boolean'><Value>False</Value></Prop><Prop Name='UseHighExpr' Type='Boolean'><Value>False</Value></Prop></Prop>

<Locals> Variable Value

<FileGlobals> Variable Value

<StationGlobals> Variable Value

 

So it is the value of 'NumFmt' that I need to set, and the value I need to set it to is '%#x'.......but I am not sure what 'NumFmt' is; it is not a property, it is associated with Limits.Low (and Limits.High), but it isn't a sub property of Limits.Low as Limits.Low is defined as a Number.

 

I can successfully import the NumFmt of Limits.Low (using the LimitLoader) in TS 3.1,  but I am missing one last clue defining how it is done in the API

 

Regards

 

Steve.

------------------------------------------------------------------------------------------------------------------
Check out my blog at ni.com. https://decibel.ni.com/content/blogs/DailyCLAD
------------------------------------------------------------------------------------------------------------------
Active Participant
dug9000
Posts: 1,526
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

TestStand 3.1 does not support API calls in expressions (I think that feature was added in TestStand 4.0). You need to use an ActiveX step instead. You can use an ActiveX step configured to call into PropertyObject.NumericLimit and call it on Limits.Low of the step you wish to set the property on.

 

Hope this helps,

-Doug

Member
SercoSteveB
Posts: 65
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

Hi Doug

 

Thanks for your response.

 

I should clarify, I am running a LabVIEW App, which generates TestStand Test Sequences.  I am making calls to the TestStand API through LabVIEW only (see attached), no TestStand is running.

 

Sorry but I have been attempting to decipher your post 'PropertyObject.NumericLimit and call it on Limits.Low of the step you wish to set the property on' and I can't work it out.  Any chance of a picture/example?

 

Regards

 

Steve

 

 

 

 

------------------------------------------------------------------------------------------------------------------
Check out my blog at ni.com. https://decibel.ni.com/content/blogs/DailyCLAD
------------------------------------------------------------------------------------------------------------------
Active Participant
dug9000
Posts: 1,526

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

What exactly are you doing in TestStand 4.2.1 that is not working in 3.1? I think the API for setting the NumericFormat has been there for a very long time and should exist in 3.1.

 

Call GetPropertyObject on the step.aspropertyobject reference and from the result of that use a propertyinvoke node to set the numericformat property.

 

Hope this helps,

-Doug

Member
SercoSteveB
Posts: 65
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

Hi Doug

 

Nice one, found it.

 

NumericFormat.JPG

 

As a little aside and because I am still feeling slightly behind the curve; can anyone explain why the above works but the following returns an error?

 

NumericFormat2.JPG

 

Many Thanks

 

Steve

------------------------------------------------------------------------------------------------------------------
Check out my blog at ni.com. https://decibel.ni.com/content/blogs/DailyCLAD
------------------------------------------------------------------------------------------------------------------
Active Participant
dug9000
Posts: 1,526
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

NumericFormat is not a PropertyObject, it's a setting on a PropertyObject. The lookupstring is for accessing subproperties, not settings of subproperties.

 

Hope this helps clarify things,

-Doug

Member
SercoSteveB
Posts: 65
0 Kudos

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

Understood.  Is that sort of thing defined somewhere, or is it a case of trawling the API?

------------------------------------------------------------------------------------------------------------------
Check out my blog at ni.com. https://decibel.ni.com/content/blogs/DailyCLAD
------------------------------------------------------------------------------------------------------------------
Active Participant
dug9000
Posts: 1,526

Re: Equivalent to Step.Limits.Low.NumericFormat in TestStand 3.1?

[ Edited ]

The subproperties of a step are defined by the step type which is something a user can customize and create so there are not a fixed set of these. You can see which ones exist in the variables view when selecting a step. For API properties you can check the help file. Look for the PropertyObject interface help and it will list all of the methods and properties of the interface. These methods and properties are not subproperties, they are APIs to a particular subproperty that the PropertyObject interface applies to.

 

-Doug

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page