LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

USB control of microcontroller via cvi

I have a project which requires I talk to a microcontoller via USB. I have set up a visa driver using the wizard as described in the USB instrument control tutorial and am quite happy with that. I have a RAW class and and want to use bulk transfer. The tutorial says ' to transfer data using a bulk pipe, use VISA Read and VISA Write.' How do I do that? i can't find these functions and I get the feeling they may be labview rather than CVI.

I have also noticed references to activex on some posts and get the impression I may have to use that could anyone confirm?

Any help would be appreciated

thanks in advance

Mark
0 Kudos
Message 1 of 5
(3,664 Views)

The functions viWrite() and viRead() are defined in visa.h - are these what you are looking for?

JR

0 Kudos
Message 2 of 5
(3,657 Views)
I'll give it a try

Cheers
0 Kudos
Message 3 of 5
(3,655 Views)
Trying to do a similar thing. Did you get yours working?
0 Kudos
Message 4 of 5
(3,587 Views)
I am halfway there, I can send data using viWrite but have yet to get it back using viRead. I am using a bulk transfer with one endoint at 2(in) and one at 129(out) and currently wondering if I need to swap between them or if viRead and viWrite automatically assign to the in and out endpoints as I had originally thought.

the NI VISA manual has been a great help so far I had some problems with the initial setup and initalization stuff

open the default RM first then open the vi to the device etc.

I aslo found that setting my device (I am programming that as well) so that it gave me a meaningfull fresponse as long as it got something on the usb was initialy quite helpfull when trying to get my head round what was actually happening.
0 Kudos
Message 5 of 5
(3,576 Views)