Jump to content


Photo
- - - - -

list of steps (subsequences) in a sequence


  • Please log in to reply
5 replies to this topic

#1 jcarmody

jcarmody

    The 500 club

  • Premium Member
  • 801 posts
  • Location:North Carolina, United State, Earth
  • Version:LabVIEW 2012
  • Since:2007

Posted 19 October 2010 - 11:03 AM

I have a "sandbox" sequence that I use to test my products and develop new tests; it contains all of the sequences that I use for production as well as utility sequences and whatever is in development. I currently use it by skipping every step except the ones I'm working on, but I'd like to generate a list of steps at the beginning of the execution that will allow me to select which steps to run. I figure on making a boolean array and using Preconditions to decide whether or not to run a step. I've written something similar, but it depends on a static list of steps. I want something to dynamically adapt to the ever-changing sandbox sequence.

How can I get a list of steps from a VI called at the beginning of the sequence? I've looked at the OI examples and nothing jumps out at me.

Thanks

Resistance is Mandatory

No rulers
No masters
NO CONSENT

 


#2 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 19 October 2010 - 12:57 PM

Take a look at Sequence.GetNumSteps() and Sequence.GetStep(). We use this code in an OI to pull out all the steps in the Main StepGroup to do almost exactly what you're trying. The preconditions are overkill; You can use Step.SetRunModeEx() directly once you get the Step object. If you want to do this in a VI, generate a default action VI and use the SequenceContext object that gets passed in.

#3 jcarmody

jcarmody

    The 500 club

  • Premium Member
  • 801 posts
  • Location:North Carolina, United State, Earth
  • Version:LabVIEW 2012
  • Since:2007

Posted 19 October 2010 - 03:36 PM

Thank you. This is what I came up with.

GetStepNames.png

Resistance is Mandatory

No rulers
No masters
NO CONSENT

 


#4 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 19 October 2010 - 04:12 PM

Practically copy-paste from mine ;) You should wire your Sequence ref through the first for loop and close it. You probably won't ever have a problem without doing that, but it's just The Right Thing To Do.

#5 jcarmody

jcarmody

    The 500 club

  • Premium Member
  • 801 posts
  • Location:North Carolina, United State, Earth
  • Version:LabVIEW 2012
  • Since:2007

Posted 20 October 2010 - 11:47 AM

This exercise gave me the opportunity to find this TestStand patch that fixed TestStand crashing whenever I tried to use my new VI. I probably ignored a message about it during installation.

Resistance is Mandatory

No rulers
No masters
NO CONSENT

 


#6 crelf

crelf

    I'm a LAVA, not a fighter.

  • V I Engineering, Inc.
  • 5,748 posts
  • Version:LabVIEW 2012
  • Since:1993

Posted 21 October 2010 - 04:54 PM

PS: this is the UI that abso was talking about. (it's part of our internal TestStand API reuse package, so it's not available for public use, but it might inspire and idea on what to do):
TestStand_SelectTestStepsToExecute.gif

This exercise gave me the opportunity to find this TestStand patch that fixed TestStand crashing whenever I tried to use my new VI. I probably ignored a message about it during installation.

This is a really important post that I don't think should be glossed over. For those not in the know, this patch refers to using LabVIEW 2010 with TestStand. Be fore-warned, and prepared!

post-181-1170858537.png