Diff sequence file API

Hi Ppl,
Are the API's for using the "Diff Sequence File With" tool exposed ? I mean the tool thats available in the Sequence Editor ->Edit->Diff Sequence File With
I want to use this tool programmatically. I searched the TestStandAPIReferencePoster. I couldn't locate any such method. 
This tool is not available with the custom sequence editor license. So If I want to have this functionality in a custom sequence editor is there any work around ?
Thanks 

The diff APIs are exposed, but not documented or supported. They are also subject to change.
However, you should be able to redistribute C:\Program Files\National Instruments\<TestStand>\Bin\SequenceFileDiffer.exe
I believe it works with a custom editor license.

Similar Messages

  • "Diff Sequence File With" doesn't look into sub-sequences.

    Hello guys.
    I have these 2 sequences in Teststand 2.0 that I'm trying to compare, but when I use the command "Edit" - "Diff Sequence File With" it only looks in the upper level properties (MainSequence, FileGlobals, etc.) but it doesn't check for the contents inside the sub-sequences, which is where I have most of my measurements and tests.
    Hope you can help. Thanks.

    If you expand the 'Sequences' node, you should see the list of all the
    sequences from your file.  Then expand one of the Sequences and it
    should list the Context variables for those Sequences.  This is
    where you should see a comparison of the Locals set.  As a test,
    try comparing the Sequential (SequentialModel.seq) and Batch
    (BatchModel.seq) process models.  You can find them in the
    <TestStand>\Components\NI\Models\TestStandModels directory. 
    Perhaps you could post the two sequences you are trying to compare if
    you are still running into problems.
    Tyler T.

  • TestStand crashes if I'm using "Diff Sequence Files"

    If I am using "Diff Sequence Files", TestStand (2.0.1f1) immeadetly closes without any messages, and I've to restart TestStand again.
    Same happens rarely if I run my TestStand application (e.g. after testing 75 UUT's). I've got this bug by using the Secuence editor as well by using an operator interface.
    Win XP, Nt4, LabView 6i
    Any ideas how to fix that, or how to debug if everything is closed.
    Thanks for any hints,
    martin

    Alejandro,
    this problem happens with different sequence files. Sometimes the System Exception �System Exception Error Code: -17502� is shown.
    But there are also files where I haven�t any problem by using �Diff Sequence Files�. For your information: all files have the same structure.
    Attached you�ll find the 2 files where the problem occurs every time without an Error Code.
    But the other serious problems are the crashes while running the TestStand application. That means during the test the TestStand application would close without any messages. And this problem occurs very rarely and I�ve haven�t got a chance to debug.
    Any hints will be appreciated
    Best regards
    Martin
    Attachments:
    1230-2101_0006.seq ‏178 KB
    1230-2201_0006.seq ‏178 KB

  • Questions about "Diff Sequence File With..." function

    Hello,
    I've started working on a project where I'm maintaining a piece of older code written by a since-departed employee of my company.  It's a TestStand 3.0 sequence file calling on Labview 7.0 code. The thing is, there were two of these installations done at different times and, somewhere in the woods between stations 1 & 2, the code base diverged.  Part of it was due to not being able to get exact duplicate hardware for the PXI chassis and part was, apparently, due to the fact the client used the 2 machines to test different UUT models.
    So, I'm looking at copies of the installed code base on the two machines using the diff feature in TestStand.  (If it makes a difference, I'm doing this viewing in TestStand 3.5 since TS3.0 has mysteriously gone corrupt on me at the moment on my main development computer and, if memory serves, you have to uninstall all the later version of TS to reinstall an older version.  An altogether fun process, no doubt, but a little time consuming.)
    Anyway, the first thing I notice is that very many of the sequence steps have different Step Properties.Step ID values that look something like this: "ID#:2vMTp0db002mQDXArddRSA".  Messing with the diff screen showed an option to "Ignore Unique Step Ids" which got rid of these.  Regarding these unique step ID's: When are they generated and do they remain constant on a particular machine?  Beyond mere curiosity, I wonder because another diff is in some of the "On Pass Target" or "On Custom Condition True Target" under certain Step Properties and the value under there looks suspiciously like those unique ID's (i.e. ""ID#randomstuff"").  Are these all dynamically updated at runtime or will I break something by changing those (say if I copy a sequence from one version overwriting it in the other)?
    So, I filtered the unique ID's out.  The next large area of difference is that many, but by no means all, Labview VI calls have a difference under Step Properties > Flexible Labview Adapter Properties > ViCall > Connector Pane Checksum > Value.  Also, in a few other instances, ViCall > error out > Connector Number is different as well.  Does this indicate a different underlying VI?
    There are a few other differences, but I can interpret those.  My goal is to get one sequence file for both machines so the code will be easier to maintain.  I do think that some of the VI's with different Connector Pane Checksums may be different between the two installations since one of the different hardware components required a different driver library.  This leads to a third question, what does it take to use identical sequence files when the underlying VI's might differ?  Is it just the interface needs to be the same?  Like the connector pane has the same geometry and data types for the exposed inputs and outputs?
    Thanks for any help,
    Mike
    Solved!
    Go to Solution.

    I just got off the phone with NI support, so no worries on the answers.
    Short versions:
    The unique ID's are regenerated when a sequence is copied.
    Teststand doesn't need higher versions uninstalled to reinstall an earlier copy.
     Connector Pane Checksum implies a different underlying VI, but having the same connector geometry/inputs/outputs/types should allow you to have a different VI for different installations without different sequence files.
    Still waiting to hear back from support on whether the goto pointers get updated properly when a sequence or portion of a sequence is copied.

  • Command line options / API Support to launch the sequence file

    does teststand support any command line options / API Support to launch the sequence file and also populate the test run status. I want to explore the option of integrating the teststand with QC where I can launch the sequence from QC and results are sent back to QC.
    Thanks in advance,
      -Dilip

    Hi Dilip,
    Here are the command line options for TestStand v4.2.1:
    Command Line Processing
    Command line usage:
       seqedit.exe [<sequence file>]
                   [/goto <location>]
                   [/run <sequence> <sequence file>]
                   [/runEntryPoint <entry point> <sequence file>]
                   [/quit]
                   [/setCurrentDir]
                   [/useExisting]              
                   [<workspace file>]
          <location>:  property object path to the item to display in the file
                   Location examples:
                         TestExec.exe c:\example.seq /goto "Seq[\"MainSequence\"].Main[\"Power On\"]"
                         TestExec.exe c:\example.seq /goto "Seq[\"MainSequence\"].Main[\"ID#:JifH4ODTf0y1z7bJ​ne0G7D\"]"
                         TestExec.exe c:\example.seq /goto "Seq[1].Main[4].TS.LoadOpt"
          <sequence file>:  sequence file to open
          <sequence>:       sequence to run
          <entry point>:    entry point, such as Single Pass or Test UUTs, to run
          <workspace file>: workspace file to open
       You may specify multiple sequence files, sequences, and entry points.
       Quotes are required for arguments that contain a space, such as
       "Test UUTs" and "C:\My Documents\Test Sequence.seq"
    I don't believe you'll get a return status of the executed sequence from the editor on close; but you could design your sequence to write the status to a file and then read that by your QC application.
    -Jack

  • What is the teststand api call to execute sequence file after it is opened-C#?

    I am programming in C#. I want to make a call to execute a sequence file after I call OpenSequenceFile. I want to do this outside of the GUI. I know that the GUI has a Single Pass button that executes the sequence, I want to know how can I just make the execution call myself?

    Hi IM,
    I think this thread will answer your task
    http://forums.ni.com/ni/board/message?board.id=330&message.id=19658&query.id=461003
    Regards
    juergen 
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • How do I save a running sequence file

    Part of my testing requires a large number of variables to be passed to and from the UUT within TestStand. I can store some of these variables in the station globals, but I'd like the option to store others in the sequence files at run time and save them to disk (save the sequence file) at the end of the test. I can create variables in the station globals and commit the globals to disk just fine (LabVIEW vi's using the TestStand API). However, I cannot figure out how to do the same thing with a sequence file. My code is able to create and populate the locals variables with no problem, but I cannot save the running sequence file to disk with the new locals (or file globals) intact (they disappear when the sequence ends.) The reason I want to save the sequence file is to avoid manually entering all these variables into each sequence file locals list.
    So, I think the questions are:
    How do I make the new locals or file globals a part of the running sequence file?
    How do I save the sequence file to disk before it stops running?
    I can increment the change count on the file. I have figured out two or three ways to save the file while it's running without errors (although I doubt it's actually doing anything.) I'm using the TestStand API in LabVIEW vi's to pull this off and cannot find the functions I'm looking for.
    Sorry if this is rambling, it's kind of hard to describe.

    Hi Lars,
    The reason that we can't save the local variables created during
    runtime is because TestStand creates a runtime copy of the variables
    when the sequence starts. After the sequence is finished executing,
    this copy is discarded. The reason behind this is that TestStand allows
    for a single sequence to have multiple executions at the same time, and
    each instance gets its own runtime copy of the local variables. If new
    locals could be saved to the actual sequence file in memory, it could
    cause major problems for other execution threads of that particular
    .seq file.
    You can use the API to add variables to the actual file using
    GetSequenceFileEx and incrementing the Change Count, or create a
    separate sequence that modifies another sequence file, but adding these
    locals to the sequence file from itself isn't possible.
    Hope this helps Lars,
    Have a good one.
    Dan Weiland
    Applications Engineer
    National Instruments
    www.ni.com/support
    Dan Weiland

  • How to get the loaded client sequence file path/name?

    I added a step in Process model, and wanted to get currently loaded client sequence file name/path. I used the variable of "SequenceFile.Path" but then I realized what I would get is the process model file path, not loaded client sequence file path/name. How can I get loaded client sequence file path/name?
    Thanks!
    Jacky

    I dont understand what you are trying to achieve.  Can you provide more information.
    If you are trying to dynamically load and run a client sequence file at run time you need to make a couple of calls to the TS API from inside the process model, Engine.GetSequenceFileEx to get a reference to your sequence identified by its pathname, and then Execution.ClientFile to tell the process model which sequence you want to run.
    Steve
    There are 10 types of people in the world that understand binary, those that do and those that don't.

  • How to release process model sequence file object?

    Calling engine's method GetStationModelSequenceFile we get the reference to the process model sequence file object. According to TestStand Help, you should "Release this reference when you are done using it." The question is: how do you release it? Call engine's method ReleaseSequenceFileEx passing the reference to the model sequence file gotten from GetStationModelSequenceFile won't work, it returns FALSE which means the sequence file can't be released. Similar problems exist with methods SequenceFile.GetModelSequenceFile, Execution.GetModelSequenceFile. My aplication is written in VB. Using the statement like
    Set modelSequenceFile = Nothing also does not solve the problem.  I want to get some information of process model, such as version number, so I call those API functions in my code, which was developed under TestStand 3.1. I post this question because when I ran my application with TestStand 3.5 or 4.0 beta, I got the warning dialog when loading a sequence file and then closing the application. The dialog listed all the unreleased objects which I figured out is due to that the process model file was not released. Because message in the dialog is as following:
    The following top-level objects were not released:
            Sequences [1 object(s) not released]
                Sequence #1:
                    Name: Test UUTs
            Type Definitions [43 object(s) not released]
                Type Definition #1:
                    Name: TimeDetails
                Type Definition #2:
                    Name: ReportOptions
    Of course there are more in the list, but the sequence file loaded into the application is released correctly by calling engine's method ReleaseSequenceFileEx, so it does not appear in the list.
    Any help will be greatly appreciated.

    Here are what I did after launch the operator interface:
    1) Call Engine.GetSequenceFileEx to get a reference to a sequence file.
    2) Display steps of MainSequence of the sequence file in GUI.
    3) Call Engine.GetStationModelSequenceFile to get a reference to the station process model sequence file. The variable used to save the reference of process model sequence file is modelSequenceFile.
    4) Loop through all the sequences in process model sequence file, get the references of entrypoint sequences in the process model and put them in a container (VB Collection).
    At this point,
    Calling modelSequenceFile.CanUnload returns TRUE
    Calling modelSequenceFile.IsExecuting returns FALSE
    Calling Engine.ReleaseSequenceFileEx(modelSequenceFile, ReleaseSeqFile_UnloadFile) returns FALSE
    There is no other loaded process model sequence file reference at this point.

  • Accessing Sequence FIle information

    I want to programmatically access a sequence file's information (sub-steps & sub-sequences) prior to actually loading the sequence. I.e. I’m trying to make a stand alone GUI that allows me to select a sequence file and which sub sequence of that file I want to run at a later time.  In C# I declare a sequence: NationalInstruments.TestStand.Interop.API.Sequence seq; But Sequence in an abstract class so I can’t directly create an instance of it. Ditto that for a NationalInstruments.TestStand.Interop.API.SequenceFile.  Anyone know if this can be done and how to do so?  

    Hello John 242424,
    Thank you for posting on the NI Discussion Forums.  Attached is an example written in C#.NET 2008 which takes in a sequence file (chosen by the user) and then retrieves the names of its sequences, and steps within those sequences upon the click of another button.  The key methods it uses are the SequenceFile.GetSequence( ) and Sequence.GetStep( ) methods.  You will notice that Sequence.GetStep( ) currently only returns the steps in the Main step group.  If you wish to find the steps in Setup and Cleanup, you will have to add this functionality.
    Chris_G
    Sr Test Engineer
    Medtronic, Inc.
    Attachments:
    TestStand1.zip ‏46 KB

  • Read sequence file properties from the test sequence

    Hi,
    I use the old version of TestStand 2.1. I have the option of version sequence (Sequence File Properties) that incrimante each backup. I wanted to know if I can get in the sequence, a variable that indicates the version of the current program.
    Thank you in advance
    Solved!
    Go to Solution.

    If I understood your question correctly, either use ActiveX steps to access the PropertyObjectFile.Version property or use the hidden property: RunState.SequenceFile.Data.Version. Hidden properties are subject to change in future versions of TestStand though, so it's more future proof to use the API. This particular property has however never changed so far.
    Hope this helps,
    -Doug

  • Reload sequence file when changes on disk

    Hi,
    I wrote a custom user interface based on the TestStand (TS) Operator Interface. When I run a sequence file on it and I edit it in the TS editor and I restart an execution, it seems to keep loading the first one when I launch the execution. The only way I can do this is by restarting the GUI.
    I read a lot and tried many things and I can’t figure out what do I need to do to have the sequence file reload from disk on the 2nd execution after changes has been made.
    I tried many thing and it seems to work when I release the seq file 2 times (!). But, as expected, the 2nd time it get released, I get an error that the file was unloaded from the TestStand Engine. And the weird thing is that I don’t get the error when I run the 1st time or I don’t make changes to the seq file.
    Do you see anything wrong? Or have another suggestion how I could achieve that?
    Can I see which seq files are in the internal cache? That could be useful to debug.
    Thank you.
    A code snippet in C# is in attachement.
    Attachments:
    C#-code.rtf ‏2 KB

    A few more ideas:
    1) Are you perhaps using this file path with an ApplicationMgr or SequenceFileViewMgr API? You need to make sure that this file is not open by the ApplicationMgr or assigned to a sequencefileviewmgr as well. The applicationmgr or sequencefileviewmgr likely have a strong reference to the sequence file if you have assigned it or opened it with one of their APIs. You might want to try switching entirely to the applicationmgr APIs instead of using the engine APIs as that's probably less likely to lead to conflicts between the two.You could try ApplicationMgr.OpenSequenceFile() and ApplicationMgr.CloseSequenceFile().
    2) Have you tried this with a simple, empty sequence file and simple default Sequential process model to verify that it's not related to anything in the sequence file you are running or any code elsewhere in your application? It's possible for code in the sequence or process model itself to be calling GetSequenceFile or GetSequenceFileEx.
    3) Have you tried adding a delay between WaitForEndEx() and ReleaseSequenceFileEx()? This is not that likely to be the cause, but perhaps there is additional code required to execute in the execution thread after WaitForEndEx returns before the sequence file can be unloaded. If you add a small delay (i.e. Thread.Sleep(1000) between those lines of code it might work. This would not explain why the file couldn't be reloaded when you use GetSequenceFileEx with the UpdateFromDisk flag though so probably is not the problem.
    I tried to reproduce this problem in the sequence editor by running an
    execution with a sequence file, closing the sequence file, overwriting
    it with a different sequence file and reopening it and I was unable to
    reproduce the problem. I got the new file opened as expected. This is
    the equivalent situation since there is a completed execution still
    open. The sequence editor does not use the Unload flag on
    ReleaseSequenceFileEx, but it does use the UpdateFromDisk flag on
    GetSequenceFileEx() and it seems to work, correctly loading the new
    version of the file in this case. So there must still be something different in your case. I suspect that it's not the execution that has the extra reference in your case, but something else, perhaps the ApplicationMgr or SequenceFileViewmgr.
    Also, as a side issue, if you are writing a custom UI, I'd recommend using UIMessages to determine when an execution completes rather than WaitForEndEx(). Basically handle the ApplicationMgr.UIMessageEvent and look for UIMsg_EndExecution and check that the execution associated with the UIMessage is the one you care about. Using the UIMessage like this has a couple of advantages:
    1) It allows your UI to go back to executing in it's main message processing loop (Some things will not work correctly without this).
    2) It gives you the potential to track and handle running multiple executions in parallel. Just look for and track the multiple UIMessages that such executions generate.
    Please let us know if any of these ideas helps or if you are able to figure out the cause of the problem. If you are still unable to get it working and can't figure out the cause, please attach an example program and sequence files which reproduce the issue.
    Hope this helps,
    -Doug
    Message Edited by dug9000 on 03-02-2010 10:03 AM
    Message Edited by dug9000 on 03-02-2010 10:04 AM

  • Sort sequences in a sequence file

    I just copied a bunch of sequences from different files into a common sequence file. I think there were multiple versions of some of the sequences, but sonce there's such a long list of them now, it's difficult to compare. If I could sort the sequences then the similar ones would all bunch together, and I could then decide which ones to keep.
    Does anyone know of a way to sort the sequences in a sequence file in TestStand 2.0.1 or eralier?
    Thanks in advance for eny help you can provide

    Hello,
    If your sequence file has a large number of sequences, the best way to rearrange the sequences is to build an application which does it using the TestStand ActiveX API. Here is an outline of something you could try. First, you can get a reference to your sequence file using the GetSequenceFileEx method of the TestStand Engine. From here you can get a reference to each sequence in your sequence file using the GetSequence method. Once you have a reference to each sequence in your sequence file, you can use the Name property to get the sequence name. Once you have the name you could order the sequences and then insert them into your sequence file using the InsertSequenceEx method.
    This should get you started with building your application which rearranges the sequences in your sequence file. Also, there is good documentation on the TestStand ActiveX API for TestStand 2.0.1 in the TestStand Programmers Help. This can be found by going to Help >> TestStand Programmers Help. I hope that this information is helpful to you.
    Regards,
    Kevin L.

  • How to call sequence in LabVIEW by providing sequence file path.

    Hi,
        Please provide me a solution to call sequence file from LabVIEW ActiveX API's by inputting sequence path to LabVIEW user interface.
    Thank you
    Yuvaraj
    Solved!
    Go to Solution.

    Here is a link that I gave some pointers on how to run an Open Sequence file via Single Pass.
    http://forums.ni.com/t5/NI-TestStand/Direct-execut​ion-of-the-sequence-when-UI-launches/m-p/2000819#M​...
    How are you launching this sequence, is the user selecting the sequence on disk?    Is it already open in a SequenceViewMgr control?
    Would an operator interface be more applicable to your situation?
    Thanks,
    PH

  • Know steps names of called sequence file using sequence call step type in TestStand

    Hi,
        I have a problem in accessing step names in called sequence file using "Sequence call"step type in TestStand 4.0.
    I would list out all step names of called sequence file. Is it possible to do through C#.NET? If, yes, Please explain to me in detail with possible example.
    Thank you,
    regards
    RKK

    Hey RKK,
    I want to first set your expectations for the forums.  This is not a place for people to review and rewrite your code for you; this is a place for specific and general questions.  I am not saying your question in this thread is inappropriate, because it is a good questions.  We should just not post code and ask others to fix it here.  If you are looking for this type of service we have alliance members that can help you write your TestStand Operator Interface (www.ni.com/alliance).
    As for you question about getting the sequence names for a sequence file that is not the currently running sequence file, you will need to open a reference to that sequence files and then use the API calls that I mentioned in my previous posts.  You can use the Enigine.GetSequenceFileEx function to open a reference to sequence file, and you will need to close the reference with the Engine.ReleaseSequenceFile function when you are done using it.  After you have a reference to this external Sequence File, you can use the example dll and sequence I previously sent you.  I also attach a new sequence file (SeqFile2.seq) plus an updated GetNames.seq to illustrate how to use the above mentioned functions.  I hope this helps.  Have a great day!
    Best Regards,
    Software Engineer
    Jett R
    Attachments:
    GetNamesOfSequencesInFile.zip ‏52 KB

Maybe you are looking for