NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I make custom UI messaging allow user to control tests?

Solved!
Go to solution

Hi. 

 

I'm totally new at TestStand and I'm trying to use it to test a relatively simple dll for a larger system, as sort of a evaluation to see if we want to migrate to this system.

 

I'm using TestStand 4.2 with LabWindows/CVI 8.5...  It was going along fine, but now I'm stuck trying to customize a user interface

 

Specifically, I want to have the user be able to control which steps are called within the sequence, and be able to select (via, say, a numeric control) which inputs are sent to the UUT.

 

I've found a few examples, but they just seem to handle displaying data from TS to the UI, not *getting* data from the UI back to TS....

 

is there a tutorial that handles this stuff? 

 

I'm seriously lost, here.

 

 

 

 

 

 

Message Edited by rjohnson on 11-17-2009 06:44 PM
0 Kudos
Message 1 of 6
(3,873 Views)
Solution
Accepted by topic author rjohnson

To answer your question the best way to get info from the UI to the sequence file is to do the same thing the examples you were looking at were doing.  Except that your data is going to be the SequenceContext.  Then you can use property nodes or even the TS VIs to set properties inside of your sequence.

 

There may be a better way to accomplish what you want however.  Why not pop up a dialog (written in CVI) in the PreUUT (overridden in your sequence file) with a list of "tests" in your sequence?  The user can select which tests they want to execute.  Then have preconditions for your steps that tell the step to run based on what the user has selected.  The dialog can also have inputs which get populated back to the sequence (through parameters) which can set FileGlobals or Locals or whatever.

 

UI Messages are used for runtime decisions or feedback.  It seems your case would be more of a one time per execution decision.  Unless they are choosing tests during execution.

 

Hope this helps,

Message Edited by ~jiggawax~ on 11-19-2009 12:27 PM
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(3,844 Views)

hi jigg,

 

yes, i agree: for the majority of automated tests, a one-time decision using the Pre-UUT would make more sense as you describe.... but in this case I do want the user to make a runtime decision that will modify the execution of the sequence.

 

when you say, "do the same thing the examples you were looking at were doing.  Except that your data is going to be the SequenceContext."  I'm not quite sure what you mean....

 

thanks,

rob

 

 

0 Kudos
Message 3 of 6
(3,833 Views)

The SequenceContext stores information about your current execution.  It is a reference to information.  If you have access to that then you can pretty much change whatever you want during execution.  So what I'm suggesting is pass that reference through the UI Messages.  Then in your UI you can change whatever you like.  Basically instead of sending back a number or a string you send back an object reference which points to the Sequence Context.

 

The trick here is the timing.  How do you know the user is going to push the button at the right time?  How do they select which step/test gets executed?  Is there a cluster of buttons that indicate the tests on your UI and they just click the button for that test?  When are they expected to select a test?  Does the UI lock until the test is complete before they can select another test? 

 

Is the UI specific to this sequence file?  Can you run other sequence files with the customized UI?

 

I saw a pretty interesting idea-  Basically the sequence file would spawn a new thread and open up a dialog in which the user could push a button depending on which test they wanted to run.  This button would trigger an event that would then notify their sequence file.  Inside the sequence file they would loop waiting for notifications from the dialog.  Once the notification was recieved it contained information on which test to run.  The sequence file would then use an expression to call that test and run it.  Each test was stored in it's own sequence.  On the dialog there was a light for each test that lit up once that test was completed.  Then when all the tests were completed the Pass/Fail light would light up and notify the sequence to exit and pass/fail the uut.

 

Let me know if you have any questions regarding this.

 

Regards,

Message Edited by ~jiggawax~ on 11-19-2009 05:53 PM
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 6
(3,824 Views)

Hi,

 

Do you know that in the SeqEditor or the UI, you can highlight the steps in the active sequence (i.e the sequence that is in view) and using the 'Run Selected Step....' option run those step(s).

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,813 Views)

OK, yes. i get it now, thanks.   after i worked with the examples for a while it came together.

 

 

0 Kudos
Message 6 of 6
(3,775 Views)