Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I communicate to a USB instrument

I just need a simple example of writing and reading
using the USB icons. I tried the example on
NI.com website but I keep getting error code
0 Kudos
Message 1 of 5
(5,584 Views)
Are you using the VISA USB icons? If so, this is a low-level mechanism for communication over USB. You would need your USB device's API (which endpoints are used, command formatting, etc.), etc. Is this what you're looking for?
0 Kudos
Message 2 of 5
(5,584 Views)
I am not using visa icons because I am not clear on
how to configur those. Instead I am using Visa open,
visa write,visa read, visa close. When I do I get a
error code -1073807343 from the visa read icon. The
VISA FIND RESOURCE icon works find, now if only I
could look inside of it to see how its communicating
with my device that would be great.
Attach is the command codes for the device from
the manufacture. All I want is a simple example
of how to communicate with this device through
the usb port, so that I can read the signal and
display it in labview's chart or graph.

Thank you
0 Kudos
Message 3 of 5
(5,584 Views)
Try using the VISA USB Out Control.vi and setting the index to 0x02 for the endpoint 2 and set the value to 0x01 for intialization. See if that works for your device. Once you can get one command to execute I am sure you can implement the rest. You might also want to try playing around with VISAIC (VISA interactive control in MAX) and NI-SPY until you are able to execute a command without getting an error.

-JoshuaP
0 Kudos
Message 4 of 5
(5,584 Views)
Thank you. You were very helpfull. Using your advise
I was able to get USB control in/out to work without
any errors. I also bought USB COMPLETE SECOND EDITION
which is very helpfull.

Thanks again
0 Kudos
Message 5 of 5
(5,584 Views)