Click or drag to resize

Communicating With Instruments

Nimbus can be used to build IVI-C drivers for instruments that use virtually any I/O protocol. Many instruments are accessed via standard protocols, such as TCP/IP, USB, GPIB, or serial. For these kinds of instruments, Nimbus leverages the VISA library to perform I/O operations. VISA implementations available from any VISA vendor, such as National Instruments or Keysight Technologies, will work equally well with Nimbus and the resulting IVI-C drivers are not tied to any particular VISA vendor.

Important note Important

Even though Nimbus provides built-in, easy-to-access support for instruments that communicate using VISA-supported protocols, there is no intrinsic dependence that Nimbus has on VISA. Fully compliant IVI-C drivers can be built with Nimbus using a custom DLL that implements any private I/O protocol required.

Using Automatic Command Formatting

To use automatic command formatting, you must first associate an instrument command with the function or attribute by choosing the Instrument Command implementation type in the Function General Editor or the Attribute General Editor . Within the function implementation, Nimbus will generate a call to a standard VISA method -- typically viPrintf and/or viScanf. The code below is an example of the complete implementation of a function that uses the automatic command formatting features of the Function General Editor and the Attribute General Editor.

ViStatus _VI_FUNC acme4321_Configure(ViSession Vi, ViReal64 Frequency, ViReal64 Bandwidth)

    if (SimulationEnabled(Vi))
        return VI_SUCCESS;

    auto status = VI_SUCCESS;

    status = viPrintf(GetVisaSession(Vi), "SENS:FREQ %0.15lg; SENS:BAND %0.15lg\n", Frequency, Bandwidth);

    status = PollInstrumentErrors(Vi);

    return status;

Download a complete CHM version of this documentation here.