NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

User Events in TestStand

Hello,
I'm trying to use the "Single Pass" button to trigger an event in a standard Event Structure but it will not register (see the event). Can't figure out why.
 
Any ideas??
 
Thanks.
0 Kudos
Message 1 of 6
(3,926 Views)
Hi kevmi2ca,
 
Just a question for understanding your task. You want press the button "Single Pass" or the (strg-F5) Keys in your Ni-SequenceEditor or own UI-Interface. And then an event should be fired from the engine to your UI-interface.
 
If this is right, i would place an Acitve-X Action that fires this event at the beginning of your Single Pass EntryPointSequence int the Station Model.
 
Hope thats right,
 
Greetings
 
juergen
 
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 6
(3,913 Views)

Events are already fired to the UI. Specifically, ApplicationMgr.PreCommandExecution and ApplicationMgr.PostCommandExecute fire when any command is invoked.

The Command object is passed as a parameter to the event handler. For SinglePass, the Command.EntryPoint is equal to 1 (Test UUTs would be 0), and Command.Kind is equal to CommandKind_RunEntryPoint (this is from memory, but it should be close).

Note that you will get this event whether the command is executed from a button, a menu item, or from your own code.

Also note that in LabVIEW, you should generally handle ActiveX control events with a callback VI (as is done in the source code for the example LV User Interfaces), not an event structure. If necessary, your callback can use a LabVIEW mechanism to then trigger a case in an event structure. I'm not a LabVIEW expert, but I'm sure you could use something like a queue or an occurrance. Maybe you can even fire event structure cases directly?

 

If the piece of code that wants to handle these events doesn't have access to the ApplicationMgr control, then refer to:

http://forums.ni.com/ni/board/message?board.id=330&message.id=17162#M17162

 

 

 



Message Edited by James Grey on 01-11-2008 05:10 PM

Message Edited by James Grey on 01-11-2008 05:16 PM
Message 3 of 6
(3,910 Views)

Thanks guys.

I ended up using a standard Labview Button to trigger my Event Structure and simultaneously start TestStand using the "Do Click" Method of the SinglePass button.

0 Kudos
Message 4 of 6
(3,890 Views)
Hi James,
 
Great answer ! I'll give 5!
Just a question? Where i can find the Documentation about this that Test_UUT is == 0 
Maybe i have in future project with serveral executions points.
 
Greetings
 
Juergen  
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 6
(3,872 Views)
Test UUTs == 0 because it is first (ie. element zero) in the list of process model execution entry points.  This is a convention followed by NI process models and most process models derived from NI models, but you could easily change it by reordering the sequences in a process model.
 
To find out the order of execution entry points, view the list of sequences in a model and count the execution entry point sequences (the red ones) starting from zero at the top of the list (assuming that no entry points are hidden, they will also show of in the Execute menu in the same order).
0 Kudos
Message 6 of 6
(3,857 Views)