Using NI-VISA in LabVIEW

NI VISA is utilized by LINX in order to communicate with the WF32 and the other supported boards. In this blog post I will give an overview of National Instruments’ implementation of the Virtual Instrument Software Architecture API, commonly referred to as NI-VISA. You can use NI-VISA to communicate with most instrumentation buses including GPIB, USB, Serial, and Ethernet. It provides a consistent and easy to use command set to communicate with a variety of instruments.

One of VISA’s advantages is that it uses many of the same operations to communicate with instruments regardless of the interface type. For example, the VISA command to write an ASCII string to a message-based instrument is the same whether the instrument is Serial, GPIB, or USB. Thus, VISA provides interface independence. This can make it easy to switch interfaces and also gives the users who must program instruments for different interfaces a single language they can learn.
VISA’s greatest advantage is that it is an extremely easy language to learn. VISA provides a very simple-to-use API that has bus independent functions for most of its I/O functionality. VISA provides the most commonly used functionality for instrumentation in a very compact command set, eliminating the need to learn low level communication protocals for multiple bus types.

A typical VISA application would go through the following steps.

1) Open a Session to a given Resource.
2) Do any configuration on the given resource (setting baud rates, termination character, etc…).
3) Perform writes and reads to the device.
4) Close the Session to the Resource.
5) Handle any errors that may have occurred.

NI-VISA makes serial instrument programming fast and easy. VISA Open, VISA Read, VISA Write, and VISA Close are the basic VISA functions used in the LabVIEW example VI below.

NI-VISA is a software API that greatly reduces the development time of test and measurement systems. It gives developers the ability to easily create code to communicate with any instrument, over any bus, on most operating systems in use today. It also allows the generation of code that can be moved from one platform to another or from one bus type to another with little or no overhead in the change. LINX ability to run on such a wide variety of boards is a perfect example of the flexibility that NI-VISA allows. Thank you for reading my blog post, and for a more technical explanation about how NI-VISA works follow this link. If you are interested in trying out LabVIEW for yourself, you can purchase a copy of LabVIEW 2014 Home Edition which includes everything you will need to run LINX 3.0. Please comment below with any questions or comments you may have.

Author

Be the 1st to vote.

Leave a Reply

Your email address will not be published. Required fields are marked *