NI TestStand Idea Exchange

About NI TestStand Idea Exchange

Do you have a feature idea for how to improve NI TestStand? Submit and vote on ideas now!

  1. Browse by label or search in the TestStand Idea Exchange to see if your idea has previously been submitted. If your idea exists sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea. Be sure to submit a separate post for each idea. Note: the TestStand Idea Exchange is not the appropriate forum to submit technical support questions.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see implemented!

The TestStand R&D team is committed to reviewing every idea submitted via the TestStand Idea Exchange. However, we cannot guarantee the implementation of any TestStand Idea Exchange submission until further documented.

Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 
MimiKLM

New feature request: ReinitialiseToDefault() command

Status: Declined

I'm declining this due to lack of community support

Hi,

 

Recently I've discovered that it would be very useful if developers can have a function which allows them to re-initialise all variables and limits containers for all test steps to the default value.

 

By default value I mean the state as the variables and limits containers are just after the sequence file is open.

 

This function would be used in the situation when the test station is testing a lot of DUTs one after another and as a result of this the MainSequence is called, but not re-loaded, every DUT tested. Without this function, as it is now, developer have to explicitly reinitialise all variables they are interested in. However, it causes the risk of forget to refresh/reinitialise some variables, which could lead to long and costly debugging.

 

Proposal (sudo code):

FileGlobals.ReinitialiseToDefault()

Locals.ReinitialiseToDefault()

ResultsContainers.ReinitialiseToDefault()

LimitsContainers.ReinitialiseToDefault()

 

It looks like to implement it on the sequential model needs a lot of modifications. http://forums.ni.com/t5/NI-TestStand/Loading-default-limits-for-every-execution/m-p/2943434/highligh...

4 Comments
dug9000
Trusted Enthusiast

I see what you are getting at with FileGlobals, but you should not need this for Locals (since there is a separate copy at runtime that gets recreated from the edit time copy each time a sequence is run), and I'm not sure what ResultsContainers and LimitsContainers are.

 

-Doug

dug9000
Trusted Enthusiast

Also, I think there is a simple solution to the problem you are asking about in your forum post. See my post to that forum thread.

 

-Doug

warren_scott
Active Participant

I would also vote for a ReInitializeToDefaults() function.

This would be very useful for looping situations, where you loop on Channel1-N within a sequence

#Start Pseudocode:

#ForEach(Channel)

#  step 1

#  step 2

#  step 3

#  step 4

#  step 5

#EndFor

 and would like to be able to (at the start of each iteration of the loop) reset values of locals.XXX to their default values.  Right now you need to make sure that the defaults for Locals.XXX is the same as the value you set in the expression step at the beginning of each loop iteration for (re)setting the value.  Being able to just set the value in the defaults for locals.XXXX and only needing to change it there (because you could call a reinit to defaults function) would make things easier.

I would want to make sure it was avalable at PropertyObject level, so it could be called at Locals level, or Locals.Foo, or Locals.Foo.Bar

 

This is also useful for steps that are inside the loop.  Often times we need to do custom configuration of step.limits.XXX, or often we do things like setting step.result.reporttext = step.result.reporttext + "additional information to add".  This goes through just fine if you are not in a loop (so we get used to writing code like that), but if the step is in a loop, step.result.reporttext will keep growing longer and longer on each iteration, and it would be much nicer to be able to add a statement to the step preexpression to specify ReInitializeToDefaults("Step.Limits"), ReInitialzeToDefaults("Step.Result.ReportText"), or even just plain ReInitailzeToDefaults("Step"), which would then remove even the last value of step.result.Numeric (or whatever data type and return it to defautls) so we wouldn't need to worry about if an error happens and there is a non-default value for step.result.numeric, is that a real value or one from the previous iteration of the step step.limits  (yes there are other ways to program this, but having a ReInitailzeToDefaults() would be another useful tool to have in the box. 

WireWeaver
Active Participant
Status changed to: Declined

I'm declining this due to lack of community support

https://www.linkedin.com/in/trentweaver