Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA : USB through PIC microcontoller, writing is good, but not reading

Hi guys;

 

I'm trying to put together a simple VISA USB read/write program to test communication from Labview to a PIC microcontroller.

I've found an example on youtube and wanted to try to implement it.

 

Well, in the owners video everything seems to work juste fine, but for me only the writing is working, I can't read data from the microcontroller.

 

Can anybody explain to me what is going wrong on this ?

Here is a the diagram.

Thank you.

Capture.PNG

0 Kudos
Message 1 of 4
(4,478 Views)
How could you possibly know that the writing is good. It's certainly complicated and qualifies for the Rube Goldberg thread.
0 Kudos
Message 2 of 4
(4,463 Views)

Because I tested it, and it worked just fine.

0 Kudos
Message 3 of 4
(4,457 Views)

Give this a try.

 

You don't need to initialize the USB port every iteration of your loop.  Nor do you need to close it each time either.  Move those out of the loop.  I also greatly simplified the conversion of your data to write.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(4,453 Views)