python-3.xgpibpyvisa

Unable to connect to powermeter through Ethernet-GPIB adapter


When i am trying to run my code i get the following error : ValueError: Please install linux-gpib to use this resource type. No module named 'gpib'

After trying to install linux-gpib, using pip and the command line, i get this one :
Could not find a version that satisfies the requirement linux-gpib (from versions: ) No matching distribution found for linux-gpib

I have managed to connect a signal generator through ethernet but i got no luck using the same principles with gpib.

Tried to reinstall python and the pyvisa package with no luck, tried importing a wrapper for this specific ethernet adapter : pip install git+git://github.com/nelsond/prologix-gpib-ethernet.git again no luck. I also tried using the ip provided by the adapter driver to connect through TCPIP, still no luck.

import visa

rm = visa.ResourceManager()
rm.list_resources()
inst = rm.open_resource('GPIB0::16::INSTR') #using GPIB
inst = rm.open_resource('TCPIP::192.168.1.77::INSTR') #using TCPIP
print(inst.query("*IDN?"))

The executed code should provide the IDN of the device, eg : Rohde & Schwarz,SMB100A,1406.6000k02...etc


Solution

  • Try changing to another USB to GPIB adapter.