From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating LabVIEW events via ActiveX

I have a Labview 2010 Vi compiled to an EXE with ActiveX server enabled.

The VI has a single control that is a latched boolean control that is used in an Event Handler.

When I toggle this control, remotely, via an ActiveX client, the control changes state, but does not generate an event. (non-signaled).

I can understand this behavior if the control was not a latched control, but I would have thought that the latched control would automatically generate an event, since it doesn't make a distinction between "value" and "value (signaled)".

 

Other than monitoring/polling the control status and when it changes using a Value (Signal) local variable, is there a way to generate an Event, in a LabVIEW EXE, via ActiveX?  Or is there another, more appropriate way to accomplish this.  I'm trying to remotely run an program from another program through an activeX interface.   I suppose if every control had a unique message and I had a message handler loop, then I could just use the ActiveX control to insert the appropriate message into the Queue, but this is an existing application and would take a fair effort to set that up.

 

 

0 Kudos
Message 1 of 3
(2,005 Views)

What if you tried dynamically registering the event? You could create a reference to the boolean and use the Register for Events VI. Then, wire this event into the dynamic event terminal of the event structure (right click the border and say "Show Dynamic Event Terminals").  I don't have an ActiveX program to call into LabVIEW with, so I'm not sure if this will be any different than what you're doing now, but it's something easy to try.  Perhaps you could post you ActiveX code and LabVIEW code or a modified version of both illustrating what you're mentioning?

 

 

0 Kudos
Message 2 of 3
(1,984 Views)

As far as I know, the fundamental limitation is with the LabVIEW type library, and that library does not expose events. Thus, in order to do this you'd need some sort of custom-written layer to sit between LabVIEW and ActiveX. You can search over at LAVA, as I think this was brought up there as well.

0 Kudos
Message 3 of 3
(1,981 Views)