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._AttrGetterThis 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
PrologixGPIBObjector
VISAObject, avoid using super() in overloaded methods. (see this)
-
class
DriverMeta(name, bases, dct)[source]¶ Bases:
typeDriver initializer returns an instrument in
instrument_category, not an instance of the Driver itself, unlessinstrument_categoryis NonedirectInit=Trueis 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.InstrumentSessionGeneric (but not abstract) class for an instrument. Initialize using the literal visa address
Contains a visa communication object.
-
instrument_category= None¶
-
-
DefaultDriver¶ alias of
lightlab.equipment.visa_bases.visa_driver.VISAInstrumentDriver