NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I detect whether a TestStand Message box is active from a LabVIEW VI or application?

I'm trying to detect when TestStand Message boxes are active on a local PC from a LabVIEW VI. Does anyone know a way to do this (ActiveX or some kind of "in memory" query maybe)?
0 Kudos
Message 1 of 5
(3,300 Views)
Is the LabVIEW VI you are calling part of the TestStand execution at all or is it trying to investigate the TestStand status from outside of the process? Depending on where you are mining for this data it will definitely be more of a challenge. In general you could get a hold of the reference to the currently running TestStand engine and from there ask it what step it is currently running and then determine the step type (all via the API) that way you would know if the currently active step is a pop up. Other than that, there may be alternate ways of detecting this sort of event but there is no system queue or registery value that you can poll that I know of. Hopefully if someone can think of (has found) a better way, they will post an alternate idea...

--Re
gards

Elaine R.
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 5
(3,300 Views)
Elaine,
Thanks for the response. I'm trying to detect it from outside of TestStand. What I'm trying to do is write a background LabVIEW application that detects when operator intervention is required at a Test Station. This tool needs to detect LabVIEW dialog boxes, TestStand Dialog boxes, Pass/Fail/Terminate/Error banners etc. So far I've got the custom LV dialog boxes handled and still need to do the native LV and TestStand dialog boxes. From outside, what API ActiveX properties/methods would I be looking at?
John
0 Kudos
Message 3 of 5
(3,300 Views)
Hello John,

the critical thing to do would be to get an engine reference to the Engine by means of a LabVIEW Automation Open VI (look in your activeX functions palette and the help for this item), the input will be an ActiveX reference to the TestStand Engine (browse for the class NI TestStand API, any version will do, and choose Engine from the list). Once you have this reference to the currently running TestStand, the next challenge is to some how access information about the current execution. The only way to reach that object is via getting the UIMessage object and then retrieving a Thread object from the message, and a SequenceContext from the thread... until finally you can access the property "Step". Your best reference in this case is
going to be the TestStand Programmer Help (specifically for the API) and explore the properties and methods of each of these classes in turn.

Feel free to ask if you get stuck.

--Regards,
Elaine R.
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 5
(3,300 Views)
Ouch, sounds messy, but I'll give it a try. If I don't have any luck by Tuesday I'll get back to you.
Thanks again,
John
0 Kudos
Message 5 of 5
(3,300 Views)