list of steps (subsequences) in a sequence
Started by
jcarmody
, Oct 19 2010 11:03 AM
5 replies to this topic
#1
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
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
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
Posted 19 October 2010 - 03:36 PM
Resistance is Mandatory
No rulers
No masters
NO CONSENT
#4
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
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
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):
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!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.












