LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem getting USB interrupt data after reopening device

Hi there,

I am working on a LabVIEW 8.5 program to read some A/D values from an instrument we built.  The instrument has a Microchip PIC18F4550 microcontroller in it, and the USB firmware supplied by Microchip configures the chip with an Interrupt OUT and an Interrupt IN endpoint.  I'm using NI-VISA 4.2 for communication, and the PC OS is Windows XP Pro.

I used NI VISA Driver Development Wizard to create a USB RAW driver, and my device shows up under MAX just as it should.  After I got my device configured, I wrote a simple VI that waits for the user to enter a device command and push a button, and after the button is pushed the VI waits for a response.  The command is sent via Interrupt OUT transfer, and the response is via Interrupt IN.

The problem I have is that I can't run my VI more than once.  If I run it once I can send a command to and get a response back from the device, but if I re-run the VI it times out waiting for an interrupt event from the device.  I can get the VI to work one more time by unplugging my device from USB and plugging it back in again, but that's obviously not a good way to handle things.

My question is, am I handling all of the VISA I/O correctly?  As far as I can tell I have, but maybe I need another set of eyes.  Attached is my VI.

Thanks,
Mike
0 Kudos
Message 1 of 2
(2,273 Views)
Sorry, I think I posted this on the wrong board.

I'll post it on Instrument Control (GPIB, Serial, VISA, IVI).

Mike
0 Kudos
Message 2 of 2
(2,244 Views)