Agilent33220a Function Generator

class instruments.agilent.Agilent33220a(filelike)[source]

The Agilent/Keysight 33220a is a 20MHz function/arbitrary waveform generator. This model has been replaced by the Keysight 33500 series waveform generators. This class may or may not work with these newer models.

Example usage:

>>> import instruments as ik
>>> import instruments.units as u
>>> inst = ik.agilent.Agilent33220a.open_gpibusb('/dev/ttyUSB0', 1)
>>> inst.function = inst.Function.sinusoid
>>> inst.frequency = 1 * u.kHz
>>> inst.output = True
class Function[source]

Enum containing valid functions for the Agilent/Keysight 33220a

dc = 'DC'
noise = 'NOIS'
pulse = 'PULS'
ramp = 'RAMP'
sinusoid = 'SIN'
square = 'SQU'
user = 'USER'
class LoadResistance[source]

Enum containing valid load resistance for the Agilent/Keysight 33220a

high_impedance = 'INF'
maximum = 'MAX'
minimum = 'MIN'
class OutputPolarity[source]

Enum containg valid output polarity modes for the Agilent/Keysight 33220a

inverted = 'INV'
normal = 'NORM'

Gets/sets the duty cycle of a square wave.

Duty cycle represents the amount of time that the square wave is at a high level.


Gets/sets the output function of the function generator


Gets/sets the desired output termination load (ie, the impedance of the load attached to the front panel output connector).

The instrument has a fixed series output impedance of 50ohms. This function allows the instrument to compensate of the voltage divider and accurately report the voltage across the attached load.

Units:As specified (if a Quantity) or assumed to be of units \(\Omega\) (ohm).
Type:Quantity or Agilent33220a.LoadResistance

Gets/sets the output enable status of the front panel output connector.

The value True corresponds to the output being on, while False is the output being off.


Gets/sets the polarity of the waveform relative to the offset voltage.


Gets/sets the enabled status of the front panel sync connector.


Gets/sets the output phase of the function generator. This is an abstract property.


Gets/sets the ramp symmetry for ramp waves.

Symmetry represents the amount of time per cycle that the ramp wave is rising (unless polarity is inverted).


Agilent34410a Digital Multimeter

class instruments.agilent.Agilent34410a(filelike)[source]

The Agilent 34410a is a very popular 6.5 digit DMM. This class should also cover the Agilent 34401a, 34411a, as well as the backwards compatability mode in the newer Agilent/Keysight 34460a/34461a. You can find the full specifications for these instruments on the Keysight website.

Example usage:

>>> import instruments as ik
>>> import instruments.units as u
>>> dmm = ik.agilent.Agilent34410a.open_gpibusb('/dev/ttyUSB0', 1)
>>> print(dmm.measure(dmm.Mode.resistance))

Abort all measurements currently in progress.


Clears the non-volatile memory of the Agilent 34410a.


Transfer readings from instrument memory to the output buffer, and thus to the computer. If currently taking a reading, the instrument will wait until it is complete before executing this command. Readings are NOT erased from memory when using fetch. Use the R? command to read and erase data. Note that the data is transfered as ASCII, and thus it is not recommended to transfer a large number of data points using this method.

Return type:tuple`[`~pint.Quantity, …] or if numpy is installed, Quantity with numpy.array data

Switch device from “idle” state to “wait-for-trigger state”. Measurements will begin when specified triggering conditions are met, following the receipt of the INIT command.

Note that this command will also clear the previous set of readings from memory.


Have the multimeter perform a specified number of measurements and then transfer them using a binary transfer method. Data will be cleared from instrument memory after transfer is complete. Data is transfered from the instrument in 64-bit double floating point precision format.

Parameters:count (int) – Number of samples to take.
Return type:tuple`[`~pint.Quantity, …] or if numpy is installed, Quantity with numpy.array data

Transfer specified number of data points from reading memory (RGD_STORE) to output buffer. First data point sent to output buffer is the oldest. Data is erased after being sent to output buffer.

Parameters:sample_count (int) – Number of data points to be transfered to output buffer. If set to -1, all points in memory will be transfered.
Return type:tuple`[`~pint.Quantity, …] or if numpy is installed, Quantity with numpy.array data

Returns all readings in non-volatile memory (NVMEM).

Return type:tuple`[`~pint.Quantity, …] or if numpy is installed, Quantity with numpy.array data

Retrieve the last measurement taken. This can be executed at any time, including when the instrument is currently taking measurements. If there are no data points available, the value 9.91000000E+37 is returned.

Units:As specified by the data returned by the instrument.
Return type:Quantity

Switch device from “idle” state to “wait-for-trigger” state. Immediately after the trigger conditions are met, the data will be sent to the output buffer of the instrument.

This is similar to calling init and then immediately following fetch.

Return type:Quantity

Gets the total number of readings that are located in reading memory (RGD_STORE).

Return type:int