Communicating With Instruments
Nimbus can be used to build IVI.NET 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.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.
Using Automatic Command Formatting
Section titled “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.
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");}