pylab_ml.base_instrument

This script contains the base classes for different types of instruments, such as LocalInstrument, PxieInstrument, NetworkInstrument, and GenericInstrument. It also includes a TimeoutBudget class for managing timeouts across instrument transactions. The Instrument class is an abstract base class that provides a basic set of methods and properties to be overridden by actual instrument implementations.

Functions

choicelogger()

Chooses the logger based on command line arguments.

createDummyifInvalid(val)

Global switch to create Dummy instance if error occured in instrument._init or instrument have no connection.

logsetup()

Set up the logger with console and file handlers, and configure the logging level.

measure(self, message, *args, **kws)

Custom logging level for measurements.

mqttclose()

Close the MQTT client connection.

Classes

GeneralVisa(**kwargs)

Interface to any Visa Instrument.

GenericInstrument(*args, **kwargs)

Class for generic instruments that do not fit into the local, PXIe, or network categories.

Instrument(**kwargs)

This is the abstract Instrument class.

LocalInstrument(*args, **kwargs)

Class for local instruments that are connected via interfaces such as GPIB, USB, or serial.

NetworkInstrument(*args, **kwargs)

Class for network instruments that are connected via the TCP/IP interface.

PxieInstrument(*args, **kwargs)

Class for PXIe instruments that are connected via the NI-VISA backend.

TimeoutBudget(*args, **kwargs)

This TimeoutBudget class is a singleton to provide a shared budget object within each Instrument object.

Exceptions

InvalidInstrumentConnection

InvalidInstrumentCreateSessionFunction