Connecting to an instrument with Python (Pyvisa)

2.1k views Asked by At

I am trying to automate a Keithley 2000 source meter with python. I used the following code to connect to the instrument (GPIB):

import pyvisa
rm = pyvisa.ResourceManager()
rm.list_resources()
('ASRLCOM1::INSTR', 'ASRLCOM3::INSTR')

Since gpib is not founded here, I tried all the following and I got the following errors:

from gpib_ctypes import gpib
AttributeError: function 'ibsre' not found

my_instrument = rm.open_resource('GPIB::20::INSTR')
AttributeError: No class registered for InterfaceType.gpib, INSTR

import visa
DMM = visa.ResourceManager().get_instrument('GPIB::20::INSTR')
DMM.ask('*IDN?')
ValueError: No class registered for InterfaceType.gpib, INSTR

Is there anyone who can help me?

0

There are 0 answers