NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Check for Sequence Running via Model

The attached immage shows how to determine the steptype name.

 

I've also attached a simple example that demonstrates how to filter step names.  Let me know if this makes sense.

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 11 of 14
(1,650 Views)

Hi Jigg,

 

Is there a way to find out whether or not a sequence or step is main of the Main Sequence and in the Main block?

0 Kudos
Message 12 of 14
(1,638 Views)

Yes.  Inside the callback use RunState.Caller.StepGroup

0 = Setup

1 = Main

2 = Cleanup

 

Hope this hleps,

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

I should point out that it is probably safer to use the constants:

 

 

StepGroups

Use the following constants with this data type:

  • StepGroup_Cleanup–(Value: 2) Specifies the Cleanup step group.
  • StepGroup_Main–(Value: 1) Specifies the Main step group.
  • StepGroup_Setup–(Value: 0) Specifies the Setup step group.

Purpose

Returns the step group in which the step currently resides.

Remarks

If the step is not currently inserted in a sequence, accessing this property returns an error.

 

Also, of note is that instead of Caller.StepGroup  You could use RunState.Caller.Step.StepGroup

 

So do a compare like this RunState.Caller.StepGroup == StepGroup_Main

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