LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

register callback node - multiple

I am trying to use the Reg Event Callback node to register callbacks that I have created in an ATL COM module that I am interfacing with LabVIEW. If I use the node to register one callback with one vi it works just fine. It does not seem to work if I try to register more than one. Any ideas on why and what I can do to register several would be very helpful. I have about 10 that I need to hook up.
Thanks,
Larry Trout @ Photon Kinetics
0 Kudos
Message 1 of 3
(2,918 Views)
Larry,
How do you see that they are not working?
You should first select an event from the Register Event Callback node, then create the callback VI. Different events have different event data formats so changing the event after you create a callback VI might break wires on the block diagram. Therefore, you should select the event before you create the callback VI.
You can register different callback VIs for the same event multiple times. Or are you trying to register the same callback VI multiple times?
I am attaching an example that has multiple callback VIs registered for the same event.
Zvezdana S.
0 Kudos
Message 2 of 3
(2,918 Views)
I have four events that I am registering. For each one I wire the Active X reference, the control reference that I want to update, and then I create the callback VI from the menu option. I edit each callback VI to stuff the data in the value of the control reference passed in. Each callback VI is separate. Each control is distinct for each callback. The first callback that I register works in that the control is actually updated with the data coming from the object. If I change the order of registration only, again the first one works in the same way as described. I can test each callback to see if it is working by changing the registration order. The problem is that the controls for the callbacks that are registered second and so on are never updated. I
know the callbacks are being raised because I can debug them in Visual Studio. I have followed the examples given rigorously. One thing that may be throwing a wrench in is that my Active X object is free threaded and has multiple threads associated with it. However, all of the the events are raised from the same thread.
0 Kudos
Message 3 of 3
(2,918 Views)