From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using TestStand ActiveX controls in custom Adv OI

I am attempting to use a LV7.1 TestStand pallet control - Expression Eval to allow debug data dump through UI Msg using the Advanced OI. The control is in the Execution window.
 
I can't make it work. I can obtain UImsg for a string control as an alternative tab, but want it on the execution page. Is there a more appropriate control to use, or do I need to make my own activeX control for this?
 
I have enclosed the proj. Any help would be appreciated.
0 Kudos
Message 1 of 2
(2,726 Views)
Hi TS Newbie,

There are a couple of items in your operator interface that are causing you to run into problems.

First of all, you are passing an ActiveX Container Reference into the Config Callbacks VI and using that to set the value of the Text in your EditExpressions ActiveX Control. The problem with that is that the "ActiveX Container Reference" is just a basic "ActiveX" reference, and non-specific to the control it is referencing. You can use these (and have, I see the Resize Ctrls VI) to resize or reposition ActiveX components, or anything that applies to all ActiveX classes.

For anything more specific, like the text value of your Edit Expressions control, you'll need to pass a reference to the actual control itself, like you do when you connected the Debug Msg ctrl to the UI Control References cluster that is being passed into the Config Exec ViewMngr VI. If you use that UI Control Reference instead of the ActiveX Container Reference in your callback, you can simply set the Text of your Edit Expressions control by passing a string to the Text property of that control (you won't have to play around with the Variant type).

I've quickly thrown together a few changes in your OI and attached the modified version to this post. In particular, notice the Debug Msg reference now being passed in with your ActiveX Container references to the Config Callbacks VI. Also notice that the UI Message reference to Debug Msg is being used to set the Text value in your callback instead of using the ActiveX Container reference, although that ActiveX Container reference is still being used for resizing purposes in the Resize Ctrls VI.

As far as your normal LabVIEW String indicator is concerned, the reason would be "swallowed up" when using it in the Executions Tab is that the "Resize Ctrls" VI doesn't take it into account when moving the ActiveX objects around on the page. I think if you put a string indicator next to the "Terminate Execution" button for instance, you'll see it. Then resize the window and watch as all the other controls resize over and around it. If you want to do it this way, you'll need to add code to move and resize that control in addition to the ActiveX stuff in the Resize Ctrls VI.

Hope this helps TS Newbie, let me know if you have any questions.

Dan Weiland
Applications Engineer
National Instruments
Dan Weiland
0 Kudos
Message 2 of 2
(2,699 Views)