Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

OnUsbInterrupt

I'm trying to hook up to an interrupt sent over from an USB device. I derived a class from UsbRaw and overridden OnUsbInterrupt method. But no success, my method is not called.

Using MAX to open a Visa session to my device I can see the data coming in if I enable VI_EVENT_USB_INTERRUPT in queue mode and then perform a wait on event.

Why am I not getting my OnUsbInterrupt called?

Thanks,
F
0 Kudos
Message 1 of 3
(3,296 Views)

@fla wrote:
I'm trying to hook up to an interrupt sent over from an USB device. I derived a class from UsbRaw and overridden OnUsbInterrupt method. But no success, my method is not called.

Using MAX to open a Visa session to my device I can see the data coming in if I enable VI_EVENT_USB_INTERRUPT in queue mode and then perform a wait on event.

Why am I not getting my OnUsbInterrupt called?

Thanks,
F




fla,

I have attached some sample code that shows how to implement USB interrupts for USB Raw. It sounds like the OnUsbInterrupt function is the function that you are deriving from UsbRaw. This code demonstrates how to create a callback function to handle USB interrupts. Hope it helps!

Craig H.
NI Applications Engineering
0 Kudos
Message 2 of 3
(3,272 Views)
Here is the attachment.
0 Kudos
Message 3 of 3
(3,264 Views)