Get Name of Future Step in TestStand Sequence

Hello All,
  Working on a sequence of numeric limit tests, and need to set the limits programatically, based on an imported configuration file.  I use a simple action call to set the limits with a code module (TestStand Set Property Value function), but in order to make the code module reusable, I need to pass in the step name for the test step it applies to, each time I call it.  The problem is that the step that each limit applies to is several steps later in the sequence.  I know that I can get the name of the next step (RunState.NextStep.Name) but need to know if it is possible to get names of later steps as well.  I'm guessing it may have something to do with the "NextStepIndex" function, but can't seem to get the context right.  Please advise.  Thanks in advance.
GSinMN

Figured it out myself.
Locals."Variable To Set" = RunState.Sequence.GetStep((RunState.Sequence.GetStepIndex(Step.Name, StepGroup_Main))+"Number of steps in Future",StepGroup_Main).Name
Where "variable to set" is the name of the variable you are assigning the step name to and "number of steps in future" is an integer that represents the index with respect to the current step (i.e. 2 would mean the second step after the current step).
GSinMN

Similar Messages

  • How to pass value for value field of return parameters for an action step in teststand sequence file programatically using c#

    I used a method LoadPrototypeFromMetaDataToken(token,options) to load the return type parameters. I am unable to set the value field in the return parameters for an action step in teststand sequence file programatically using C#.How can I do that.

    Continue here

  • How to get the value field of the return parameters for an action step in teststand sequence file programatically using c#

                    Sequence mySequence = myEngine.NewSequence();
                    mySequence.Name = "myAction";
                    //Create new step of type Action and set Name
                    Step mystep = myEngine.NewStep(AdapterKeyNames.DotNetAdapterKeyname, StepTypes.StepType_Action);
                    mystep.Name = "GetStringObject";
                    //Obtain the code module from the step
                    DotNetModule myModule = mystep.Module as DotNetModule;
                    //Set properties of the module
                    myModule.SetAssembly(DotNetModuleAssemblyLocations.DotNetModule_AssemblyLocation_File, @"C:\Documents and Settings\My Documents\Visual Studio 2005\Projects\HelperClass\HelperClass\bin\Debug\HelperClass.dll");
                    myModule.ClassName = "Class1";
                    myModule.MemberType = DotNetModuleMemberTypes.DotNetMember_GetProperty;
                    myModule.MemberName = "StringObject";
                    mySequence.InsertStep(mystep, 0, StepGroups.StepGroup_Setup);
                    mySequence.Locals.NewSubProperty("StringObject", PropertyValueTypes.PropValType_Reference, false, "", 0);
                    DotNetParameterDirections reference = mySequence.Locals as DotNetParameterDirections;
                    mySequence.Locals.GetPropertyObject("StringObject", 0);
                    myModule.ClassReference = "Locals.StringObject";
                    myModule.LoadPrototypeFromMetadataToken(385875969, 0);
    After this I am not able to proceed.herewith attached documents contain screenshot of teststand file marked red is to be solved. How to define the value field of the return parameters?
    Attachments:
    HelperClass.cs ‏1 KB
    ex1.gif ‏2305 KB

    Please see my answer to your question on page two of the following forum thread:
    Programmatically generating DotNet Steps in TestStand
    Manooch H.
    National Instruments

  • How to get all step names within a group or a sequence?

    Hi,
    I'd like to show all the names of the steps within a sequence or a group.
    I wonder if there is a simple function which can be used directly, such as RunState.PreviousStep.Name.
    I tried via a foolish way to append each step name, though it shows all the step names but I still think there is a simple function can access all the step names.
    Can anyone give me some suggestion, thanks a lot!!!
    Solved!
    Go to Solution.
    Attachments:
    ShowAllStepName.seq ‏8 KB

    I've doctored up your sequence a little.  But yes you have to loop.
    Also, what format do you want the names in?
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    ShowAllStepName.seq ‏8 KB

  • Getting Sequence object from pre-step substep of Sequence Call based step type

    How to obtain reference to Sequence object from within pre-step substep of Sequence Call based custom step type?
    Given: new custom step type which based on NI Sequence Call step type. There is Pre-Step substep exist for this step type.
    How to get reference to Sequence object representing Sequence which will run?
    Although there is possible to examine SequenceAdapter and SequenceCallModule properties, it seems redundant since module (Sequence) is already loaded by TestStand ("NI TestStand Reference Manual. Table 3-4. Order of Actions that a Step Performs"   Action #6, while my code is running as Action #13).
    Thanks.
    Misha

    Could you explain what you want to do ?
    Why do you want to get the sequence object within a pre-step substep ?
    I give you some informations but I don't know if it's the better way to do what you want (because I don't know what you want to do with the sequence object).
    If the substep uses the ActiveX adapter :
    You can get the sequence object but you should save the object reference in a StationGlobals variable.
    And you should release the object reference within your sequence when you don't need it any more.
    If the substep uses another module adapter: 
    Get the step module, then the sequence name (module property).
    Then get the sequence object by the sequence name from the sequence file.
    Here are the paths to use for both methods :
    Sequence Name property path : Step.Module.SeqName
    Sequence Object path : RunState.SequenceFile.GetSequenceByName (seqname)

  • Get name of step's sequence

    Hi all,
    I have a test sequence which consists of a group of sub-sequences.  Each sub-sequence contains a set of steps which report results to my report file.  I've created a custom callback sequence (ModifyReportEntry) in order to modify the report body text for each step, but I'd like to include then name of the step's sequence in the report line for that step.
    I'm guessing that this property is somewhere in the Parameters.Result.TS realm, but can't figure out what it is.  (Using TS 4.1)
    Can someone help me out?
    Thanks!
    Jeff

    Jeff,
    You can use RunState.Caller.Parameters.SequenceName from your "ModifyReportEntry" Sequence File Callback. So the Statement expression would look something like Parameters.ReportEntry
    += "<tr><td>Sequence
    Name</td><td>"+RunState.Caller.Parameters.SequenceName+"</td></tr>". 
    Richard S -- National Instruments --Applications Engineer -- Data Acquisition with TestStand

  • Need to access TestStand Sequence Step Parameters from Excel Macro

    Trying to create an EXCEL spreadsheet containing a list of all steps in a TestStand Sequence including Parameter names and types. How can I access the parameter names and types from EXCEL Visual Basic? It seems the API provides access to sequence parameters, but not step parameters.

    mmghost,
    Unfortunately, in TestStand 2.0, it is not possible to access the step parameter information.
    In TestStand 3.0, there are a few more APIs exposed that give you access to the step parameters. In TestStand 3.0, these are the steps you would take to get that information:
    1) Get a hold of the step object of interest. There are many ways to do this. For instance, starting with the Sequence Context you can get the Sequence object, and then get a step object from the sequence.
    2) From the Step object, get the Module object.
    3) At this point, you need to cast the Module object to the specific adapater type module you are using. For this example, we will assume that we are using the CVI adapter, so we would cast the Module object to a CVIModule o
    bject.
    4) The CVIModule object contains a Parameters collection of type CVIParameters, which contains the type information.
    For different adapter types you would just cast the Module object to a different specific module (LabVIEWModule, ActiveXModule, etc).
    Matt P.
    NI

  • Programatically select a step in a sequence in a sequence file loaded in TestStand sequence editor using C#

    Hi all,
    I have written C# code to load a sequence file dynamically in TestStand Sequence editor. The code is as follows...
    myEngine.PostUIMessage(mySequenceContext.Execution, mySequenceContext.Thread, UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true );
    The code is working fine and I could view the Sequence file opened in TestStand Sequence editor.
    Now, I wish to select one sequence in the opened sequence file to get the details of  the sequence programatically. In other words, I want to simulate a mouse click to a sequence and view the steps associated with that sequence.
    Can anybody give some clues...
    Thanks in advance.

    Hi,
    Also I am getting error like "Index out of range. Source:  TSUISUPP.SelectedSteps   at NationalInstruments.TestStand.Interop.UI.Support.SelectedSteps.AddStep(Step val)". Error code: "-17500; Operation Failed." My code is like
    mySequenceFile = myEngine.GetSequenceFileEx(@"D:\dynamic loaded sequence.seq", 0, TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);
    mySequence = mySequenceFile.GetSequenceByName("First");
    Step myStep = mySequence.GetStep(2, StepGroups.StepGroup_Main);
    SequenceContext mySequenceContext = mySequenceFile.NewEditContext();
    mySequenceContext .AsPropertyObject();
    myEngine.PostUIMessage(mySequenceContext .Execution, mySequenceContext .Thread, UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true);
    ApplicationMgr applicationMgr = (ApplicationMgr)myEngine.GetInternalOption(InternalOptions.InternalOption_ApplicationManager);
    SequenceFileViewMgr sequenceFileViewMgr = (SequenceFileViewMgr)applicationMgr.GetSequenceFileViewMgr(mySequenceFile);
    sequenceFileViewMgr.SelectedSequences.Clear();
    sequenceFileViewMgr.SelectedSequences.AddSequence(mySequence);
    sequenceFileViewMgr.SelectedSteps.AddStep(myStep);
    I am sure that my Sequence selected in the Sequence file loaded has more than 2 steps. Please help me in solving this problem and that in the previous post.
    Thanks,
    Biju kuttan

  • Dynamically get parameters names of a Step Type

    Hello everybody,
    I am coding the ProcessModelPreStep in order to have access to each step of the running sequence, before it has been execute. With the following expression I access to the type name of the step:
    Locals.Type_Name = RunState.Caller.Step.StepType
    But I can't find the expression to get access to all the parameter names of the step type.
    Does somebody know such an expression to do that ?
    Thanks you !

    Ok, the parameters are connected to the code modules, hence to the module adapter.
    The data involved for the adapter is stored in a hidden container called "TS" within the step. In order to see this container, you have to check the "Show hidden properties" option in the preferences of your Station Options. The TS container includes a variable called "SData".
    Depending on the adapter, within the SData container, you can find your parameters.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Finding the name of my teststand sequence in the process model

    I would like to be able to find the file path and name of a teststand sequence in the process model. I have created a simple vi which will display this information when run in a sequence. If i insert the vi into the process model, the file path and name returned is that of the process model and not the sequence under exectution. Is there a way of extracting this information in the process model?

    Davepar -
    If you are executing in the process model you can use the following as a lookup string if you are in the root context "RunState.ProcessModelClient.Path" or "RunState.Root.RunState.ProcessModelClient.Path" if you are not in the root context.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • Error when editing IVI Scope Step in TestStand 3.1

    When I open the edit box for an IVI Scope Step in TestStand 3.1 I get the following error: Method '~' of object '~' failed (-2147417851).  I get the same error again when I click on the Logical Name dropdown box in the edit window.  I have an IVI logical name of 'TekScope' in MAX that was created when I installed the IVI drivers for a Tektronix DPO7000.
    Software Installed: TestStand 3.1, NIMax 4.3, NI IVI Compliance Package 3.2, Windows XP Pro. SP2
    It seems that TestStand is unable to communicate with MAX.  I don't think it is a version compatibility problem because I had the same problem when using MAX 3.1.1.

    Nick,
    Thanks for the reply.  This problem went away when I opened the IVI example sequence that is installed along with TestStand.  It has not repeated since.  I can now access my defined 'TekScope'.
    I am having a problem getting the IVI code to run in simulation mode.  I modified the TestStand 3.1\Examples\IVI\IviStepTypes.seq file to change the Fileglobals.ScopeLogicalName value to TekScope which is the scope name in the dropdown box for edit IVI tools.  I then selected the scope steps and selected Run Selected Steps.  I get the following error:
    An exception occurred calling 'RunStep' in 'ISubstep' of 'TestStand Ivi Step Types'
    An error occurred while executing the step.
    IVI Error: The IVI instrument failed to initialize for logical name 'TekScope'.
    Details: TekScope_InitWithOptions returned an error: -1074134964 (0xbffa004c). The option string parameter contains an entry with an unknown option value.
    Source: TSIviStepTypes
    -1074134964; User-defined error code.
    In MAX the TekScope.DriverSession - Simulate With setting is nisScope, Driver Setup is blank.

  • Teststand Sequence Editor has stopped working

    I get the following message and error code when running my sequence file. This sequence files works ok on another machine. It is a display message to the screen for user input. Software version is 4.2.1
    Teststand Sequence Editor has stopped working. 
    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: seqedit.exe
    Problem Signature 02: 4.2.1.83
    Problem Signature 03: 4af027d1
    Problem Signature 04: PresentationFramework
    Problem Signature 05: 3.0.0.0
    Problem Signature 06: 4f350630
    Problem Signature 07: 6263
    Problem Signature 08: e1
    Problem Signature 09: System.Windows.Markup.XamlParse
    OS Version: 6.1.7601.2.1.0.256.4
    Locale ID: 1033

    Kingme wrote:
    I get the following message and error code when running my sequence file. This sequence files works ok on another machine. It is a display message to the screen for user input. Software version is 4.2.1
    Teststand Sequence Editor has stopped working. 
    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: seqedit.exe
    Problem Signature 02: 4.2.1.83
    Problem Signature 03: 4af027d1
    Problem Signature 04: PresentationFramework
    Problem Signature 05: 3.0.0.0
    Problem Signature 06: 4f350630
    Problem Signature 07: 6263
    Problem Signature 08: e1
    Problem Signature 09: System.Windows.Markup.XamlParse
    OS Version: 6.1.7601.2.1.0.256.4
    Locale ID: 1033
    Do your code modules use System.Windows.Markup.XamlParse? Is the process close to running out of memory (i.e. over 1GB of memory used)? Do you have any DLLImprorts (if C#) or any native code (i.e. C/C++) being called by your sequences? Does the error happen every time you run? Always on the same step? If so, what is that step doing? Have you tried to debug the process?
    -Doug

  • Obtaining Module Name for Current Step

    I need to obtain the modulue name (dll) that TestStand is using for the currently executing step. What method/property is avalable to obtain this information?"

    This gets me the step name for the third step in the sequence although, what I'm interested in is obtaining the module name for the currently executing step. This is a property of the step which is entered after selecting "Specify Module" in the "Module Pathname" edit box (See BMP).
    If you have any ideas let me know...
    Thanks,
    Steve
    Attachments:
    step_property.bmp ‏613 KB

  • Embed design documentation refs into teststand sequences

    I've always thought TestStand sequences would map really well to
    aerospace types of  test procedures; the sequences would read
    almost like the document. I've finally got a chance to try it out!
    I want to embed paragraph numbers from a written procedure or System
    Design Document into my client sequences (and maybe into the pm). Has
    anyone done this, FDA jobs maybe? Options: 1) Put the paragraph #s in
    the step names 2) create custom step types with a "Doc Reference"
    property, 3) misuse some existing property like Step.Result.ReportText
    or Step.TS.PreExpr, 4) both step name and property?
    I guess the step name is the obvious choice, just wondering if there were any advanced considerations.

    dowNow -
    I've seen the comment field used for this kind of embedded information
    in steps.  I think that would be your best bet for making this
    information visible in your client sequences.
    There is a possibility that we will add a field to save this kind of information, so keep an eye out for it in future versions!
    Andrew W. || Applications Engineer

  • LabVIEW VI with Report Generation Toolkit elements in a TestStand sequence does not run with a LabVIEW 8.5 Run-Time Engine

    Hi all,
    I am using LabVIEW 8.5.1 and TestStand 4.1. I have done a TestStand sequence with a VI in it, which uses Report Generation Toolkit elements. On my machine I am using LabVIEW and TestStand with a Development System license. On the other machine I am using TestStand with a Base Deployment license and I have chosen the LabVIEW 8.5 Run-Time Engine in the Adapter Configuration. Everything is running well except of this VI with Report Generation Toolkit elements. The error message is showing that the VI is not executable. It works well only after I have installed LabVIEW with an Evaluation license and chosen LabVIEW 8.5 Development System in the Adapter Configuration.
    I have found other posts and a document in the KnowledgeBase with a similar problem: http://digital.ni.com/public.nsf/allkb/8A0E6274D9B​D7B1986256F62006AD402?OpenDocument But I am not using EXE files in my sequence, so I don't know how to solve mine. Anybody has an idea?
    Solved!
    Go to Solution.

    Hello guys,
    thank you very much for your answers!
    @Ruediger:
    I tried to follow the instruction for Method 2 in the mentioned document: http://digital.ni.com/public.nsf/allkb/F3DC40A6E3F​3B25B862570AD005D1D3D?OpenDocument, but the steps on my machine are different starting from step 4. After I click "Continue..." in step 3, I dont get a window, the system just makes a new folder with the same VI. 
    To be honest, I am new to LabVIEW and have some difficulties at this time. What I understood from your reply is, that I need to make a LLB-File, where the files from Report Generation Toolkit are in!?
    @GovBob:
    I was following the instruction in the document: http://digital.ni.com/public.nsf/allkb/9E00E7EFE06​35E678625734600779EFE, but it wasnt working. Can you please tell me how I can check if the VI Server is installed and running on the machine?
    I am using LabVIEW 8.5.1 and TestStand 4.1 on my machine, on the deploy machine there is TestStand 4.1.1. The version of my Report Generation Toolkit is 1.1.2.
    Kind regards, Roman

Maybe you are looking for

  • Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is:

    Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection". while executing JSP:<% * add.jsp * Adds a new entry through Emplo

  • How to create a revolving website list, like this...

    Hi there, Im new to flash, but the main reason I got it was so I could create an object to put on a webpage. I want to be able to create a revolving website list, with pictures of the sites in the list, like on the main page of this site:  http://www

  • Urgent: How to append Item text

    HI Friends, I am using SAVE_TEXT Fm to Update the Item text in ME22n. Currently i need to append few text to the already existing text using SAVE_TEXT is it possible . If it is possible please give some text. Is there any FM which can both append and

  • Is it possible to have non-rectangular app windows in Java?

    Do all apps have to be rectangular or can I change their shape? Also, is there an icon chooser dialog in java, where I can choose a file and all of its icons will be displayed, allowing me to choose one? If not, does anyone have any suggestions as to

  • IMAP email bug - help required to resolve

    Hi... I am trying to set up IMAP on my new HP Touchpad.  The problem is, my touchpad won't download any emails. After creating an account, the touchpad is able to recognise the folder structure of my email account, and I can send messages. However, m