From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting sequence main group steps via LabVIEW

Hi everyone,

 

I try to solved next task. I have LabVIEW Operator UI for execution sequence files, use callbacks for actions updates (load sequence file, entry point, etc.) and I need replace TestStand UI SequenceView Control by customized indicators, which will contain only Main group steps (names + limits + units + results). I was searching for TestStand API (object which contain all necessary parameters) which can be passed to LabVIEW. Does anybody know such things? Thanks.

 

Best regards, Sergii

0 Kudos
Message 1 of 13
(4,094 Views)

Hey Sergii,

 

To do this from LabVIEW, you can use the Sequence.GetNumSteps and Sequence.GetStep methods. Here's an example:

 

GetStepGroup.PNG

 

After opening the sequence file, you can see the GetSequenceByName method, which I used to get a reference to MainSequence. Then, I used GetNumSteps with StepGroup_Main as the parameter to get the number of steps in my Main step group. I then used the GetStep method to get the reference to a specific step within the Main step group, and for this example, just accessed the name of that step. 

 

In a real application, you would likely want to use a loop, where you use GetNumSteps to know how many times to iterate the loop, and use GetStep to get a reference to each step. Also, the code here of course is not complete--all references need to be closed once you are finished using them.

 

I hope this helps, and let us know if you have any further questions!

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
Message 2 of 13
(4,052 Views)

Hi Daniel,

 

sorry for delayed answer. Thanks a lot for your help. Could you help with advice: in which documents can I found detailed description for properties/methods? I checked them via API Reference Poster + help, but there wasn't enough information. Thank you.

0 Kudos
Message 3 of 13
(3,985 Views)

Sure. I usually just use the online version of our help, which should be the same as the in-product version. Here are the two pages we're interested in:

 

GetNumSteps

 

GetStep

 

From here, you can usually find the relevant information--for example, if I wanted to know what choices I had for the stepGroupParam in GetNumSteps, I could just click the "StepGroups" link in the Help to take me to information on that enumeration. 

 

If there is a specific type of information you're looking for on these functions, I'd be happy to help you find a source for it--just let us know!

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
0 Kudos
Message 4 of 13
(3,977 Views)

Hi Daniel,

 

thank you for advice 🙂

 

Best regards, Sergii

0 Kudos
Message 5 of 13
(3,940 Views)

Hi Daniel,

 

I found another way, how to display Limits (Low, High) using Execution Display and Step List Configurations and I met difficult place. I created new columns for limits and for displaying limits I use next Expression:

 

Step.StepType.Name ==  "NumericLimitTest" ? Step.Limits.Low : Step.StepType.Name ==  "NI_MultipleNumericLimitTest" ? Step.Result.Measurement[0].Limits.Low : ""

 

In case of Numeric Limit Test it's Ok, for Multiple - I reached to show only one of all measurement limits, is there function similar to concatenate strings (Step.Result.Measurement[0].Limits.Low SMTH Step.Result.Measurement[1].Limits.Low)? Is my approach valid for such purpose?

 

Thank you!

 

Best regards, Sergii

0 Kudos
Message 6 of 13
(3,922 Views)

Hello Sergii,

 

What exactly do you want to concatenate between those two expressions and how do you want it displayed as?

Jesse S.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 13
(3,863 Views)

Hi Jesse,

 

My Sequence file contains Numeric Limit test and Multiple Numeric Limit Test steps. I try to display in Execution Display Limits for steps + measured values in separate columns. For this purposes I configure SequenceView property. In column section I've created new column Low Limit and for Column properties: Type use expression.

For Numeric Limit I use next expression: Test Step.StepType.Name =="NumericLimitTest"? Step.Limits.Low :"".

For this step type it's valid. I try do same for Multiple Numeric Limit Test, to show all Low Limit for each measurement within one step. I create Step.StepType.Name ==  "NI_MultipleNumericLimitTest" ? Step.Result.Measurement[0].Limits.Low : ""  for Low Limit, but it's shows only one element. I was searching how can I display all low limits for one Multiple numeric limit test. My idea was repeat  Step.Result.Measurement[i].Limits.Low  for each measurement and then display results ("concatenate" each result) for one step, but I didn't found how to do that.

For example:

Step                                      Low Limit

-----------------------------------------------------

Multiple Numeric Test 1            0

                                                  10

-----------------------------------------------------

Multiple Numeric Test 2            5
                                                  15

-----------------------------------------------------

 

Could you help me with advice? Thank you.

 

Best

0 Kudos
Message 8 of 13
(3,855 Views)

Hello,

 

I'm still a little bit confused.  Could you possibly post a screenshot on what you are trying to accomplish?

 

As for the concatenating the numbers.  What you could do is convert the numbers to a string, and concatenate them that way for the user to view.  It would be something as simple as:

 

Str(Locals.number1) + ", " + Str(Locals.number2)

 

I'm not sure this is exactly what you are trying to do, but I feel like that will become clear once I see a screenshot of what you are already doing with the Numeric Limit Test and what you are trying to accomplish with the Multiple Numeric Limit Test.

Jesse S.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 13
(3,821 Views)

Hi Jesse,

 

Str() allowed me indicate two low limits. I tried use ("\r\n") to show each limit below each other, but it was in one line. For operator will be difficult recognize limits and results, when they in one row (0,225). How can I display them in "column"

0

225

except

0 , 225?

Table.png

 

 

 Also I received next error:

error.png

 

Thanks.

 

S.

0 Kudos
Message 10 of 13
(3,817 Views)