Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Perform MAX Scan for Instruments for LabVIEW

Overview

This example mimics the VISA functions used when you use the "scan for instruments" function in NI-MAX.

 

Description

Occasionally some problems with VISA can be rectified by selecting an interface in MAX, (Such as a GPIB interface) right clicking, and selecting scan for instruments. This sends low level commands that perform some configuration steps for the interface, preparing it for use. The attached code allows you to perform the majority of low level commands by calling a dll in LabVIEW.

 

Requirements

  • LabVIEW 2013 (or compatible) 

 

Steps to Implement or Execute Code

  1. Run the main program.
  2. Notice that the program calls a dll
  3. The dll contains the necessary GPIB commands that mirror the scanning for instruments in NI-MAX

  

Additional Information or References.

When selecting scan for instruments in MAX, NI IO Trace reveals the following command sequence:

 Capture.PNG

Using an example, findinstruments.c, it was possible to adapt the code to perform most of these commands. This was then compiled into a dll, so that it could be called using the Call Library Function Node. The IO Trace result of calling this function can be seen below:

 

Capture.PNG

 

As you can see, this contains most of the useful configuration steps that would be initiated if you selected the option in MAX.

 

The following is the block diagram used for this example:

Capture.JPG

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Matt H
Applications Engineer
National Instruments UK