Agilent33220a Function Generator

class instruments.agilent.Agilent33220a(filelike)

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 quantities as pq
>>> inst = ik.agilent.Agilent33220a.open_gpibusb('/dev/ttyUSB0', 1)
>>> inst.function = inst.Function.sinusoid
>>> inst.frequency = 1 * pq.kHz
>>> inst.output = True
class Function

Enum containing valid functions for the Agilent/Keysight 33220a

dc = <Function.dc: 'DC'>
noise = <Function.noise: 'NOIS'>
pulse = <Function.pulse: 'PULS'>
ramp = <Function.ramp: 'RAMP'>
sinusoid = <Function.sinusoid: 'SIN'>
square = <Function.square: 'SQU'>
user = <Function.user: 'USER'>
class Agilent33220a.LoadResistance

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

high_impedance = <LoadResistance.high_impedance: 'INF'>
maximum = <LoadResistance.maximum: 'MAX'>
minimum = <LoadResistance.minimum: 'MIN'>
class Agilent33220a.OutputPolarity

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

inverted = <OutputPolarity.inverted: 'INV'>
normal = <OutputPolarity.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 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)

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 quantities as pq
>>> 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:list of Quantity elements

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:Quantity with numpy.array

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:list of Quantity elements

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

Return type:list of Quantity elements

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