Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Remote Instrument Control with NI-VISA

14 ratings | 3.50 out of 5
Print
NI-VISA allows you to programmatically access resources on a remote workstation.

Introduction to Programming Remote Devices in NI-VISA
Many users have devices they want to use in multiple situations, such as a group of scientists sharing an instrument in the laboratory. The most common way this is done is for each user to physically carry the device next to his PC, connect the device, and then use it. NI-VISA for Windows and Linux x86 now supports a more efficient way to do this. With remote NI-VISA on these supported platforms, you can leave the device connected to a single workstation and access it from multiple client workstations.

How to Configure and Use Remote NI-VISA
On the server machine (the one to which the hardware is connected), you must install Remote NI-VISA Server. This is available with VISA 2.6.x and later.

By default, the server is disabled, and access from any other computer is disallowed. On the server machine, use the NI-VISA Options (in Measurement & Automation Explorer (MAX) on Windows, visaconf on UNIX) and make sure the server is enabled. To do this in Windows, launch MAX. Then go to Tools»NI-VISA»VISA Options. Click on the Security tab. Now you must specify each address or address range of the computer(s) you wish to allow access. An address can be either in dot notation (x.x.x.x) or the network machine name. An address range can only be in dot notation (x.x.x.*). The Remote NI-VISA Server should then be started after the configuration settings are made.


On the client machine, no configuration is necessary. Only the VISA Run-Time Engine 2.6 or later is required. All you need to know is the host machine’s name or IP address. To find a list of available resources for a given machine name or IP address, launch the VISA Interactive Control in MAX (Tools»NI-VISA»VISA Interactive Control) and type visa://<server name or IP address>/?* in Resources to Find.


Any resource found can now be used in a program, where the resource name is in the form visa://machinex/GPIB0::2::INSTR. In this example, an available resource is an instrument with primary address 2 on GPIB 0 on machinex. Below is an example in LabVIEW 6.1.

[+] Enlarge Image


Remote NI-VISA supports the complete functionality of all attributes, events, and operations for all supported hardware interface types.

Remote NI-VISA Summary
Using Remote NI-VISA is just one way to access hardware on another machine. If you have an existing application written using VISA and you want to use it from a different client, this might be the easiest solution. However, since each VISA operation invocation is a remote procedure call, your application performance may decrease, especially if it is register-intensive or has a significant amount of programming logic based on device responses or register values. The latency over Ethernet is better suited to applications that transfer large blocks of data. A better way to remotely access hardware is to make remote calls at a higher level, such as using Remote Front Panels or Remote VI Server in LabVIEW. Refer to the links below for more information.

Note: In LabVIEW 7.1 or earlier, refer to the LabVIEW User Manual (linked below) for more information about remote instrument control with NI-VISA. In LabVIEW 8.0 or later, refer to the Using VISA in LabVIEW topic in the LabVIEW Help (linked below).

Related Links:
NI-VISA User Manual
LabVIEW User Manual
Developing Remote Front Panel LabVIEW Applications
LabVIEW Help: Using VISA in LabVIEW

14 ratings | 3.50 out of 5
Print

Reader Comments | Submit a comment »

Launch the NI-VISA Server!
An important bit of information is missing: launch the NI-VISA Server in order to use remote VISA.
- Jean-Pierre Drolet, Avensys inc.. jpdrolet@avensys.ca - Aug 13, 2003

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).