NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a LV Event

I routinely set the controls and read the indictors of a LabVIEW VI through the ActiveX/COM adapter. This has worked fine in the past, but I ran into a snag in my current application.

In this application, I have hundreds of controls so instead of wiring them I am using the Event Structure to detect when a control has changed to invoke the appropriate code for that control. It works fine when the control is manually changed. The problem (which is noted in the LV Manual) is that if the control is changed programatically, such as I do with TestStand, an event is not generated and the code is not invoked.

Is there any work-around for this situation? Is there a way to export the properites of the controls back to TestStand so I could change the Value(signalling) property and generate an event?

Thanks,
Dave
0 Kudos
Message 1 of 4
(2,842 Views)
Dave,
 
I don't think that there is an exported property to do this in LabVIEW's ActiveX Server.
 
I would be careful in using LabVIEW's ActiveX server from TestStand.  This would require that LabVIEW be present on the machine you are running the sequence on (even after deployment).  The LabVIEW Run-Time Engine does not export an ActiveX server.  If you really needed this functionality on a machine without LabVIEW, I would recommend using a Run-Time Server (basically a simple LabVIEW application that is registered as an ActiveX server), and using that as your method of loading VIs.  However, you would have to change your LabVIEW adapter to use this Run-Time Server as well.
 
Another solution is to call a LabVIEW VI that gets a reference to the LabVIEW VI on which you wish to change a control.  Since both VIs will be loaded at the same time, you can just specify the VI's name, rather than full path.  You can then get a reference to the Front Panel, iterate through the controls until you find the correct control, and then use a Property Node to change the Value (Signaling) property for the control.  It's not the cleanest solution, but it should serve your needs.  It also does not require that LabVIEW is installed on the machine that is executing the sequence.
 
Allen P.
TestStand R&D
0 Kudos
Message 2 of 4
(2,816 Views)
Thanks Allen, Caroline, that solution works for me fine.

Out of curiuosity, do you think in future versions of LV the controls and indicator property/methods will be directly available from the ActiveX/COM adapter? i.e. From the VI class the ability to create a Control/Indicator Object and then manipulate it? Sorry, I'm no ActiveX expert so maybe I'm missing something here.

As for the comments about not being able to use the ActiveX server from the Run-Time Engine after deployemnt- I got around this by creating an executable of my VI as an ActiveX server and then manually including it in the deployment. Works fine.

Dave
0 Kudos
Message 3 of 4
(2,798 Views)
Hi Dave,

Only time (and sometimes NIWeek...) can tell what will happen in future versions of our products. However, our implementations are directed by the need of you, our customers, and one of the best way you can make yourself heard, is by submitting a Product Suggestion through the "feedback" link on www.ni.com/contact.

May your wish come true!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(2,766 Views)