Coder Social home page Coder Social logo

ivivisanetsample's Introduction

VISA.NET example

Build Status Github Build Status AppVeyor

In the traditional approach, VISA.NET Shared Components are distributed solely as part of a vendor's installer for its VISA implementation. This approach necessitates the installation of the vendor's VISA library implementation on the CI server environment, even if communication with instruments is not required at this stage.

If a developed application is intended to work with various third-party VISA implementations, and no VISA libraries are installed, it would be beneficial if it could provide only a part of the functionality or report the necessity of the VISA library.

This is a simple example of an application bypassing those limitations by using the unofficial NuGet VISA.NET Shared Components distribution, Kelary.Ivi.Visa.

Using VISA.NET in .NET 5+ solutions

.NET Standard, introduced in 2016, marked a pivotal moment in the evolution of the .NET ecosystem. Since then, many versions of .NET have emerged, diminishing the relevance of the traditional .NET Framework for new projects.

Despite these advancements, VISA.NET remains tied to .NET Framework 2.0, with no indication from the IVI Foundation of plans to embrace modern technologies.

A notable challenge is VISA.NET's limited integration into projects with contemporary .NET runtimes. However, compatibility has improved since .NET Core 2, allowing referencing of .NET Framework assemblies in compatibility mode. This suggests potential usability of the VISA.NET library and .NET Framework implementations within a modern .NET runtime.

Another challenge arises as the modern .NET runtime no longer uses the GAC, which VISA.NET relies on. This issue is mitigated by preloading VISA.NET implementations.

In this repository, an experimental .NET 8 example application showcases potential VISA.NET usage with various vendors implementations. Despite progress, successful execution is not guaranteed, as the .NET runtime may lack support for all .NET Framework APIs. Basic functions have been tested with Rohde & Schwarz and Keysight implementations, but some functions may require further testing.

We look forward to the IVI Foundation moving the VISA.NET library from the .NET Framework to the .Net Standard, which will allow VISA.NET to become not only interchangeable, but also cross-platform.

IVI Foundation announces in VPP-4.3.6 that the VISA.NET shared components version 7.3 and later will be available in both .NET Framework versions that target .NET 4.5, and .NET versions that target .NET 6.0 or after.

Existing VISA.NET implementations

In most cases, an application built with VISA.NET Shared Components version 5.5 will work with later implementations of Shared Components. For .NET 5+ projects, the Shared Components version must match those that the implementation depends on.

Below is a non-exhaustive list of vendor-specific VISA implementations with VISA.NET support.

Implementation Size VISA.NET Shared Components Version
Rohde & Schwarz VISA 7.2.3 for Windows 63 MB 7.2
NI-VISA 2023 Q4 1.41 GB 7.2
Rohde & Schwarz VISA 5.12.3 for Windows 59 MB 5.11
Keysight IO Libraries Suite 2019 251 MB 5.11
NI-VISA 20.0 1.16 GB 5.11
Keysight IO Libraries Suite 2018 260 MB 5.8
Keysight IO Libraries Suite 17.2 191 MB 5.6
NI-VISA 15.0,17.5 122 MB 5.6
Kikusui KI-VISA 5.5 89 MB 5.5

ivivisanetsample's People

Contributors

vnau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ivivisanetsample's Issues

Failures with release 7.2 under 4.7.2 and 4.8

Dear @vnau. I find your kelary.ivi.visa simply brilliant. Thank you. I used, I believe, a previous release (5.?) but it seems that the 7.2 release somehow blocks access to the resource manager.

I was getting the following error when running the IviVisaNetSample under .NET Framework 4.8:

VISA.NET Shared Components version 7.2.0.0.
VISA Shared Components version 7.1.6708.0 detected.
Exception: Failed to parse TCPIP0::192.168.0.144::inst0::INSTR

To explore this further, I compiled a program to query the instrument identity and added a resource lookup using the IVI.Visa global resource manager. I then compared the results using the current 7.2 release of the Kelay.ivi.visa package versus using a direct reference to IVI.Visa (5.11).

While using ivi.visa directly works, I am getting the failure to parse error when referencing the package.

Here are my results:

Failure running IviVisaSentSample (I added the name of the running framework).

Running under .NETFramework,Version=v4.8.

VISA.NET Shared Components version 7.2.0.0.
VISA Shared Components version 7.1.6708.0 detected.

Unhandled Exception: Ivi.Visa.VisaException: Failed to parse tcpip0::192.168.0.144::inst0::instr
   at Ivi.Visa.GlobalResourceManager.Parse(String resourceName, SrmDictionary srms)
   at Ivi.Visa.GlobalResourceManager.Parse(String resourceName)
   at Rohde.IdnQuery.Program.Main(String[] args) in C:\my\lib\vs\io\vi\src\rohde\idn.query\Program.cs:line 76

Success running IviVisaSentSample under .NET 8.0:

Running under .NETCoreApp,Version=v8.0.

VISA.NET Shared Components version 7.2.0.0.
VISA Shared Components version 7.1.6708.0 detected.
Loaded assembly "Keysight VISA.NET".

Executing GlobalResourceManager.Find( "TCPIP?*INSTR"    )

Resource: tcpip0::192.168.0.144::inst0::instr
IVI GlobalResourceManager ImplementationVersion:7.2.0.0 SpecificationVersion:7.2.0.0
selected the VISA.NET Implementation by Keysight Technologies, Inc. version 18.2.0.0

Instrument Identification string:
KEITHLEY INSTRUMENTS,MODEL DMM7510,04051720,1.7.7b

Press any key to finish.

Getting an error under v4.8 using Kelary 7.2

I added the resource lookup here as a way to check the resource manager without having to use an explicit resource name.

Running under .NETFramework,Version=v4.8.

VISA.NET Shared Components version 7.2.0.0.
VISA Shared Components version 7.1.6708.0 detected.

Executing GlobalResourceManager.Find( "TCPIP?*INSTR"  )

Error finding resources:
Failed to find resources matching TCPIP?*INSTR
Press any key to finish.

Success running under 4.7.2 using direct reference to IVI.Visa.

Running under .NETFramework,Version=v4.7.2.

VISA.NET Shared Components version 5.11.0.0.
VISA Shared Components version 7.1.6708.0 detected.

Executing GlobalResourceManager.Find( "TCPIP?*INSTR"    )

Resource: tcpip0::192.168.0.144::inst0::instr
IVI GlobalResourceManager selected the following VISA.NET:
Manufacturer: Keysight Technologies, Inc.
Implementation Version: 18.2.0.0

Instrument Identification string:
KEITHLEY INSTRUMENTS,MODEL DMM7510,04051720,1.7.7b

Press any key to finish.

Success running under 4.8 using direct reference to IVI.Visa.

Running under .NETFramework,Version=v4.8.

VISA.NET Shared Components version 5.11.0.0.
VISA Shared Components version 7.1.6708.0 detected.

Executing GlobalResourceManager.Find( "TCPIP?*INSTR"    )

Resource: tcpip0::192.168.0.144::inst0::instr
IVI GlobalResourceManager selected the following VISA.NET:
Manufacturer: Keysight Technologies, Inc.
Implementation Version: 18.2.0.0

Instrument Identification string:
KEITHLEY INSTRUMENTS,MODEL DMM7510,04051720,1.7.7b

Press any key to finish.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.