Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用PyVISA检测GPIB接口的问题_Python_Gpib - Fatal编程技术网

Python 使用PyVISA检测GPIB接口的问题

Python 使用PyVISA检测GPIB接口的问题,python,gpib,Python,Gpib,我在使用PYvisa的GPIB接口连接设备时出错。下面是我运行的简单代码 >>> import visa; >>> rm = visa.ResourceManager('C:/Windows/System32/visa32.dll'); >>> rm.list_resources(); ('ASRL10::INSTR', 'ASRL71::INSTR') 但是我没有看到它们本身被检测为GPIB接口(比如GPIB

我在使用PYvisa的GPIB接口连接设备时出错。下面是我运行的简单代码

   >>> import visa;

   >>> rm = visa.ResourceManager('C:/Windows/System32/visa32.dll');

   >>> rm.list_resources();

   ('ASRL10::INSTR', 'ASRL71::INSTR')
但是我没有看到它们本身被检测为GPIB接口(比如GPIB::25::INSTR)。我已经安装了正确版本的python和PyVISA。下面是相同的输出

C:\>python -c "from pyvisa import util; util.get_debug_info()"
   Machine Details:
   Platform ID:    Windows-7-6.1.7600
   Processor:      x86 Family 6 Model 58 Stepping 9, GenuineIntel

   Python:
   Implementation: CPython
   Executable:     C:\Python34\python.exe
   Version:        3.4.3
   Compiler:       MSC v.1600 32 bit (Intel)
   Bits:           32bit
   Build:          Feb 24 2015 22:43:06 (#v3.4.3:9b73f1c3e601)
   Unicode:        UCS4

   PyVISA Version: 1.8

   Backends:
   ni:
      Version: 1.8 (bundled with PyVISA)
      #1: C:\Windows\system32\visa32.dll:
         found by: auto
         bitness: 32
         Vendor: National Instruments
         Impl. Version: 14680064
         Spec. Version: 5243904
      #2: C:\Windows\system32\visa32.dll:
         found by: auto
         bitness: 32
         Vendor: National Instruments
         Impl. Version: 14680064
         Spec. Version: 5243904

通过谷歌搜索,我发现版本和库路径可能是可能的原因。但我想这不是我的问题。有谁能指出我哪里出了问题,因为我对Python和pyVISA非常陌生。

检查您的GPIB设备是否通过NIMax面板连接/检测到。如果NIMax上没有显示,则表示您的设备未连接。
此外,您不需要将visa32.dll路径放在visa.ResourceManager()中

检查您的GPIB设备是否通过NIMax面板连接/检测到。如果NIMax上没有显示,则表示您的设备未连接。 此外,您不需要将visa32.dll路径放在visa.ResourceManager()中