07-09-2010 03:51 PM
Hi,
I'm working with two thorlabs stepper motors and I want to sequence their moves so that motor B starts moving when motor A has finished moving. I'm using the ActiveX MG17Motor controllers which fire the MoveComplete event when a motor has finished a move. I was thinking about having a MoveAbsolute command for motor B inside an event structure, and make this event structure respond to the MoveComplete event from motor A. I know how to register the MoveComplete event but I haven't found out how to make the event structure recognize it. Do I have to get the callback VI to launch some notifier or perform some action? Is there some better way to sequence moves?
Any help would be really appreciated
07-12-2010 04:03 AM - edited 07-12-2010 04:04 AM
I usually work with ActiveX events the following way: - Create an indicator in the VI that contains your event structure and configure your event structure to respond on its "Value Change" event. - Pass the refnum of the indicator as user data to the callback VI and use the "Value (Sgnl)" property to write data to the indicator from inside the callback VI. Your idea to use a notifier seems also to be a good option but I never tried that.
07-12-2010 02:16 PM
Thanks a lot for your help.
That sounds like a very good idea to me, it's actually exactly what I need, but I'm having some trouble in how to configure the callback VI to make it work with the change value property node. I don't know really how to wire things in there and how to link the refnum from the indicator. Could you explain it more clearly or attach some example please?
Thank you again
07-13-2010 07:18 AM
07-13-2010 03:30 PM
Here is a small example that uses ActiveX events. The ActiveX control AXEventsExample.ocx is taken from the ancient devzone example "Using ActiveX Events with LabVIEW and Custom Control":
http://sine.ni.com/devzone/cda/epd/p/id/3071
but it uses event callbacks instead.