我应该使用哪些IVI参考?(Which IVI references should I use?)

除了基本的.NET项目之外我还不熟悉其他任何东西,但我目前正在尝试使用测试系统与T&M仪器一起使用,这些仪器通过各种介质(如GPIB,USB等)使用SCPI进行通信。我安装了Keysight IO库,一直在阅读其中的VISA.NET帮助文档。

我希望我的程序能够与VISA供应商保持中立(尽可能多),因此决定仅通过Ivi.Visa接口继续使用该实现。 我正在考虑使用类似以下伪代码的工具编码通信:

//Access implementation only via IVI interfaces to keep things vendor neutral using Ivi.Visa; // Get a session from the manager var Session = (IGpibSession)GlobalResourceManager.Open(Alias, AccessMode, Timeout); // Use the formatted IO interface of the session var io = Session.FormattedIO; // Some communication operations // UserCommand is some faux type object io.PrintfAndFlush("%s", UserCommand.ToString); if (UserCommand.Query) io.Scanf("%s", out UserCommand.Result); // Doesn't seem to be any Close method on resource manager, session or interface? Session.DiscardEvents(EventType.AllEnabled); Session.Dispose();

我只是注意到,虽然我之前认为我在其他文档中看到的COM示例主要是指较旧的用法,但仍然会引用COM示例(例如, 通过USB从C#发送SCPI / GPIB命令 )。

在Visual Studio Reference Manager中进一步探索我发现不仅有VISA COM类型库,还有仪器特定的IVI程序集(例如:IVI Scope Assembly)和类似的COM类型库(例如:IviScope 3.0类型库)。

我对所有这些是什么以及我应该使用或不使用的东西感到有些困惑!

这些都是为了什么? 我的意思是,它们之间有什么区别,为什么我会使用另一个呢? (也许有一个消息来源简明扼要地解释了某些地方的差异或一般用例?)。

I'm fairly new to anything but basic .NET projects but am currently attempting to make a test system for use with T & M instruments that communicates using SCPI over various media such as GPIB, USB, etc. I have Keysight IO Libraries installed and have been reading the VISA.NET help documentation therein.

I would like my program to be VISA vendor-neutral (as much as possible) so decided to stick to using the implementation only via the Ivi.Visa interfaces. I was thinking of coding communications with an instrument something like the following psuedo-code:

//Access implementation only via IVI interfaces to keep things vendor neutral using Ivi.Visa; // Get a session from the manager var Session = (IGpibSession)GlobalResourceManager.Open(Alias, AccessMode, Timeout); // Use the formatted IO interface of the session var io = Session.FormattedIO; // Some communication operations // UserCommand is some faux type object io.PrintfAndFlush("%s", UserCommand.ToString); if (UserCommand.Query) io.Scanf("%s", out UserCommand.Result); // Doesn't seem to be any Close method on resource manager, session or interface? Session.DiscardEvents(EventType.AllEnabled); Session.Dispose();

I just noted however that while I previously thought that COM examples I saw in other documentation mainly referred to older usage, COM examples are still being referred to (eg Sending SCPI/GPIB commands over USB from C#).

Exploring further in the Visual Studio Reference Manager I see that not only is there the VISA COM type library, there are instrument specific IVI assemblies (eg: IVI Scope Assembly) and similar COM type libraries (eg: IviScope 3.0 Type Library).

I'm somewhat bewildered by what all these are for and which ones I'm supposed to use or not use!

What are they all for? I mean, what are the differences between them or why would I use one over the other? (Maybe there is a source that succinctly explains the difference or general use cases somewhere?).

最满意答案

这是一些背景信息。 最后,我认为我不能为您提供直接回答您问题的最新信息。

您可以从不同级别与您的仪器进行通信:

低级I / O. 签证 供应商提供的IVI驱动程序 IVI类驱动程序

不同级别可能取决于较低级别的组件的存在,并且可能允许您访问特定功能的较低级别。

低级I / O驱动程序由操作系统或I / O硬件制造商提供。 USBTMC和GPIB就是例子。

VISA抽象I / O驱动程序,允许通用代码独立于特定安装的I / O硬件。 它允许检测I / O资源功能,因此您可以在需要时执行特殊操作的分支,例如RS-232线路终端检测或某些低级GPIB功能。 您发送的数据必须与仪器的命令语言匹配,例如SCPI。

IVI驱动程序是一个提供仪器域特定功能的库。 驱动程序通过其命令语言与仪器交互,因此您无需对其进行编码。 它可能提供直通功能,因此您可以使用仪器的命令语言来读取和写入库中未涵盖的功能。 IVI驱动程序可能使用VISA进行通信(通常是这样),并且可能需要特定的VISA供应商(通常不需要)。

IVI类驱动程序是为一类仪器(如DMM和信号发生器)提供通用域特定功能的库。 这使您的程序代码可以独立于仪器供应商。 类驱动程序确实需要安装符合类的,供应商提供的IVI驱动程序。

现在,VISA实现是COM或共享库(函数导出),其中任何一个都可以在Visual Basic(以及大多数其他.NET语言)中使用。 我几乎没有这方面的经验,但几年前,在安捷伦和NI之间,安捷伦提供了COM接口,NI提供了共享库接口。

Here is some background info. In the end, I don't think I can give you up-to-date information that directly answers your question.

You can communicate with your instrument from different levels:

Low-level I/O VISA Vendor-provided IVI driver Class IVI driver

The different levels might depend on the presence of components for a lower level and might allow you to access a lower-level for specific features.

Low-level I/O drivers are either provided by the operating system or the I/O hardware manufacturer. USBTMC and GPIB are examples.

VISA abstracts the I/O drivers, allowing general code to be independent of a particular installation's I/O hardware. It does allow detection of the I/O resources features so you can have branches that perform special operations where needed, such as RS-232 line termination detection or some low-level GPIB feature. The data you send would have to match the instrument's command language, such as SCPI.

An IVI driver is a library that provides instrument domain-specific functions. The driver interacts with the instrument through its command language so you don't need to code that. It might provide passthrough functions so you could read and write using the instrument's command language for features that the library doesn't cover. The IVI driver might use VISA for communications (usually does), and it might require a particular VISA vendor (usually doesn't).

An IVI Class driver is a library that provides common domain-specific functions for one class of instruments such as DMMs and signal generators. This allows your program code to be independent of the instrument vendor. A class driver does require a class-compliant, vendor-provided IVI driver to be installed.

Now, VISA implementations are either COM or shared library (function exports), either of which can be used in Visual Basic (and most other .NET languages). I don't have recent experience with these but a few years ago, between Agilent and NI, Agilent provided COM interfaces and NI provided shared library interfaces.

我应该使用哪些IVI参考?(Which IVI references should I use?)

除了基本的.NET项目之外我还不熟悉其他任何东西,但我目前正在尝试使用测试系统与T&M仪器一起使用,这些仪器通过各种介质(如GPIB,USB等)使用SCPI进行通信。我安装了Keysight IO库,一直在阅读其中的VISA.NET帮助文档。

我希望我的程序能够与VISA供应商保持中立(尽可能多),因此决定仅通过Ivi.Visa接口继续使用该实现。 我正在考虑使用类似以下伪代码的工具编码通信:

//Access implementation only via IVI interfaces to keep things vendor neutral using Ivi.Visa; // Get a session from the manager var Session = (IGpibSession)GlobalResourceManager.Open(Alias, AccessMode, Timeout); // Use the formatted IO interface of the session var io = Session.FormattedIO; // Some communication operations // UserCommand is some faux type object io.PrintfAndFlush("%s", UserCommand.ToString); if (UserCommand.Query) io.Scanf("%s", out UserCommand.Result); // Doesn't seem to be any Close method on resource manager, session or interface? Session.DiscardEvents(EventType.AllEnabled); Session.Dispose();

我只是注意到,虽然我之前认为我在其他文档中看到的COM示例主要是指较旧的用法,但仍然会引用COM示例(例如, 通过USB从C#发送SCPI / GPIB命令 )。

在Visual Studio Reference Manager中进一步探索我发现不仅有VISA COM类型库,还有仪器特定的IVI程序集(例如:IVI Scope Assembly)和类似的COM类型库(例如:IviScope 3.0类型库)。

我对所有这些是什么以及我应该使用或不使用的东西感到有些困惑!

这些都是为了什么? 我的意思是,它们之间有什么区别,为什么我会使用另一个呢? (也许有一个消息来源简明扼要地解释了某些地方的差异或一般用例?)。

I'm fairly new to anything but basic .NET projects but am currently attempting to make a test system for use with T & M instruments that communicates using SCPI over various media such as GPIB, USB, etc. I have Keysight IO Libraries installed and have been reading the VISA.NET help documentation therein.

I would like my program to be VISA vendor-neutral (as much as possible) so decided to stick to using the implementation only via the Ivi.Visa interfaces. I was thinking of coding communications with an instrument something like the following psuedo-code:

//Access implementation only via IVI interfaces to keep things vendor neutral using Ivi.Visa; // Get a session from the manager var Session = (IGpibSession)GlobalResourceManager.Open(Alias, AccessMode, Timeout); // Use the formatted IO interface of the session var io = Session.FormattedIO; // Some communication operations // UserCommand is some faux type object io.PrintfAndFlush("%s", UserCommand.ToString); if (UserCommand.Query) io.Scanf("%s", out UserCommand.Result); // Doesn't seem to be any Close method on resource manager, session or interface? Session.DiscardEvents(EventType.AllEnabled); Session.Dispose();

I just noted however that while I previously thought that COM examples I saw in other documentation mainly referred to older usage, COM examples are still being referred to (eg Sending SCPI/GPIB commands over USB from C#).

Exploring further in the Visual Studio Reference Manager I see that not only is there the VISA COM type library, there are instrument specific IVI assemblies (eg: IVI Scope Assembly) and similar COM type libraries (eg: IviScope 3.0 Type Library).

I'm somewhat bewildered by what all these are for and which ones I'm supposed to use or not use!

What are they all for? I mean, what are the differences between them or why would I use one over the other? (Maybe there is a source that succinctly explains the difference or general use cases somewhere?).

最满意答案

这是一些背景信息。 最后,我认为我不能为您提供直接回答您问题的最新信息。

您可以从不同级别与您的仪器进行通信:

低级I / O. 签证 供应商提供的IVI驱动程序 IVI类驱动程序

不同级别可能取决于较低级别的组件的存在,并且可能允许您访问特定功能的较低级别。

低级I / O驱动程序由操作系统或I / O硬件制造商提供。 USBTMC和GPIB就是例子。

VISA抽象I / O驱动程序,允许通用代码独立于特定安装的I / O硬件。 它允许检测I / O资源功能,因此您可以在需要时执行特殊操作的分支,例如RS-232线路终端检测或某些低级GPIB功能。 您发送的数据必须与仪器的命令语言匹配,例如SCPI。

IVI驱动程序是一个提供仪器域特定功能的库。 驱动程序通过其命令语言与仪器交互,因此您无需对其进行编码。 它可能提供直通功能,因此您可以使用仪器的命令语言来读取和写入库中未涵盖的功能。 IVI驱动程序可能使用VISA进行通信(通常是这样),并且可能需要特定的VISA供应商(通常不需要)。

IVI类驱动程序是为一类仪器(如DMM和信号发生器)提供通用域特定功能的库。 这使您的程序代码可以独立于仪器供应商。 类驱动程序确实需要安装符合类的,供应商提供的IVI驱动程序。

现在,VISA实现是COM或共享库(函数导出),其中任何一个都可以在Visual Basic(以及大多数其他.NET语言)中使用。 我几乎没有这方面的经验,但几年前,在安捷伦和NI之间,安捷伦提供了COM接口,NI提供了共享库接口。

Here is some background info. In the end, I don't think I can give you up-to-date information that directly answers your question.

You can communicate with your instrument from different levels:

Low-level I/O VISA Vendor-provided IVI driver Class IVI driver

The different levels might depend on the presence of components for a lower level and might allow you to access a lower-level for specific features.

Low-level I/O drivers are either provided by the operating system or the I/O hardware manufacturer. USBTMC and GPIB are examples.

VISA abstracts the I/O drivers, allowing general code to be independent of a particular installation's I/O hardware. It does allow detection of the I/O resources features so you can have branches that perform special operations where needed, such as RS-232 line termination detection or some low-level GPIB feature. The data you send would have to match the instrument's command language, such as SCPI.

An IVI driver is a library that provides instrument domain-specific functions. The driver interacts with the instrument through its command language so you don't need to code that. It might provide passthrough functions so you could read and write using the instrument's command language for features that the library doesn't cover. The IVI driver might use VISA for communications (usually does), and it might require a particular VISA vendor (usually doesn't).

An IVI Class driver is a library that provides common domain-specific functions for one class of instruments such as DMMs and signal generators. This allows your program code to be independent of the instrument vendor. A class driver does require a class-compliant, vendor-provided IVI driver to be installed.

Now, VISA implementations are either COM or shared library (function exports), either of which can be used in Visual Basic (and most other .NET languages). I don't have recent experience with these but a few years ago, between Agilent and NI, Agilent provided COM interfaces and NI provided shared library interfaces.