07-25-2011 07:09 AM
Hello together,
I'm just new in the TestStand world and I have a simple question.
How can I share the output of a step between the expression step.numeric.result (NumericLimitTest) and a "Locals" variable? I need the output value of the step once for the limit comparison and once to give it to the next step.
Thanks
Dusan
Solved! Go to Solution.
07-25-2011 07:19 AM
Dusan,
the "best" answer depends on what you are going to do with the data in the next step.
If the data is not used in a step which needs a dedicated evaluation for "passed"/"failed", i suggest you to create a custom step type including the module of the second step as substep module (Post). This will result in a smaller, hence better maintainable, list of local variables. The variable would be part of the step and the module just writes the data back to this "steplocal". The substep module would pick up the value and work with it. The evaulation of the step (data source) can be configured to the steplocal as well, encapsulating all necessary data/interfaces into the single step.
The other possible way is to pass the data to the (sequence) local using the post expression, since the code module is called before (see TestStand Help: NI TestStand Reference Manual, page 3-15). The expression would be "Local.Variablename = Step.Result.Numeric".
hope this helps,
Norbert
07-25-2011 07:51 AM
Hello Norbert,
I just tried your second suggestion because I need the data in the second step for pass/fail test and it doesn't work. The Local.Variablename gets the appropriate value as should but the Step.Result.Numeric has no value for the limit comparison and I always get this test as failed.
What I do wrong?
Thanks
Dusan
07-25-2011 08:03 AM
Dusan,
the value you want to evaluate is 'Measured Resistance Out'? If so, please remove the assignment (Locals.Resistance_1_Ohm = ) from the "return expression". Leave only the expression 'Step.Result.Numeric' as parameter. The assignment you have written into the expression should be placed (completly) into the post expression in your step.
hope this helps,
Norbert
07-25-2011 08:18 AM
Hello Norbert,
it's right, I want to evaluate the "Measured Resistance Out" and I also want to give the appropriate value of "Measured Resistance Out" to another step as his input. Therefore I tried to save the value in a local variable and give it to the further step, but then the evaluation doesn't work.
Regards
Dusan
07-25-2011 08:30 AM
Dusan,
that's true. It does not work this way.
Does it work for you if you follow my suggestion?
Norbert
07-25-2011 08:40 AM
Hi,
Can you post an example of what you are trying to do?
07-25-2011 08:40 AM
Hello Norbert,
I'm sorry but I don't know how to transact your suggestion. Is it possible for you to send me an example?
Thanks
Dusan
07-25-2011 09:05 AM
Dusan,
see attachement.
hope this helps,
Norbert
07-25-2011 09:10 AM
Hello Norbert,
Thank you for your help and for the attachement but I can't open the sequence file because it is saved for the newer TestStand Version.
Can you send me the appropriate sequence file for TestStand 4.2.1 please.
Thanks a lot
Dusan