From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

USB RAW Bulk Communication with Visual C#.NET

Code and Documents

Attachment

This application illustrates simple reads and writes as results of user events to a USB RAW device. It is designed to work with USB RAW devices only.

To run this application, install a USB RAW device and configure Measurement & Automation Explorer (MAX) to recognize the USB device (see Tutorial: Using NI-VISA 3.0 to Control Your USB Device at www.ni.com). After the USB RAW device is successfully installed and configured, and you have opened a session to the device, you can read to and write from the USB RAW device.

To read to or write from another USB device, close the session to the current device, select the other device from the VISA resource name control, and open a session to it.

When finished, simply close the window to exit the application.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors