NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup a labview-vi to create a numeric result using error-output

Hello,

i inserted some instrument teststeps from a downloaded library like initialize.vi, reset.vi, close.vi.

Currently they are running as Action.

What do i have to do that they also execute in NumericLimitTest so that i get a result?

Something like a Post-Expression: Step.Result.Numeric = Step.Result.Code

Is this all?

 

Thanks

 

0 Kudos
Message 1 of 7
(3,541 Views)

Untitled.png

When you placed the Action step, you should have placed a 'Numeric Limit Test' step. This would give the options you want.

- Regards,

Beutlich
Message 2 of 7
(3,538 Views)

Yes, i already did this.

My question is more like: What do i write into Step.Result.Numeric? Is it a good idea to use Step.Result.Code or are there better variables?

0 Kudos
Message 3 of 7
(3,531 Views)

The "Step.Result.Numeric" is meant to be the result of some test that will undergo the Limit comparisons. Store any measurement or variable that is a result of the test you are running.

 

"Result.Error.Code" is part of the error status of the step. I'll wire the error cluster from LabVIEW to the Result.Error, and then the 'Code' field refers to the error generated.

 

You can read NI's verbage about them here.

- Regards,

Beutlich
0 Kudos
Message 4 of 7
(3,519 Views)

Here are some pictures. I made a random VI, but you would have your own:

Untitled.png

Then I configure the step to run the code, and stick My Result into the Step.Result.Numeric.

 

Untitled2.png

 

That's really it. I leave the Data Source as Default. I've seen some people stick logic in here, but I like defaults so I stick any conversion logic into LabVIEW if I can.

 

Untitled3.png

 

- Regards,

Beutlich
0 Kudos
Message 5 of 7
(3,516 Views)

The VI does not  have a result that can be checked as in your example.
As posted in the first message it is about the initialize.vi, reset.vi, close.vi.

I need to change he type of teststep from action to Numeric limit test and for this i need a variable that can be used for the result.

 

Using a PostExpression with Step.Result.Numeric = Step.Result.Error:Code is also no possible as if an error occurs the Teststand stops testplan and does not execute the PostExpression...

0 Kudos
Message 6 of 7
(3,477 Views)

If you have a variable that you want to use that already has a value before executing the step, then I recommend you put that variable as the DataSource:

Untitled.png

 

This effectively ignores the Step.Result.Numeric, and uses your variable instead for the limit comparison and reporting.

 

If you want to use the error code from the VI, and you don't want the step to fail, I can think of two methods to do this:

1) don't put the error into the Step Error.

When you select a VI, TestStand automatically connects the error wire out to the Step.Error, but you can change this. Change the values in the Module tab of the VI like this:

Untitled.png

Untitled.png

This means the error information will not be treated as an error for logging purposes, only used in a Numeric Comparison.

 

2) Using a PostExpression with Step.Result.Numeric = Step.Result.Error.Code and disabling the error reporting on the step.

Just like you are thinking, you can set the Numeric to be equal to the Error code in the post step. Then you can prevent the step from throwing an error in TestStand by disabling that feature for that step:

Untitled.png

With this enabled, the step will ignore the value in Step.Result.Error, so you can put whatever you want in that field.

 

- Regards,

Beutlich
0 Kudos
Message 7 of 7
(3,469 Views)