安捷伦 VISA 和 NI-VISA 共存和 PyVISA [英] Agilent VISA and NI-VISA coexistence and PyVISA

查看:46
本文介绍了安捷伦 VISA 和 NI-VISA 共存和 PyVISA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有解决方案可以让 PyVISA 在同一个 Python 应用程序中与 Agilent VISA 库和 National Instruments VISA 库连接?Agilent VISA 库不适用于 National Instrument 设备,反之亦然.我受到可用硬件的限制.在 Win7 32 位、Agilent GPIB 和 NI Digital I/O 上运行 Python 2.7、PyVISA 1.4.

Is there a solution to get PyVISA to interface with an Agilent VISA library and a National Instruments VISA library from within the same python application? Agilent VISA library doesn't work with the National Instrument devices and vice-versa. I'm constrained by the hardware available to me. Running Python 2.7, PyVISA 1.4, on Win7 32 bit, Agilent GPIB, and NI Digital I/O.

我有一台 Agilent 82357A USB/GPIB 接口和 National Instruments 6534A 数字 I/O 仪器.我安装了 Agilent VISA 驱动程序,该驱动程序可用于使用 PyVISA 与 Agilent 硬件接口,但我还需要使 NI-6534 PCI 数字 I/O 与 National Instruments VISA 配合使用.

I have an Agilent 82357A USB/GPIB interface and National Instruments 6534A Digital I/O instrument. I have the Agilent VISA driver installed and that works for interfacing with Agilent hardware using PyVISA but I also need to get the NI-6534 PCI Digital I/O working with National Instruments VISA.

根据 PyVISA 安装文档,您可以通过创建名为.pyvisarc"的文件来定义要使用的 VISA DLL 文件.但是,您不能在程序运行时在 DLL 之间切换.PyVISA 被定义为使用单例设计模式(参考包含初始化代码的 vpp43.py).

Per the PyVISA installation document, you can define which VISA DLL file to use by creating a file called ".pyvisarc". However, you cannot switch between DLLs while the program is running. PyVISA is defined to use a Singleton design pattern (referring to vpp43.py which contains the initialization code).

推荐答案

按照这个图设置:

这篇关于安捷伦 VISA 和 NI-VISA 共存和 PyVISA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆