Click or drag to resize

Communicating With Instruments

Nimbus can be used to build IVI.NET drivers for instruments that have 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.NET library to perform I/O operations. The current implementation of VISA.NET provided by Pacific MindWorks uses the underlying VISA-C library to perform the low-level device communication.

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.NET 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 method or property by choosing the Instrument Command implementation type in the Method General Editor or the Property General Editor . Within the method implementation, Nimbus will generate a call to a standard VISA.NET method -- typically either PrintfAndFlush or Scanf. The code below is an example of the complete implementation of a method that uses the automatic command formatting features of the Method General Editor and the Property General Editor.

C#
// Acme4321.cs
void Configure(double frequency, double bandwidth)
{
   if (this.Session.InitOptions.SimulationEnabled)
   {
      throw new NotImplementedException();  // TODO
   }

   this.IO.FormattedIO.PrintfAndFlush("SENS:FREQ %0.15g; SENS:BAND %0.15g");
}

Download a complete CHM version of this documentation here.