05-19-2011 08:01 PM
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.
05-23-2011 09:08 AM
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?
05-23-2011 09:22 AM
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.