07-29-2011 09:48 AM
I am starting to work with TestStand and I was looking into using the User Interface. I know that a couple of examples are provided and that there is a couple of sections of literature on the subject, but there does not appear to be a very helpful (get started from scratch) type of documentation that I can find. Does such a thing exist? If not, what is the best way to get started?
Solved! Go to Solution.
07-29-2011 10:47 AM
Modifying the UI can be daunting. Starting from scratch would be terrifying.
I recommend basing your custom UI off an existing one (Full Featured or Simple).
Here is an Advanced Architecture Series paper: http://zone.ni.com/devzone/cda/tut/p/id/7560
It's probably your best bet. The basic keys to customizing the UI:
UI Messages:http://zone.ni.com/devzone/cda/tut/p/id/4532
ActiveX Controls: All the TestStand controls
TestStand API: Understanding the objects in TestStand and how to manipulate them. Refer to the TestStand API Reference Poster in Start>>All Programs>>National Instruments>>TestStand>>Documentation>>Manuals
Hope this helps!
07-29-2011 11:03 AM
Do you know of any controls to read and edit the parameters of a single step?
07-29-2011 11:18 AM
Is this in relation to the UI? There are ways to dynamically manipulate the parameters of a single step in TestStand.
Once you have a reference to the step then you can use (if you are using LV) property nodes and invoke nodes to change it.
Specifically for parameters you would use something like this series:
Step.Module.AsLabVIEWModule.Parameters.Item.AsLabVIEWParameter.ValueExpr
This is assuming your step is calling a LabVIEW VI.
07-29-2011 11:35 AM
I have been trying to make the steps VIs when possible. What I mean is that if an operator wanted to stop a sequence, select a particular step, and adjust a arguement value (ex. amplitude, freq, etc) then rerun the step to see the results. That is what I'm looking for currently.
07-29-2011 02:57 PM
You can currently do this in the Full-Featured UI without any modifications. It's kind of a hack though:
So assume that an execution is running. The user clicks the Break button and wants to rerun a step with different parameters. So now your execution is paused somewhere below the step. Right click the step and select: Set Next Step to Cursor. Now in the Variable window look for the variable that is being passed as a parameter to that step. Say for instance Locals.Foo is being passed to your VI. Change the value of it and click the Resume button. This also assumes that you are passing either Locals or FileGlobals to your VI. You may have to have Administrator privileges to do this.
If this isn't good enough then there are ways to accomplish what you want in a cleaner manner.
One way is to build your sequence file such that if a certain condition occurs then retry with new values or values from a file which can be changed by the user. This is what I would recommend because it will be the cleanest and the easiest.
Another way is to build into your UI like you are asking about. The problem with this is at a certain point the user will click Break or a Stop button that you have put on there. This will stop the execution at some point (who knows exactly what point unless you write code to specify a point). Then they would have a pop up or something that would allow them to select a step. Then for each step you'll have to have some code or a parser or something that will determine the parameters and valid values they can be and ask the user for those. This is all doable but would be quite a task. You will have a long ways to go in understanding the TestStand API in order to accomplish this. In fact there would be so many API calls with numerous ways to attack this problem.
Whichever way you choose to go you will always have the TestStand forums or NI support.