NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Check for Sequence Running via Model

Hi,

Is there a method for checking which sequence has run if I am editing a Model? I am attempting to use a Model to check for when a Main Sequence test is running based on an expression. It would check when a sub-sequence is called by the main sequence and then get the name of the Main Sequence running once. I am new to teststand and need some help doing this.

 

Thank you

0 Kudos
Message 1 of 14
(4,429 Views)

It my be better to understand why you need to do this.  There may be a better method.

 

I'm still a bit confused by what you are looking for.  So you are trying to edit the process model but want to know if something is executing?  Just look at your executions.

 

There is the ProcessModelPostStep/PreStep engine callbacks that can be placed in your model.  Those get triggered when any step in your client executes.  You could check to see if the step was a sequence call and if it was in MainSequence.

 

Hope this helps,

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

Hi Jiggawax,

 

Thank you for your response. The solution you have mentioned is correct, however I have an issue with multiple entires and I was curious as if there was a way to scan for the main step once and only list it once if there are multiple steps.

0 Kudos
Message 3 of 14
(4,420 Views)

I'm not sure I follow what you mean by multiple entries?  Also what do you mean by main step?  

 

Can you clarify?

 

Thanks,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 14
(4,408 Views)

Hi Jigg,

 

The expression you mentioned in the ProcessModelPostStep works i.e. Runstate.Caller.Main.Step, which will return the Main Sequence steps, but all of them. I was curious as if there was a way to just return the tests in the Main Sequence and not any labels, or files that I have in the steup? Is there such a command that exists or a way to hide these items?

0 Kudos
Message 5 of 14
(4,393 Views)

Hi Allan,

 

Assuming you only want "tests" to show up, you could try using a precondition to only include steps whose step type (Step.StepType.Name) includes "Test" in the step type name.

 

Hope this helps.

 

-Jack

0 Kudos
Message 6 of 14
(4,384 Views)

I just had a thought.  Are you trying to get those steps off the report?  If so then just disable result recording for those steps.  Every step has the ability to disable result recording.  Then it does not show on the report.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 14
(4,382 Views)

Hi Jigg,

 

Unfortunately the result recording options are already disabled and I am attempting to filter out unnecssary steps, expressions, from setup and cleanup and labels within the entire sequence from appearing on my report. The report is exported via UImessages to Labview and sent to a note file for review.

0 Kudos
Message 8 of 14
(4,379 Views)

Hi Jack,

 

How would I exactly go about this as I am new to the TestStand environment. Could you provide with an expression example and possibly some explanation?

0 Kudos
Message 9 of 14
(4,378 Views)

You could filter based on StepType:

RunState.Caller.Step.StepType.Name

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 10 of 14
(4,376 Views)