Showing results for 
Search instead for 
Did you mean: 

Error 0xBFFF003A with viEnableEvent

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?

0 Kudos
Message 1 of 2


communicating with devices using USB RAW Visa mode is documented on the following KB page

There is also an example that shows how to program USB RAW devices using VC#.NET. Function calls are similar to the ones you should use in CVI, so it may be helpful

Hope this Helps,



0 Kudos
Message 2 of 2