Getting started with Lake Shore IVI.NET drivers
Along with LabVIEW™ and Python™ drivers, Lake Shore is pleased to offer IVI.NET instrument drivers to communicate with and control various Lake Shore instruments. For users who are comfortable programming within the .NET framework, Lake Shore IVI.NET drivers provide a way to more easily develop applications that communicate with Lake Shore instruments.
IVI driver pre-requisites
It is recommended to download and install the following IVI.NET driver pre-requisites first before running the Lake Shore IVI.NET installer.
Virtual Instrument Software Architecture (VISA) implementation
VISA is a widely used API for interfacing with test and measurement implementation. Many companies provide implementations of this standardized interface.
Lake Shore IVI.NET drivers are developed and tested with the National Instruments VISA implementation. Lake Shore IVI.NET drivers are compatible with NI-VISA version 17.5 or later.
In addition, the Lake Shore IVI.NET driver requires the installation of VISA.NET Shared Components. This package is included with the standard install of NI-VISA.
IVI shared components
In order for a driver to be IVI compliant, the IVI Foundation has defined shared software components that are required for the driver. In addition, IVI.NET drivers have their own shared components that must be installed as well. The IVI.NET shared components are dependent on the IVI shared components, therefore, it is recommended to install the IVI shared components first. Both sets of shared components can be found on the IVI Foundation website.
Download and install the Lake Shore IVI.NET driver
Lake Shore IVI.NET drivers are built to run on both 32-bit and 64-bit Windows systems.
For the purposes of this documentation, the M91 FastHall IVI.NET driver will be used as an example.
Download the IVI.NET driver zip file that’s applicable to your instrument:
Run the appropriate .msi file that is compatible with your computer's architecture.
During installation, the following setup screen will be presented. The help documentation will be installed by default. In addition, some Lake Shore IVI.NET drivers have example code included. The example code illustrates how to consume the driver.
Upon completion, the driver files will be located in the following paths:
C:\Program Files\IVI Foundation\IVI\Microsoft.NET\Framework64\ v4.0.30319\LakeShoreCryotronics.FastHall 1.0.0
C:\Program Files (x86)\IVI Foundation\IVI\Microsoft.NET\Framework32\ v4.0.30319\LakeShoreCryotronics.FastHall 1.0.0
Lake Shore IVI.NET driver file overview
The driver dlls and help information can be viewed in the install folders. Help documentation is in the Microsoft Compiled HTML Help (.chm) format. Clicking on this file will launch the help window. This file contains an overview of the IVI driver structure, as well as lower-level details of instrument-specific methods and properties.
Getting started with a simple console application
In the following example, a simple console application will be created to interrogate the instrument for the instrument manufacturer name and model, and report it to the console.
NOTE: Lake Shore IVI.NET drivers do not support .NET Core. Therefore, all applications must be created with .NET Framework.
Create Visual Studio project
The following example uses Visual Studio 2019 and the C# programming language.
Under the Create a new project window, select Console App (.NET Framework).
Add assembly references
Here, the following references will be added to the project. This example was built on a x64 Windows PC
Navigate to the References item located under the project. Right-click References, then select Add Reference...:
Once inside the Reference Manager, click the Browse button. Add the following files, depending on the target application architecture.
C:\Program Files\IVI Foundation\IVI\Microsoft.NET\Framework64\v4.0.30319\ LakeShoreCryotronics.FastHall 1.0.0\LakeShoreCryotronics.FastHall.Fx40.dll
c:\Program Files\IVI Foundation\IVI\Microsoft.NET\Framework64\ v2.0.50727\IviFoundationSharedComponents 1.4.1\Ivi.Driver.dll
C:\Program Files (x86)\IVI Foundation\IVI\Microsoft.NET\Framework32\v4.0.30319\ LakeShoreCryotronics.FastHall 1.0.0\LakeShoreCryotronics.FastHall.Fx40.dll
c:\Program Files (x86)\IVI Foundation\IVI\Microsoft.NET\ Framework32\v2.0.50727\IviFoundationSharedComponents 1.4.1\Ivi.Driver.dll
Instantiate a new instance of the Lake Shore Instrument
This example uses a Lake Shore M91 FastHall™ controller attached to serial port COM3.
First, add the following using directive to the source code:
Second, create a driver object by invoking the instrument constructor. In the example below, the COM port resource name uses the NI-VISA syntax: ASRL3::INSTR. In addition, the code below is asking the driver to perform an id query and reset the instrument.
using (var driver = new FastHall("ASRL3::INSTR", true, true, ""))
Finally, add the following lines of code to interrogate the instrument and report the results:
When the steps above are completed, the Visual Studio window should look as follows:
Run the program and observe the following output:
Some Lake Shore IVI.NET drivers have example programs included with them that illustrate how to consume the driver and perform some basic measurements or functions. This example program and code can be found in the following file location:
C:\Program Files (x86)\IVI Foundation\IVI\Microsoft.NET\Framework32\v4.0.30319\<Lake Shore Driver name>\Examples
At this point, please refer to the help file for the respective instrument driver for more information on how to command and control your specific Lake Shore instrument. There you will find a breakdown of all the methods and properties available to interact with the Lake Shore instrument.