Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW USB communication timeout

Question: I'm working on LabVIEW-C8051F320 MCU communication through USB. The VISA driver is setted up and it works. But when I write a byte of data to the MCU through USB on LabVIEW, a timeout(2000ms) happens every two time; while when the PC reads a byte from the MCU, a timeout occurs every time. There's probably no problem in the firmware, for it communicates with a C++ programme pretty well. I wander if VISA is not proper in generating a driver on my device and I should use other drivers and give up VISA?

 

Thank you!Smiley Happy

0 Kudos
Message 1 of 7
(4,382 Views)

I don't understand. If you had a working interface with C++, why did you then change to a VISA interface? You say the VISA driver is set up and it works but it obviously does not. You don't say what VISA functions you are using (VISA Write or Control Pipe) or what driver you used for the C++ code.

0 Kudos
Message 2 of 7
(4,374 Views)

I just want to use the MCU to communicate with LabVIEW and the C++ programme is just a test of the correctness of my firmware programme. The communication with C++ is base on another driver. That I said the VISA Driver "works" just meant it can recognize my device, but not that correct communication can be established. When PC write data to or read data from the divice through USB bulk pipes, the error above occurs. I would appreciate it if you could help me. Thank you!

0 Kudos
Message 3 of 7
(4,367 Views)

First, if you have communication working with a different driver, I would suggest you use that driver with LabVIEW.

 

Second, search for the USB tutorials by Intaris.

0 Kudos
Message 4 of 7
(4,364 Views)

First, when communicated with the device through USB, of course I would use the VISA driver, otherwise LabVIEW would never recognize my device. The other driver is just used to test my firmware, and it is proved that the bug is not in the firmware.

 

Second, every step of my development of the VISA USB driver follows the guide from NI website. Although the PC recognize my device after the install of the driver, the write/read could not be set up.

 

I wonder if I have make it clear. Thank you, Dennis!

0 Kudos
Message 5 of 7
(4,354 Views)

You do NOT need VISA in order for LabVIEW to see the device or communicate to it. I don't see where you got that idea. ARe you planning on writing a VISA driver for your keyboard and mouse as well? If you have, for example, a dll for a driver, you can easily use that. What is the driver you previously used?

 

Creating the VISA interface with the wizard is the easy part. Once you have done that, you need the low level protocol in order to read and write correctly. Are you doing control pipe reads/write, bulk reads/write?

0 Kudos
Message 6 of 7
(4,345 Views)

Thank you very very much!

But I have decided to give up VISA. Maybe VISA is not panacea.

Best wishes!

0 Kudos
Message 7 of 7
(4,314 Views)