lightlab.equipment.visa_bases.visa_driver module

Summary

Exceptions:

IncompleteClass
InstrumentIOError

Classes:

DefaultDriver alias of lightlab.equipment.visa_bases.visa_driver.VISAInstrumentDriver
DriverMeta Driver initializer returns an instrument in instrument_category, not an instance of the Driver itself, unless * instrument_category is None * directInit=True is passed in
InstrumentSession This class is the interface between the higher levels of lightlab instruments and the driver controlling the GPIB line.
VISAInstrumentDriver Generic (but not abstract) class for an instrument.

Reference

exception InstrumentIOError[source]

Bases: RuntimeError

class InstrumentSession(address=None, tempSess=False)[source]

Bases: lightlab.equipment.visa_bases.visa_driver._AttrGetter

This class is the interface between the higher levels of lightlab instruments and the driver controlling the GPIB line. Its methods are specialized into either PrologixGPIBObject or VISAObject.

This was mainly done because the Prologix GPIB Ethernet controller is not VISA compatible and does not provide a VISA interface.

If the address starts with ‘prologix://’, it will use PrologixGPIBObject’s methods, otherwise it will use VISAObject’s methods (relying on pyvisa).

Warning

Since this is a wrapper class to either PrologixGPIBObject

or VISAObject, avoid using super() in overloaded methods. (see this)

reinstantiate_session(address, tempSess)[source]
open()[source]
close()[source]
exception IncompleteClass[source]

Bases: Exception

class DriverMeta(name, bases, dct)[source]

Bases: type

Driver initializer returns an instrument in instrument_category, not an instance of the Driver itself, unless

  • instrument_category is None
  • directInit=True is passed in

Also checks that the API is satistied at compile time, providing some early protection against bad drivers, like this: test_badDriver().

Checks that it satisfies the API of its Instrument.

This occurs at compile-time

class VISAInstrumentDriver(name='Default Driver', address=None, **kwargs)[source]

Bases: lightlab.equipment.visa_bases.visa_driver.InstrumentSession

Generic (but not abstract) class for an instrument. Initialize using the literal visa address

Contains a visa communication object.

instrument_category = None
startup()[source]
open()[source]
close()[source]
DefaultDriver

alias of lightlab.equipment.visa_bases.visa_driver.VISAInstrumentDriver