Example Code

How to Perform Basic Serial Writes and Reads Using NI-VISA in Microsoft Visual C# .NET

Code and Documents

Attachment

This example demonstrates performing basic serial communication using NI-VISA in the Microsoft Visual C# .NET develpment environment. The examples uses the NationalInstruments.VisaNS .NET assembly to configure a serial port, write a command to the port, pause for a given amount of time, and then read from the port.

This example is intended to be analogous to the LabVIEW shipping example Basic Serial Write and Read.

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

Contributors