LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Teststand from LabView

I've written a front panel GUI in LV 7.0. The operator presses a particular "button" to execute a certain test. How do you call a Teststand 3.0 seq ( that I've written) unique to that button when the operator presses it ? The LV Operator Interface shipped with LV was of no help.
0 Kudos
Message 1 of 3
(2,738 Views)
Clint,

In this case you really are using LabVIEW as your Operator Interface to a TestStand sequence. This means that your user is interacting with LabVIEW to execute your test program. Since TestStand is what executes the sequence, you really do need to use code similar to what is in the example LabVIEW Operator Interfaces. There are two examples that ship with TestStand (not LabVIEW), the simple OI and the Full-featured. Since I don't know what features you'd like other than a button to execute a test, its hard to say which one would be best for you to look at. The Full-featured OI has most of the functionality already written for you. The simple OI has less features, which also means that it is much easier to understand since there is less code.

Now, if you have all the general operator interface programming down, and you are only trying to figure out how to make a button execute a certain test there are 2 ways that we can have that happen. Those two ways are to either use the TestStand API or to use the process model.

First, using the TestStand API, there are methods which tell TestStand what actions to perform. So, if you want TestStand to execute a sequence based upon when you click on a particular button, whenever that button is clicked, you would call the TestStand API to execute a particular sequence. There is a method that would do this (Engine.NewExecution). You can call these TestStand API methods and properties from LabVIEW using the Invoke Node and Property Node.

The second way to accomplish this would be to create different execution entry points in your process model. An execution entry point is found in the process model and contains a certain sequence of events that take place before and after your client sequence executes. For example, Test UUTs and Single Pass are two execution entry points. Test UUTs executes more than one UUT, shows the serial number prompt, and the green/red pass fail banner. Single pass only executes one UUT. Both generate a report and log to the database and execute the client sequence. You can make your own execution entry points for each of the client sequences that you plan to execute. Then you can make changes in your process model to have each execution entry point call a particular client sequence file. In the actual operator interface, you can add a TestStand visible button UI control for each execution entry point and connect each button to one of the execution entry points using the SequenceFileViewMgr.ConnectCommand method. The command would be "CommandKind_ExecutionEntryPoints_Set". Note that an example of this is included in the shipping examples already.

I hope that helps you. If you are interested in learning more about the TestStand API, the TestStand Help is a great resource about all the methods and properties that are available. The "Using LabVIEW with TestStand" manual also describes how the LabVIEW operator interface works. The TestStand II course (see www.ni.com/training) covers the TestStand API and the Operator Interface in detail. If you have already taken the course, looking at Chapters 1 and 5 (for TestStand version 3.0) would be a great review.

Hope that helps you!

Regards,
Shannon R
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,738 Views)
Shannon,
It sounds like I've got a little research to do. Thank-you for the different options.
0 Kudos
Message 3 of 3
(2,738 Views)