Configure Event Callbacks in test stand using labview

Hi,
I was going through Full OI - Configure Event Callbacks.vi in the test stand example. Can you please explain me how the vi works and what is techniwue behind it?
When i open the individual VI's in the reference, I could see more that 1 control in the front panel. But Only the user parameter is wired in the vi? Why is it so?
Regards
Gopal

Hi Gopal,
When the TestStand Engine fires events, this VI specifies how your Operator Interface will respond.  For example, let's examine the first event callback registered in Full OI - Configure Event Callbacks.vi , Exit Application.   When the TestStand Engine receives the message to shutdown, and then finishes its neccessary shutdown procedures, it will send a message to the Operator Interface.  For the Operator Interface to receive this message, it must "listen" for it.  In LabVIEW, this is done by Registering an Event Callback.  See the links below for details on how to implement this. 
The answer to your specific question is in step 7 of the first link below.  When TestStand sends the message to LabVIEW, there is information that is always passed.  The other input controls contain this information.  To create a VI that always includes these controls, right-click on the VI Ref input to the Reg Event Callback Property Node, and then select Create Callback VI.
Here are two references that talk about handling ActiveX callbacks in LabVIEW in general:
Registering and Handling .NET and ActiveX Events
Register Event Callback (Not in Base Package)
Cheers,
David Goldberg
National Instruments
Software R&D

Similar Messages

  • Producing test software using labview ...

    Hi friends,
    For those of you who produce test software using LabVIEW,
    TestStand, and C/C++, what are your biggest development problems? (By
    the way, this can be hardware or software.)
    George

    Ravens Fan pretty much sums it up. I suppose you can add onto it being forced to deal in a specific platform due to customer requirements when you know it would be orders of magnitude easier with another platform. 
    Out of curiousity, what is the purpose of the question?

  • How to get the value of the global variable of test stand in labview User interface?

    Hi.
     Can anyone Please share examples and tell me to how access the test stand global variable using labview user interface.
    Solved!
    Go to Solution.

    I'm not surprised that what you are doing doesn't work.  The Start Execution UI Message is triggered when the user clicks a button to start an execution.  Realize that most executions go through a process model.  So you could be looking at the sequence context of the process model and not your client sequence file.
    I recommend reading that link I posted above.  UI Messages are your best bet but you cannot just piggy back on an existing UI Message like this.  They may not be getting sent at the time you need them to be.  The only way to ensure you get what you want is to trigger one yourself at the right time.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Event callback with active x in labview

    I have an active x written by Aanderaa Instruments (makes
    weather and hydrology sensors), it contain various methods and events to get
    the next line of records from a sensory scanning unit. The connection is
    through the COM1, so far i have wired it up only using the methods to get next
    record level, but then I have found that sometimes it does not get the complete
    record from the COM port. So to solve that I have to use an event in the active
    x to check for new record available. So what I want to do is send the event
    (when complete record available) to VI that uses the get next record method to
    pick up the data from the COM1 port and then send the data back to the main VI
    for processing, plotting and writing.
    My problem is that when I connect the output from the GetNextRecord method to a
    indicator that I then wire on the connector pane to be an output from this
    VI  get an error that there is a wire function conflict. I have tried to
    explain a bit better in the attached pdf file with diagrams.
    The reason why I want to export the data back in the main VI is because it runs
    continuously collecting data every 2 min and I plot them on a graph and write
    them to a file so it will no work to have all that done in the event callback
    VI that will only run ever 2 min, then it will reset the graph the whole time
    and I want continuous data plotting for 10 days of historic data records. I
    also have a few other sensors that come in through a connector board that are
    written o the same file.
    hope somebody can give me some hints 
    Attachments:
    labview question.pdf ‏721 KB

    Hello!
    I checked the PDF file with snippets of your code and it looks alright, no issues or comments regarding that from my side. However it is really difficult for us to troubleshoot when we don’t have the ActiveX control available and even though we had access to the control it would still be quite tricky to find the cause of the problems you are experiencing since we don’t have the hardware and so on.
    I found one link only that mentioned wire conflicts when talking about COM objects and ActiveX and you can find it here:
    http://digital.ni.com/public.nsf/websearch/0CED780​C5D5EDCD5862569D9005AE1FA?OpenDocument
    Regards,
    Jimmie A.
    Applications Engineer, National Instruments
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Calling cvi functions from test stand using structs

    WE got some Issue regarding the process of calling cvi function using test stand

    I'm sorry to hear that you have some issues calling cvi functions. There is a shipping example that demonstrates how to call a CVI function and pass a structure. The example can be found in <TestStand>\Examples\StructPassing\C\Struct Passing to a C DLL.seq.
    If the example program does not resolve your issues, post again and please describe the problem in detail.
    Regards,
    Shannon R.
    Applications Engineer
    National Instruments

  • Problems in syncronyzing two threads into Test Stand using a Global Variable (TestStand 4.1.1)

    I have one thread that is doing TCPIP Aquisition into a Global variable defined in Teststand. And I have another thread that it supose to read it. All are in the same sequence and execution. The problem is that the aquisition thread got a lot of bytes, while the processing thread is reading always only a few. Do you know what the problem could be?
    I will attach also some pictures just to be maybe more clear...
    Attachments:
    Implementation_pictures.zip ‏368 KB

    I wasn't looking at your Sequence, I was looking at Receive_HDL_Block.JPG. What is that VI doing (the one with number 3 on the icon and Size_in_bytes as an input) ?
    Where in teststand are you doing any checking?
    I don't really understand your sequence.
    You have a sequence (running in a new thread) (why), following by another called Receiver Handler (also running in a new thread) then two more sequences which seem to do some with transmitting something (also running as new threads). You are only waiting on one of these threads (the Receiver Handler). There does seem to be any loops in TestStand, you dont seem to be bothered about the other threads that you have running. What happens when this test sequence finally does stop, what is stopping the Threads that you have running.
    Your pictures dont really seem to fit in with your Test Sequence, such as where does Test_005.vi fit into everything
    The whole thing is a bit of a nightmare.
    Maybe your best bet would be to scrap the lot and start again. Only this time have a better understanding of what you what to achieve, what would be best to put into Teststand and what to put into labview. Whether you really need all those new threads running.
    Sorry to be so blunt.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Can test stand execute LabVIEW executables ?

    Can I refer to LabVIEW executables in testand -> I can run VIs developed in LabVIEW through Teststand with only the LabVIEW runtime engine on the host computer ?

    What version of TestStand are you using and what version of LabVIEW are you using?
    Scott Richardson
    National Instruments

  • Executable and Register event callbacks

    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
     

    akonecki wrote:
    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
    The TestStand engine is singular regardless of what is hosting the components so it will post the appropriate callbacks. Try some tracing and see what flags up in your callback VI.

  • Responding to commandKind event - Test Stand/Labview UI

    Hey guys hey.  I have a control on a Labview/Test Stand UI that I want to change the attributes of based on if the user is logged in or a sequence file is loaded.  How can I create an event that will fire when the user logs in or out or a sequence is loaded or unloaded etc.  I have tried firing an event when the ActiveX control Login|Logout mouse click is up, but the event never fires.  I assume that's because the CommandKind_LoginLogout is attached to that control and maybe overrides the event?  My version is TS 4.1, LV 8.6, OS XP.  TY
    Solved!
    Go to Solution.

    Hi ET,
    This option may work for you. You can edit the Configure Event Callbacks.vi to include three extra events, a SequenceFileOpened, SequenceFileClosed, and UserChanged.  This will capture when someone hits one of the three buttons and execute the code in the callback VI.  You can modify the connector pane of the VI or the bundle for user parameters to include a reference to the control of interest, and pass the reference into the user parameter option so it is available in each callback VI.  You can then wire this up to a generic property node to modify the attributes of the control you created the reference for.  I have attached a screenshot of the modification of the Configure Event Callbacks VI.  I hope this option works for you!
    Cheers,
    Kelly R.
    Applications Engineer
    National Instruments
    Attachments:
    SequenceUserEventCallback.png ‏23 KB

  • Event CallBack in TestStand - Labview OI

    Hi everyone,
    i am using the simple interface for labview of teststand, i have modified the interface what i like, now what i want to do is when the user press the control button to execute a sequence the system ask the user for something and depending of it answer execute or not the sequence, for this i have create a new event callback, modifying the configure event callback.vi, what i introduce in the Reg Event Callback is that when StartExecution event starts it run the callback vi that contains the question to the user.
    It works well because when the user press the run sequence control button or the restart contorl button, the system ask the user. But the problem is when the user press the exit control button, the system ask too.
    Why occurs this, and how can i fix it??
    Thank you in advance

    Hi Marith,
    This behavior is occurring because the Application Manager automatically executes the FrontEndCallbacks sequence file when the Operator interface starts, and again as part of the shutdown.  To prevent this from occurring, we'll need to check that the execution is not the FrontendCallbacks execution before launching the dialog (the other case is "FrontEndCallbacks.Seq"):
    You also may want to consider a couple alternative implementations:
    use the UImessage event to run the code when the UIMsg_ModelState_Initializing message is posted (when the process model begins executing)
    putting this code in the process model rather than the User interface - in this case we could just add a step in the setup of the model, and terminate the execution if the user chooses.
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • Test Stand LabView adapter 8.6 run time will not run 8.5 VIs

    I’m trying to run a script I developed with a dev computer on
    a regular PC set up with a Test Stand User Gui, and run times for Test Stand
    and Labview.
    With the Test Stand Labview adapter set to 8.6.1 all of my
    ENA(Agilent Network Analyzer) calls fail for “VI Version is too early to
    convert  to the current  LabVIEW version.”  The ENA library is written in 8.5.  If I set the adapter to 8.5.1 then all of the
    VIs developed in 8.6 fail.  In addition
    it will not run any VIs that I save back to 8.5.  I installed a demo Labview development
    version (2010?) and everything ran fine with the adapter set to Development
    System.
    I am not sure what to try next to get it to run on the
    regular PC, any hints.
    Test Stand = 4.2
    LabView = 8.6
    Running in windows XP
    Solved!
    Go to Solution.

    One of the many things I tried was saving the ENA library to 8.6, but I could not get it work.
    This is the Original library I installed and was trying to Convert (8.0 upgrade agena.zip)
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=001CE83736F3674BE0440003BA7CCD...
    I am about to try this one. (8.2.1 Upgrade)
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=74D1F1D4EB5268E8E04400144FB7D2...
    I am pretty new to labview so I am not sure how to make the save to previous version workfor libraries, but I can easily do it with individual VIs.  For libraries, it creates a new directory, and puts in all of the files and then asks me about saving the lib files as something else.  This is where I think I get it wrong.  I tried it again today and got the same results.
    I greatly appreciate the Help
    Brian

  • Problems using Labview as ActiveX Server

    Hello,
           I have been having difficulty using Labview as an AcvtiveX server. I have reviewed all the postings on this subject and most are either pre Labview 8.2 and thus do not account for the changes made between 8.2 and 8.5 which broke the Activex server functions. I have looked at the recommendations for changing the to code to export (exported vi's in a DLL or Source distribution) and have tried these with no success. The closest example I have found was posted here http://forums.ni.com/ni/board/message?board.id=170&thread.id=283417 the example code they posted does ont work for me and still generates and error 3005.
          What i need is simple. I want to turn my applicaiton into a Vi server.. Expose a vi that acceses elements in the Vi server.. (controls, queues, Globals etc) that are in the Vi server context. I would then like to build a vi .. or dll that calls the 'exposed' vi in the vi server to pass data to or from the vi server. The V test.zip example file in the above indicated post is a pretty good example of this .. it just does not seem to work when i build it in 8.5. Are there any GOOD and 'current' examples of using labview as the ActiveX server (Compiled) and calling exposed vis from an external application Labivew, Visual Basic.. etc??  I am only interested in cases where Labview is the Sever. or both client and server.
           I have used a tool "ActiveXplorer" to examine the registered "exe" when the viserver is run. It always shows that there is no Type Library associated and the object is not creatable. There is a .tlb created by the project build however, where as the previous version 8.2.1 of Labview did not build that correctly. I have also tried this on 8.6 with similar error 3005 generated. sooooo what am i missing?
          Thanks
           Louis Ashford

    Mike,
           Thank you for your response to my question. The problem is that the example you site does not use the Labview vi as the Server. Excel is actually the vi server and the automation open is using and excel automation object. I am sure that Excel creates proper automation objects .. Labview however does not seem to. So while this example shows how labview can function as a client it is not an example of a compiled Labview Sever being accessed by a 'laview vi'. Possibly I am not looking at the vi that you are thinking of.
           The examples i am aware of:
                        "ActiveX Event Callback for Excel.vi... (Excel is server not Labview vi)
                        "ActiveX Event Callback for IE.vi (same Labview vi is client)
                        "Write Table to XL.vi" ( again excel is the server)
                        "3D Graph Properties - Torus.vi" (accesses an activex Control 'not' and Activex EXE)
                        "3D Lorenz Attractor Draw at Compeltion using 3D Curve.vi (Uses an activex  control not activex Exe server)
                        "3D Parametric Surface - Ribbon.vi (Uses an activex  control not activex Exe server)
                        "3D Surface Example - Fluctuating Sine Wave.vi (Uses an activex  control not activex Exe server)
                        "Excel Macro Example.vi (Uses excel as automation server..not Labview)
                        "FamilyTree.vi (uses MSComctlLib.ITreeView object not Labview as server)
                        "SlideShow.vi" (uses PowerPoint._Application not Laview as server)
          Most of the posts I have seen are for versions prior to  Labview version 8.2 (where the ActiveX server was broken) I have seen only a few posts that actually address the issue i am talking about. however thus far no real solution has been offered. I get the same results when compiling and testing this with 8.6..  as well. So have you tried this Mike? Possibly i am missing something very simple..
          The example i did find and gave the link to is a pretty simple one. This does not work on my machine at all. You can select the automation server that is registered with windows after running the server one time and this then breaks the client vi.. I have found by reselecting the GetViReference property node in the Client vi that it will the 'fix' the client vi as far as labview is concerened and it no longer shows and error. Now when you run the Client vi it will infact find the vi server and will launch it ok. However. The open automation object then hangs.. for quite some time then returns the error
    "Error -2146959355 occurred at Server execution failed
     in Client_reader.vi" Obviously the automation Exe (server) was seen because it was opened yet it did not return a valid reference so the subsequent property nodes in the client.vi will fail. Something is wrong with Labviews opening of or creating of automation objects..
              Thanks,,
                    Louis Ashford

  • Test Stand and MAX Settings

    I am using test stand and Labview 7.1.  I used Express VIs to setup my RS232 communications in numerous VIs that I call from test stand for different types of tests.  I have the same product, but with different baud rates.  Is there a way in test stand to change the baud rate settings in MAX for Com1?  I tried to create a Labview program to do it, but once a sequence runs that has the Express VI I/O Control it must start a new VISA session and I loose what was set up and it reverts back to the MAX settings for Com1.  The only time The VISA setup vi I created appears to work is when I converted an Express VI (or opened the Express VI's front panel).  And messed with the code.

    Hey,
    I would suggest using the VISA Configure Serial Port to configure the port and then calling the Express VI using the VISA Resource Name Out from the configure VI.
    Regard,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    setbaudrate.vi ‏36 KB

  • How to Remove in/out port for Test Stand VI

    Ok - This is probably something stupid, but i can not really find a basic example to understand what's wrong.
    I just want to create a Test Stand VI, that in adition to the basic IO, use extra IOs for configuration for example. Here is what i do
    1 - Create a new Pass/Fail VI from Test Stand
    2 - LabVIEW start by itself, show my VI
    3 - I put a basic "Not" logic, and connect the input to the logic
    4 - Save
    5 - Reload the Prototype in TS, and here my new input does not shows up.
    I do not believe that i can make this any simpler. Could someone explained what is wrong here.
    Solved!
    Go to Solution.

    When you create a VI using the "Create VI" function in TS. Output ports are not connected and still shows up in TS.
    I attached the simplest example in the world. What i expect to get in TS after i update the prototype is to have the same output as the initial one + an new input that allow me to control my output flag.
    Attachments:
    PassTest.vi ‏9 KB

  • Test Stand Evaluation

    Hi.
    I would like to get some feedback regarding using Test Stand with Labview.
    Currently I am using Delphi Interface as my Excecutive Engine and Active
    X server to communicate with labview. The data logging, PLC I/O and Login/logout
    are part of Delphi Inteface. The labview is used only to execute the actual
    test. Now by switching to Test Stand, would that benefit me in any way.(For
    instance: Does Test Stand(LV Server) allows me to run single or multiple
    Vi's, without creating 'exe')?

    There could be lots of advantages to switching to TestStand, but it depends on your application.
    1. If you deploy your applications to several different environments or uses (board test, system test, service, field service, etc.) then TestStand allows you to customize different "process models" for each environment. The actual test code is contained in a sequence file. Since the process model is shared by all sequence files, it is a great place to put the common functions such as UUT identification and data logging. Even if you don't need different process models, keeping all this code in one place makes it easier to maintain. There is no compiling with TestStand, so you can change the process model and the changes will take effect in all your applications.
    2.
    TestStand allows you to easily call many different types of code, not just Labview. You can call CVI, DLL's, EXE's, and ActiveX. I recently saw an article about a way to call Perl code. Again, the value of this depends on your application.
    3. If you want to integrate your application with a database, TestStand has great database tools. The database logging utility allows you to log data to any table format.
    4. If you are loading test limits from an external source, TestStand makes it easy with a tool called Property Loader.
    I suggest you get a free demo copy and try it out. TestStand is incredibly powerful.
    Mark ([email protected])

Maybe you are looking for

  • Aspect ratio for a video object

    How can you maintain a video objects aspect ratio? The property maintainAspectRatio seems to work only with the flvplayback component.

  • Music in Itunes media folder but not in Itunes

    How do I get all of my music in the itunes media folder to appear in my Itunes library?

  • K8N-PLATINUM NF4U SLI and PSU Question

    Hi I have read a lot in these forums about the issues arose with the K8N-PLATINUM NF4U SLI  board and the PSUs most of the users have. Because I am going to buy the specific board i would like your opinion about the SilentPurePower 560W PSu of Therma

  • Question regarding COMPRESSION

    Hi Experts, I have created a table a normal table without compression as shown below: SQL> CREATE TABLE t pctfree 50 as select * from all_objects; Table created. SQL> insert into t select * from t; 41261 rows created. SQL> insert into t select * from

  • Unexpected behaviour in MS CRM 2013

    Hi, In MS CRM 2013 contacts form I am facing an issue. For some records the tab heading is having an underline. This is happening only for some records, not for all. Also the issue is in IE 9, for IE 11 its working fine. Can anyone suggest a solution