NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI control of TestStand operator interface

For reference, I'm using TestStand 4.0 with the sequential model and Labwindows/CVI 8.0.
 
I was wondering if there is a way to control the operator interface directly with a CVI DLL call in a TestStand sequence?
 
I have a need to add some custom controls to my operator interface including a text box for messages and an LED to indicate that the DUT power is on.
 
For the messages, I have looked at using the built-in UI message controls and those might work, but I would like to send a message directly from CVI rather than break up a bunch of code in order to call the ActiveX step in TestStand.  Also, the standard message box is small and shows only one line so I might need to add a larger one. 
 
In the case of the LED indicator, I have a global variable in my CVI DLL that I want to use to turn on and off the LED.  Without getting into too much detail, it would be much easier in my case if I could use that variable to change the state of the LED.  Again it would be nice if I could use the UI controls to go straight to the operator interface from CVI.  Another option is to somehow increase the scope of my global variable to include the operator interface CVI project.  I'm not sure how to do that though.  
 
Any suggestions would be greatly appreciated.
0 Kudos
Message 1 of 2
(3,144 Views)
The way you want to work with the user interface is not recommended.
Since TestStand is the execution engine for your application, TestStand is responsible regarding the display of the execution state.

You do not have to use the default controls in order to display the states, but you definetly should use User Interface Messages from TestStand to tell the UI when to display the value you want to have. This is a standardized procedure of datatransfer.

You can call PostUIMessageEx even from your modules if you pass the SequenceContext or Thread to the module. So you don't need to insert additional ActiveX steps into your sequence......

The backdraft of not using UI messages is:
- possible dependency of the Sequence to the UI leading to errors when execution in e.g. the SequenceEditor making debugging hard
- at least two parallel eventqueues (more overhead in architucture) or a polling machine for changes of states (more overhead in performance)
- using variables instead of "functioncalls" can easily lead to race conditions which might randomly mess up the whole system

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 2
(3,133 Views)