visa_instrument
PyVISA Instrument interface and associated decorator tools.
This module contains the VISAInstrument interface and the @retry_on_fail_visa decorator.
Functions
|
Specific implementation of retry_on_fail for visa instruments, which retries on VisaIOErrors by default. |
Classes
|
Implementation of the Instrument Class with instantiation calls to the pyvisa package to instantiate a VISA-compatible GPIB, Serial, Ethernet, . |
retry_on_fail_visa
- icicle.visa_instrument.retry_on_fail_visa(attempts=3, exceptions=(<class 'pyvisa.errors.VisaIOError'>, <class 'serial.serialutil.SerialException'>))
Specific implementation of retry_on_fail for visa instruments, which retries on VisaIOErrors by default.
- Returns:
Decorated function.
VisaInstrument
- class icicle.visa_instrument.VisaInstrument(*args, **kwargs)
Bases:
Instrument
Implementation of the Instrument Class with instantiation calls to the pyvisa package to instantiate a VISA-compatible GPIB, Serial, Ethernet, … instrument.
- __init__(resource='', sim=False)
- Parameters:
resource – VISA resource string. See pyvisa docs for examples.
- property sim
- Returns:
Whether this instrument instance is set up with a simulation backend.
- Return type:
bool