Hi,
I would like to read data from a USB RAW device but when I try to enable the interrupt with viEnableEvent I get the error code: 0xBFFF003A - Unable to start operation because setup is invalid (usually due to attributes being set to an inconsistent state). I'm using this sample code:
...
status = viOpen (defaultRM, "USB0::0x413c::0x3010::NI-VISA-0::RAW",VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS) {
printf ("Cannot open a session to the device.\n");
goto Close;
}
printf("Enabling USB Event\n");
status = viInstallHandler (instr, VI_EVENT_USB_INTR, usbHndlr,0);
status = viEnableEvent (instr, VI_EVENT_USB_INTR, VI_HNDLR, VI_NULL);
...
My OS is XP SP2 and I use CVI 7.0 / NI-VISA 3.6. The .inf file to install the USB device was created with DDW. Any clue about this problem? Is there any other way to read data from USB RAW device?
Thanks.