NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Feed step MNLT parameters to called LabVIEW VI

Hi.

 

I'm trying to find a way to feed the parameters of NLT and MNLT steps to a called LabVIEW VI, so I don't have to keep editing measurements, limits and units at two places all the time.

I've been searching for hours, but I can't find where this data is located *when the VI is called*.

Everything I need is available in the ResultList array, but the allocated array element is only populated after the step has executed.

 

Regards,

Øystein.

0 Kudos
Message 1 of 5
(4,566 Views)

Hi Oystein,

 

Would you be able to provide a little more information? Are you wanting to call the LV VI as part of the TestStand test sequence (as an action) or running in parallel to TS? Is the ResultListarray within TS or LV?

 

There is a full activeX library available for communicating to the TS environment from LV:

https://www.ni.com/en/shop/labview/activex-and-labview.html

https://www.ni.com/docs/en-US/bundle/teststand-api-ref/resource/372844e.pdf

 

I hope this helps.

 

Regards

Pete 

NI Applications Engineer

Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(4,528 Views)

Hi Pete.

 

Yes, my initial question was how I could feed the information about a MNLT step to the VI that is called in the test step.  The ResultList array is incremented one element prior to the VI being called, but the information is populated in the array only *after* the VI has been called, it seems.  Why is this, by the way?  I mean, static information like test step names, limits, units etc, don't change during the test step, and could be made ready in the ResultList array prior to the VI being called - only the measurement data and test step results need to be updated afterwards.

 

But I found a way around it:

Measurement name:  NameOf(Step.Result.Measurement[n])

Measurement unit:  Step.Result.Measurement[n].Units

Low limit:  Step.Result.Measurement[n].Limits.Low

High limit:  Step.Result.Measurement[n].Limits.High

 

Regards,

Øystein Holvik Johnsen.

0 Kudos
Message 3 of 5
(4,489 Views)

Hi Oystein,

 

I'm not sure why it operates in this way without looking into it further. I imagine it is just the order that the test proceedure works in.

 

Good job on finding the work around.

 

All the best

Pete

NI Applications Engineer

Certified LabVIEW Architect
0 Kudos
Message 4 of 5
(4,457 Views)

Oystein,

 

For the MNLT Step Type the result evaluation is performed in the Post-Step Substep.  This is because of the dynamic nature of the step.  Normally the evaluation is completed in the Status Expression but because of the complexity of the MNLT Step Type it is done in a sub step.

 

You can pass the Sequence Context to your code module as a parameter and then access the Step and its properties inside your code module.

 

Here is where you can see when all of the step actions are performed: https://www.ni.com/docs/en-US/bundle/teststand/page/step-execution.html

 

It includes when entries are made to the resultlist.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 5
(4,451 Views)