NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Control dialogs in modelsupport2 without keyboard or mouse

Hi!

I´m getting close to production ready with the sequence and CVI program I´m doing. However, in a production enviroment, the mouse and keyboard is not that good to use. Therefore I have a operator panel with push buttons that is easy to reach and use for the operator.

I would like to have the modelsupport2.dll that displays all dialogs to use the push buttons connected to a DIO card in _addition_ to the standard mouse and keyboard. I don´t want to program the hardware calls directly in modelsupport2.dll as I want it to be general solution and not tied to a specific test system hardware. I am thinking of a way for my test program to post a message to modelsupport2.dll "emulating" a mouseclick on a button.


Is this possible? Or there better approaches to this problem?
0 Kudos
Message 1 of 4
(3,355 Views)
RoSt -
The modelsupport2 DLL is written in LabWindows/CVI and I do not think that you can post messages to the dialogs very easily. I would recommend just writing your own named DLL by copying source from the modelsupport2 to create your own custom dailogs that you need. That is why TestStand includes the source. Make sure you changes

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 4
(3,355 Views)
Thanks for your (partial) answer!
I know that I must rewrite modelsupport2.dll. What I don´t want is to make the modifications so it fits only one hardware platform. Basiclly a would like to be able to post some kind of messages from my test program to (via DDE?) modelsupport.dll. These custom messages would then be interpreted as button mouse clicks.

Could this approach be done do you think without to much trouble?
0 Kudos
Message 3 of 4
(3,355 Views)
RoSt -
Yes you could use DDE.

If the code for the hardware is in the modelsupport2.dll, then you could use the CVI function PostDeferredCall().

If the code that will monitor the hardware is in the same process as modelsupport2.dll a simple mechanism would be to use the CVI function RegisterWinMsgCallback() and the SDK function PostMessage from the hardware. The "tricky" part will be how to get the window handle returned from GetCVIWindowHandle() and the message number returned from RegisterWinMsgCallback() to the hardward code.

You could even use this option out of process, the key is to share the window handle and message number data between processes. For this you could use the SDK to share memory.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 4
(3,355 Views)