Column Control DTX

IVI-COM Driver and VISA-COM I/O Programming Examples in Microsoft Visual C#

Application Notes

Abstract

This paper details the installation instructions and Visual C# (C-sharp) programming examples for Keysight Technologies IVI-COM instrument drivers and VISA-COM I/O. This application note will demonstrate examples from the N4965A multi-channel BERT controller and the N4962A serial BERT 12.5 Gb/s.

Table of Contents:

  • Keysight Technologies IVI-COM Driver and VISA-COM I/O Programming Examples in Microsoft Visual C#
  • Installation Instructions for IVI Drivers
  • VISA-COM Programming Examples in Visual C#
  • IVI-COM Programming Examples in Visual C#
  • Troubleshooting 

Keysight Technologies IVI-COM Driver and VISA-COM I/O Programming Examples in Microsoft Visual C#

Keysight Technologies offers a full suite of IVI-COM instrument drivers and Visual C# programming examples for remote instrument control. The drivers and programming examples are available as free downloads from the Keysight Technologies website. IVI Shared Components are also required; these are available as a free download from the IVI Foundation website.

Keysight Technologies IVI-COM drivers use a low-level VISA-COM interface to communicate with instruments over GPIB and/or USB interfaces. This means a program using the IVI-COM driver can be used with an instrument connected to the computer with either a GPIB cable or a USB cable.

Keysight Technologies also details how to communicate with instruments using the lowerlevel VISA-COM I/O libraries in Visual C#. Examples are included in this application note.

What is an instrument driver?

An instrument driver is a software program that can be used to control a programmable instrument, like a PRBS generator, BER tester, oscilloscope, switch matrix, or a simple DC power supply. The software program is comprised of individual routines that control a particular function of the instrument, like configuring options, writing data, reading data, and triggering the instrument.

Instrument drivers simplify instrument control and reduce test development time by providing an easier method to interface with the instrument. If you want to integrate an Keysight Technologies instrument into a pre-existing test system, or to build a new test system, we recommend you use the Keysight Technologies instrument driver when writing software to communicate with the instrument.

What is an IVI driver?

IVI drivers are a standardized instrument application programming interface (API). The driver encapsulates the instrument SCPI command stack and presents the instrument functionality in a consistent manner to many different Application Development Environments (ADEs).

What this means in practice is that an IVI driver converts an object-oriented class-based command like:

N4965A multi-channel BERT controller.Channels.get_Item(“1”).Generator. Pattern.Name = Keysight TechnologiesN4965A multi-channel BERT controllerGeneratorPatternEnum.PRBS31 into the following SCPI command that is sent to the appropriate instrument: :GEN:DATA:PATT:NAME PRBS31 (@1)

What is an IVI-COM driver?

IVI drivers are available in two flavors: IVI-C and IVI-COM. IVI-C drivers are developed for use in ANSI C development environments. IVI-COM drivers are developed for use in development environments that support the Component Object Model (COM).

IVI-COM drivers are used in the typical Windows-based PC ADEs like Visual C# and Visual Basic .NET, but also including Keysight VEE, NI LabVIEW, NI TestStand, MATLAB, and other ADEs. Keysight Technologies recommends IVI-COM libraries based on the ease of integration into these advanced ADEs.

What is Visual C#?

Visual C# (abbreviated VC#, pronounced C-sharp) is Microsoft’s® implementation of the C# programming language. Because Microsoft wrote the C# programming language specification and their implementation is the most popular, it is safe to assume that when someone is talking about C# they are also talking about VC#.

VC# includes a graphical development environment and supports very rapid development of Windows®-based applications.

C# is a simple, modern, general-purpose, object-oriented programming language. It has been developed within the .NET initiative and is compatible with the 3.5 framework. C# is ideally suited to controlling instruments when paired with IVI drivers.

What is VISA-COM?

Virtual Instrument Software Architecture (VISA) libraries are used for communicating with devices over GPIB, USB, and a variety of other buses. VISA libraries are managed by the IVI Foundation (http://ivifoundation.org/) and are available in two flavours: VISA-C and VISA-COM. VISA-C libraries were developed for use in ANSI C development environments, and VISA-COM libraries were developed for use in environments that support Microsoft’s Component Object Model (COM).

VISA libraries allow us to write one version of code that can talk to our instruments over either GPIB or USB, which is nice. Keysight Technologies recommends VISA-COM (versus VISA-C) libraries based on the ease of integration into advanced ADEs.

“VISA provides the programming interface between the hardware and development environments such as LabVIEW, LabWindows/CVI, and Measurement Studio for Microsoft Visual Studio®. NI-VISA™ is the National Instruments implementation of the VISA I/O standard.

NI-VISA™ includes software libraries, interactive utilities such as NI Spy and the VISA Interactive Control, and configuration programs through Measurement and Automation Explorer for all your development needs. NI-VISA is standard across the National Instruments product line. With NI-VISA, you can feel confident that your software development will not become obsolete as your instrumentation interface hardware needs evolve into the future.”

National Instruments (NI) provides the VISA libraries free of charge. You are eligible for a ‘free’ deployment license when you download the VISA libraries for use with an application written using NI software.

Keysight Technologies also offers VISA-C and VISA-COM drivers with the Keysight IO Library Suite. Both the NI and Keysight VISA implementations cover the core VISA specifications and include extensions to interface with NI or Keysight hardware. NI and Keysight VISA libraries can be installed on the same computer, but only one vendor’s libraries will be referenced by the VISA-COM API. 

×

Please have a salesperson contact me.

*Indicates required field

Preferred method of communication? *Required Field
Preferred method of communication? Change email?
Preferred method of communication?

By clicking the button, you are providing Keysight with your personal data. See the Keysight Privacy Statement for information on how we use this data.

Thank you.

A sales representative will contact you soon.

Column Control DTX