NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Share expression in step.result.numeric and locals.variable

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 12
(5,208 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 12
(5,207 Views)

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

 

0 Kudos
Message 3 of 12
(5,204 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 12
(5,201 Views)

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

0 Kudos
Message 5 of 12
(5,197 Views)

Dusan,

 

that's true. It does not work this way.

Does it work for you if you follow my suggestion?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 12
(5,195 Views)

Hi,

 

Can you post an example of what you are trying to do?

Regards
Ray Farmer
0 Kudos
Message 7 of 12
(5,188 Views)

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

0 Kudos
Message 8 of 12
(5,187 Views)

Dusan,

 

see attachement.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 12
(5,183 Views)

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

0 Kudos
Message 10 of 12
(5,179 Views)