Calling Sequences from CVI GUI

Hello ,
I am trying to make a program in Teststand combined with cvi and i have 3 problems :
1. I have a program in Teststand thats runs GUI in CVI , in that GUI i have 2 buttons and i want each button to run a diffrent Sequence in TestStand .
2. How can i tell make it so that the GUI will stay open and visible and TestStand will run the Sequences i told him in the " background " .
3. Where can i find a guide to the TS_ Functions in CVI ?
Thank You ,
Kobi
Kobi Kalif
Software Engineer
Solved!
Go to Solution.

You may want to look at the following example to see how to develop a CVI GUI:
Dynamically Controlling a LabWindows/CVI GUI across Multiple TestStand Steps
As for calling a sequence from a CVI GUI, you will want to use the application manager, as discussed in this document:
Programmatically Loading a Sequence File in a TestStand Operator Interface
You can find a guide to the ts_ functions by simple opening the function panel for the function, and right clicking in ablank area.
Al B.
Staff Software Engineer - TestStand
CTA/CLD

Similar Messages

  • Calling test sequence from CVI DLL that use ATL COM object does not work

    I am trying to call some DLL function writen in CVI from teststand. The CVI DLL is using ATL COM object(Written by me).
    The ATL COM object making instance of several ATL COM object inside it (including two controls that contains dialog). If I use a client writen in VC++ 6 and use the ATL COM (writen by me) works perfectly. But if I try to use it from CVI DLL it does not work any more.
    What is wrong? The client is passing an IUnknow interface to my component. Can anybody explain me what is wrong?

    It is not clear from your question as to what is specifically failing. If possible, one option would be to remove TestStand from the picture and see if the problem still occurs using a CVI EXE that invokes the CVI DLL.
    Scott Richardson - NI
    Scott Richardson
    National Instruments

  • How to execute a sequence from cvi code ?

    Hello ,
    I'm programing a test software using Labwindows CVI 9.0 and TestStand 4.2 .
    I'm Using CVI GUI and i want for example to press a button that will lanuch a squence from Teststand .
    the SEQ file is already open because i'm launching the GUI from Teststand .
    How can i execute a seq from CVI ?
    Thank you for your help.... Kobi
    Kobi Kalif
    Software Engineer

    Refer to the Example User Interfaces section in Chapter 9, Creating Custom User Interfaces, of the TestStand Reference Manual (p. 9-1):
    Example User Interfaces
    The <TestStand>\UserInterfaces directory includes the executable, project, and source code files for each example user interface. The Full-Featured subdirectory contains user interfaces for loading, viewing, editing, saving, executing, and debugging sequence files. The Simple subdirectory contains similar but limited user interfaces with fewer commands and options but no menus. Also, the simple example user interfaces display the steps for executions you run but do not display steps for sequences you load. Both subdirectories contain source code for LabVIEW, LabWindows/CVI, Microsoft Visual Basic .NET, C#, and C++ (MFC).TestStand installs the source code files for the default user interfaces in the <TestStand>\UserInterfaces and <TestStand Public>\UserInterfaces directories. To modify the installed user interfaces or to create new user interfaces, modify the files in the <TestStand Public>\UserInterfaces directory. You can use the read-only source files for the default user interfaces in the <TestStand>\ UserInterfaces directory as a reference. When you modify installed files, rename the files after you modify them if you want to create a separate custom component. You do not have to rename the files after you modify them if you only want to modify the behavior of an existing component. If you do not rename the files and you use the files in a future version of TestStand, changes National Instruments makes to the component might not be compatible with the modified version of the component. Storing new and customized files in the <TestStand Public> directory ensures that new installations of the same version of TestStand do not overwrite the customizations and ensures that uninstalling TestStand does not remove the files you customize.
    Note: National Instruments recommends that you track the changes you make to the user interface source code files so you can integrate the changes with any enhancements in future versions of the TestStand User Interfaces.
    You might also find the Example Programs topic in the NI TestStand Help useful for other tasks.

  • Sequence from Control file

    Can I call sequence from Control file( Sql Loader)
    Plz help.

    As an option to what Warren suggested, you can also specify an actual sequence name in the control file itself.
      LOAD DATA
      INFILE datafile.dat
      APPEND
      INTO TABLE <table_name>
      FIELDS TERMINATED BY '|'
      TRAILING NULLCOLS
        (<column_name> CHAR,
         <column_name> CHAR,
         <column_name> "seq_name.nextval")

  • Post Actions: Called Sequence not reporting

    I am using TestStand 2.0. I have a step (that is forced to fail) that has the "Post Actions" set to "On Fail:" "Call Sequence". Unfortunately the steps in the called sequence are not showing up in the test report. I can verify that the called sequence is running by stepping through the steps. Also if I call the called sequence from a "SequenceCall" step then its steps do show up in the report. How do I get the steps of a sequence that is called via "'Post Actions' set to 'On Fail:' 'Call Sequence'" to show up in the test report?

    Kevin -
    See attached sequences with appropriate changes to include PostAction for the TestStand 2.0 sequences. You should be able to diff these with the original 2.0 sequences to see the changes.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments
    Attachments:
    reportgen_txt.seq ‏95 KB
    reportgen_html.seq ‏110 KB

  • Trying to call a method on an RMI server from a GUI

    Hi all, I'm new to the forums and I desperately need some help!
    My question fits into the RMI category but also the database/GUI side so sorry if this is posted in the wrong place.
    My application is a client/server system (programmed in Netbeans 6.8) that also uses GUIs and JDBC-ODBC. Basically, I am trying to call a method that adds an entry to my database from a GUI button.
    Due to the required RMI, I have the ServerInterface that extends Remote and I have a ServerImpl class that implements the Interface, and the RMI works fine so there is no problem there.
    My code for the button is:
    private void addUserActionPerformed(java.awt.event.ActionEvent evt) {                                       
    try{server.addNewUser("new");}
    catch(Exception e){}
    addUser.setText("buttonhaschanged");
    The server variable is declared above as ServerImpl server;
    The actual addNewUser method works fine when it is called explicitly via RMI in my main "Client" class, but this GUI is going to be like an "administrator GUI" that can manipulate the database, so there is no RMI involved here.
    Anyway, my button doesn't have any effect on the database, but the button changes text as desired so the button itself works, but it doesn't do what I want to the database, so I think my problem is the use of my "server" variable. I've tried making it static and I've tried making it of type ServerInterface, but no luck. Would I have to make the GUI class extend the interface too?
    Sorry for rambling on!
    Many thanks in advance
    David
    Edited by: DHD on Feb 26, 2010 6:15 AM

    Would I have to make the GUI class extend the interface too?Your GUI has nothing to do with the RMI. How did you obtaint the "server" ? have you looked in the RMI registry to get the stub object ?
    The second thing to notice is you are invoking a RMI calls on a EDT which you should not do it. Your RMI method calls should be invoked via SwingWorker-->doInBackground(); please take a look at the Java Doc
    [http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html|java Doc SwingWorker sample usage]
    You mentioned that the RMI method invocation works fine from the main class and not from the GUI so what did you do in the main class to get the stub do it in the doInBackground() method
    Regards,
    Alan
    London

  • CVI crashes when calling function from external DLL

    I'm calling a CVI library from Test Stand 4.1.  In that CVI library I load an external DLL (using LoadLibrary) and create a few function pointers (using GetProcAddress).  The DLL loads successfully, and I get addresses for all of the imported functions.  
    However, when I one of the functions is called CVI crashes (Test Stand says it lost the ActiveX connection to CVI) when executing in an external CVI instance.  If executed in the Test Stand process I get a system level exception.
    If I step through the code in CVI, it hangs after trying to step into or over the call to the function pointer from the external DLL.
    I am able to call the functions in a small test project I created in CVI, however when integrating it into an existing test library and calling it through Test Stand it fails.
    Any ideas on how to go about debugging this issue?

    Have you tried calling into the dll that CVI calls directly from TestStand?  I am curious to know if this also crashes.
    I am also curious to know if there are any path references in the dll that is called by the CVI program.  If so are they relative, or absolute paths?
    I ask because one of the possibilities is that relative paths are being used to specify a path from the location of the code that is called, and they are not working because the current working directory is being specified by TestStand, and the paths are not relative to the working directory given by TestStand.
    Jensen
    National Instruments
    Applications Engineer

  • Determine where badi is called from : webshop, GUI or webUI

    Hi Experts,
    I am working on BADI com_partner_badi.
    I want to determine where this badi is being called from, ie, either from webshop, GUI or webUI in the ABAP debugger.
    Which parameter of the badi should i check , which will provide me with the calling application ?
    Thanks,
    Shantanu.
    Edited by: shantanu sardal on Mar 18, 2009 10:15 AM

    Hi Shantanu,
    Here is the explanation: The purpose of BADI is to enhance the functionality as per the customer needs. SAP has given the envelope in which you can write your own logic to change the SAP's standard behavior. Now the question that from where it gets triggered ?? It is not dependent on the GUI or Web UI etc , It can be triggered from any where as long as the component's code is getting triggered.
    For example You create a BP from GUI or from WebUI does not matters as underneath API's remains the same and  if you have a BADI implementation for the BP it will get triggered irrespective of the GUI or UI.
    Hope this will clear your doubt.
    Thanks,
    Vikash.

  • Calling a VB Script and Matlab code from LabVIEW GUI.

    Hi,
    Can anyone help me out in Calling a VB Script and Matlab code from LabVIEW GUI? GUI will be developed in Labview and currently we have some scripts written in VB and Matlab and we need to incorporate the same through LabVIEW. Can anyone let me know how this can be implemented? 
    Regards,
    Sharmash

    For VBScript you can call the Windows Scripting Host application using the System Exec function, or you can use IScriptControl, which is an ActiveX control. Be aware that with the IScriptControl there's a small bug. You can read more about it in this post.
    For Matlab, there's a Matlab node that you can use. You can either copy and past your Matlab script in the node, or just write a function call statement. The node simply calls Matlab. Or, you can do as suggested and use the MathScript node, which is basically an alternative to Matlab. The MatchScript node doesn't support everything that Matlab does, so you will need to check it against your script.
    Or, you can do as suggested, and rewrite it all in LabVIEW, unless you can't because these scripts are used by other applications.

  • Calling DLL2 from DLL1 from TestStand

    Hi,
    I have a TestStand sequence that calls function1 provided by DLL1.dll,
    which in turn calls function2 in DLL2.dll.
    If my test sequence consists of a single action, 'Call function1 from
    DLL1.dll', the sequence fails with the error message 'Could not load
    DLL or external library DLL1.dll'
    If I insert a new action BEFORE this action, 'Call function2 from
    DLL2.dll', both DLLs load with no problem, and the sequence operates as
    expected, except that I have an additional unwanted call to function2.
    (This extra call loads DLL2.dll, so it is already in memory when
    DLL1.dll is loaded, so the second load is successful)
    I have managed to reproduce this problem with the following
    configurations:
    1. DLL1.dll and DLL2.dll are regu
    lar DLLs using MFC created with MSVC++
    6.0.
    2. DLL1.dll is a regular DLL using MFC created with MSVC++ 6.0, and
    DLL2.dll is created with LabWindows/CVI 5.0.
    Any ideas / suggestions as to how I can remove the initial call to
    function2 are much appreciated.
    Cheers,
    Jerry
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    Thanks Paul, that's done the trick...
    Cheers,
    Jeremy
    In article <[email protected]>,
    [email protected] wrote:
    > Jerry,
    >
    > When DLL1 attempts to call DLL2, it can't find it in the DLL search
    > path. Either put DLL2 in the same directory as DLL1 or put DLL2 in
    the
    > Windows\System or Window\System32 (WinNT) directory. If DLL2 uses
    > a .UIR file, copy this also. If DLL2 calls other DLLs, they should be
    > in the DLL search path also.
    > TestStand loads DLL2 directly so it doesn't need to be in the search
    > path for TestStand to find it.
    >
    > Let us know if this solves\doesn't solve the problem.
    > Paul Mueller
    > National Instruments
    >
    > In article <[email protected]>,
    > [email protected] wrote:
    > > Hi,
    > >
    > > I have a TestStand sequence that calls function1 provided by
    DLL1.dll,
    > > which in turn calls function2 in DLL2.dll.
    > >
    > > If my test sequence consists of a single action, 'Call function1
    from
    > > DLL1.dll', the sequence fails with the error message 'Could not load
    > > DLL or external library DLL1.dll'
    > >
    > > If I insert a new action BEFORE this action, 'Call function2 from
    > > DLL2.dll', both DLLs load with no problem, and the sequence operates
    > as
    > > expected, except that I have an additional unwanted call to
    function2.
    > >
    > > (This extra call loads DLL2.dll, so it is already in memory when
    > > DLL1.dll is loaded, so the second load is successful)
    > >
    > > I have managed to reproduce this problem with the following
    > > configurations:
    > >
    > > 1. DLL1.dll and DLL2.dll are regular DLLs using MFC created with
    > MSVC++
    > > 6.0.
    > >
    > > 2. DLL1.dll is a regular DLL using MFC created with MSVC++ 6.0, and
    > > DLL2.dll is created with LabWindows/CVI 5.0.
    > >
    > > Any ideas / suggestions as to how I can remove the initial call to
    > > function2 are much appreciated.
    > >
    > > Cheers,
    > >
    > > Jerry
    > >
    > > Sent via Deja.com http://www.deja.com/
    > > Share what you know. Learn what you don't.
    > >
    >
    > Sent via Deja.com http://www.deja.com/
    > Share what you know. Learn what you don't.
    >
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

  • Error: Calling Sequencing batch_init-General Error 95345

    Hi,
    While running PRC:create accounting program..the following error message shown
    Calling sequencing batch_init
    Technical problem : Problem encountered in sequencing BATCH_INIT.
    How can i overcome dis issue??
    Pls help me
    Thanks a lot in advance

    Hi,
    as BDC is calling screens and in Webdynpro ABAP you cannot use SAP GUI sceeen, you are getting short dump.
    Refer CNTL_SYSTEM_ERROR in webservices from r/3 system
    Thanks,
    Chandra

  • Control LabVIEW DLL from LabWindows GUI only

    Hello,
    I have been developing an application in LabWindows/CVI and have recently built some auxiliary applications in LabVIEW.  My goal is to make the LabVIEW applications into a DLL and call them from the LabWindows app; however, one of my LabVIEW VIs has a front panel control and a local variable to stop a pair of asynchronous while loops.  What I would like to do is remove/hide the front panel of this LabVIEW VI and control the VI from the LabWindows GUI exclusively.  Is this possible?
    Thanks!
    Slowpoke
    Slowpoke
    CLAD (believe it or not!), using LabVIEW 8.5
    They don't call me "Slowpoke" for nothin'!

    Hi, David,
    Once I figured out how to make a front panel control into a parameter, I had what must be a common reaction among LabVIEW users: Can it really be that easy?  Thank you for your reply and your assistance.
    Slowpoke
    Slowpoke
    CLAD (believe it or not!), using LabVIEW 8.5
    They don't call me "Slowpoke" for nothin'!

  • Calling arraylist from another class - help please!!

    Hey, I need some help calling my arraylist from my GUI class, as the arraylist is in the 'AlbumList' class and not in the 'GUI' class i get the error 'cannot find symbol', which is pretty obvious but i cannot figure how to get around this problem. help would be greatly appreciated.
    i have written ***PROBLEM*** next to the bad line of code!
    Thanks!!
    public class Album
        String artist;
        String title;
        String genre;
        public Album(String a, String t, String g)
            artist = a;
         title = t;
            genre = g;
         public String getArtist()
            return artist;
        public String getTitle()
            return title;
         public String getGenre()
            return genre;
    public class AlbumList
        public ArrayList <Album> theAlbums;
        int pointer = -1;
        public AlbumList()
            theAlbums = new ArrayList <Album>();
        public void addAlbum(Album newAlbum)
         theAlbums.add(newAlbum);
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class GUI extends JFrame
        public int max = 5;
        public int numAlbums = 4;
        public int pointer = -1;
        public GUI ()
            super("Recording System");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel main = new JPanel();
            JPanel panel1 = new JPanel();
            panel1.setLayout(new GridLayout(3,2,0,0));
            JPanel panel2 = new JPanel();
            panel2.setLayout(new GridLayout(1,2,20,0));
            final JLabel artistLBL = new JLabel("Artist: ");
            final JLabel titleLBL = new JLabel("Title: ");
            final JLabel genreLBL = new JLabel("Genre: ");
            final JTextField artistFLD = new JTextField(20);
            final JTextField titleFLD = new JTextField(20);
            final JTextField genreFLD = new JTextField(20);
            final JButton nextBTN = new JButton("Next");
            nextBTN.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    pointer++;
                    artistFLD.setText(theAlbums.get(pointer).getArtist());       ***PROBLEM***
                    titleFLD.setText("NEXT");
                    genreFLD.setText("NEXT");
            final JButton prevBTN = new JButton("Prev");
            prevBTN.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    pointer--;
                    artistFLD.setText("PREVIOUS");
                    titleFLD.setText("PREVIOUS");
                    genreFLD.setText("PREVIOUS");
         panel1.add(artistLBL);
            panel1.add(artistFLD);
            panel1.add(titleLBL);
            panel1.add(titleFLD);
            panel1.add(genreLBL);
            panel1.add(genreFLD);
            panel2.add(prevBTN);
            panel2.add(nextBTN);
            main.add(panel1);
            main.add(panel2);
            setVisible(true);
            this.getContentPane().add(main);
            setSize(500, 500);
    -----------------------------------------------------------------------Thanks!!
    Edited by: phreeck on Nov 3, 2007 8:55 PM

    thanks, it dosnt give me a complication error but when i press the button it says out of bounds error, and i think my arraylist may be empty possibly even though i put this data in.. this is my test file which runs it all.
    any ideas? thanks!!
    public class Test
        public static void main(String []args)
            AlbumList a = new AlbumList();
            String aArtist = "IronMaiden";
            String aTitle = "7thSon";
            String aGenre = "HeavyMetal";
            Album newA = new Album(aArtist, aTitle, aGenre);
            a.addAlbum(newA);
            aArtist = "LambOfGod";
            aTitle = "Sacrament";
            aGenre = "Metal";
            Album newB = new Album(aArtist, aTitle, aGenre);
            a.addAlbum(newB);
            aArtist = "JohnMayer";
            aTitle = "Continuum";
            aGenre = "Guitar";
            Album newC = new Album(aArtist, aTitle, aGenre);
            a.addAlbum(newC);
            aArtist = "StillRemains";
            aTitle = "TheSerpent";
            aGenre = "Metal";
            Album newD = new Album(aArtist, aTitle, aGenre);
            a.addAlbum(newD);
         GUI tester = new GUI();
    }

  • Is there a way to pass or access the FileGlobal​s of the main sequence from an ActiveX subsequenc​e that runs in parallel?

    I developed an elborate avionics Test Bench using the data types and FileGlobals to define all of my instruments and signals. The instruments have some minor changes between Test Bench's and the signals change between projects. The actual LabVIEW VI's were written so that they would be generic, in nature, and rely on spreadsheets to determine what inputs and expected outputs are to be tested and use the FileGlobals to determine how to process each signal from this extensive data structure. This methodology has worked well so far. Now I have the need to read some of the signals being output by the black box and compute a signal as input. The black box it very particular about the timing related to how fast this input changes in response to the outputs.
    Anyway, I was able to develop another sub-sequence within the main sequence and have it run as a parallel process. The problem that I have is that this extensive FileGlobals data structure is shown in the sub-sequence, but all of the data is zero or blank. What I really need is the FileGlobal data in the sub-sequence to be equal to the FileGlobals data of the main sequence at the time the ActiveX sequence is started OR have some way to access the main sequence FileGlobals from the ActiveX sub-sequence. I was able to use the when doing a Action of "call method" and a moethod of "NewExecution" to start the sub-sequence. The problem is that the data passed was only the first element in the FilGlobals structure and not the entire FileGlobals.
    I have TestStand version 1.0.3 . I know, the answer is usually to upgrade, but I have my own company and am sub-contracting at this company. It took me a month to convince this company that TestStand was the way to go rather than use the old LabVIEW Test Executive that they still have. The point is that it may be difficult to get them to get a later version and at this point I do not have time to wait for a upgrade. So I need to determine an easy way to impliment this with the existing version of TestStand.
    Any pointers on how you might solve this problem would be appreciated. You can email me directly at [email protected] .
    Thank you for your help!

    William,
    As you alluded, TestStand 2.0 has better solutions to this problem than TestStand 1.0.x. These include
    1) Executing the subsequence on a different thread but under the same execution. The file globals are then common to the calling and called sequence. The improved Sequence Call step type gives you this option.
    2) There is a new sequence file property that provides that "All Executions Share the Same File Globals".
    The reason that the file globals are not shared between your 2 sequences is that they are each executed as separate executions. That is, they are each executed using the NewExecution method. With each new execution a run-time copy of the sequence is made, including the file globals.
    I am assuming that you want to execute the subsequence asynchronously (i.e. in parallel) to the MainSequence and therefore must use the NewExecution method to do so. Since you must use TestStand 1.0.3 then the best option is to pass the file globals to the new execution as sequence parameters. It sounds like you tried this but had difficulties. The steps to do this are:
    A) Create parameters in your called sequence that mirror the file globals that you want to pass from your MainSequence.
    B) Create a new data type that is a container. The subproperties of this container must mirror the parameters in your called sequence. It is important that they are in the same order as the parameters.
    C) Create an instance of this container data type as variable.
    D) Pass this variable as the parameter of the NewExecution method.
    I have attached an example of how to do this. I have 2 file globals that I want passed, Number and String. I have another file global that is an instance of the parameter container that I pass with the NewExecution method (could also have made as local variable). Any time I update the values of the container�s subproperty, the changes are available in the executing "subsequence". Therefore, I must update the value of these container subproperties every time I want to have access to new file global values. There is clearly some redundancy here in that my MainSequence must copy the Number and String values to the container subproperties. If fact, it may be better to simply delete the Number and String file globals and simply use the subproperties of the container directly.
    You probably have to play around with the example to synchronize the change of the file globals with the message popups in the subsequence. In TS 2.0 I would have synchronized them with the new synchronization step types.
    Attachments:
    passfileglobals.seq ‏37 KB

  • BW error:  "invalid call sequence for interface when recording changes"

    I am getting the error "invalid call sequence for interface when recording changes" when I try to activate a datasource in BW.  Any ideas on how to resolve this error?
    Thanks.

    I already tried that.  This is what's happening..  When I get this error, if I try again it will activate and gets collected into a transport.  I moved this transport to our QA system.  As soon as I try to execute an infopackage under this datasource in QA, I get the error datasource   xxxxx must be activated.   Before the excecution of the infopackage, the datasource is in "Active version executable".   After I get the error message "datasource must be activated", the datasource in the QA system changes to "Active version not executable".   I am not sure all these issues are related back to the "invalid call sequence" error I am getting when I try to activate the data source.
    I also tried recollecting the transport from our Dev system to QA and it still gives the above errors.
    Any help?
    Thanks.

Maybe you are looking for