jcarmody Posted October 19, 2010 Report Share Posted October 19, 2010 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 Quote Link to comment
asbo Posted October 19, 2010 Report Share Posted October 19, 2010 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. 1 Quote Link to comment
jcarmody Posted October 19, 2010 Author Report Share Posted October 19, 2010 Thank you. This is what I came up with. Quote Link to comment
asbo Posted October 19, 2010 Report Share Posted October 19, 2010 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. Quote Link to comment
jcarmody Posted October 20, 2010 Author Report Share Posted October 20, 2010 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. Quote Link to comment
crelf Posted October 21, 2010 Report Share Posted October 21, 2010 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 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! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.