# Agilent¶

## 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'>
Agilent33220a.duty_cycle

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.

Type: int
Agilent33220a.frequency
Agilent33220a.function

Gets/sets the output function of the function generator

Agilent33220a.load_resistance

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). Quantity or Agilent33220a.LoadResistance
Agilent33220a.output

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.

Type: bool
Agilent33220a.output_polarity

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

Agilent33220a.output_sync

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

Type: bool
Agilent33220a.phase
Agilent33220a.ramp_symmetry

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).

Type: int

## 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()

Abort all measurements currently in progress.

clear_memory()

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

fetch()

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
init()

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.

r(count)

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. Quantity with numpy.array
read_data(sample_count)

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. list of Quantity elements
read_data_nvmem()

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

Return type: list of Quantity elements
read_last_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. Quantity
read_meter()

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
data_point_count

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

Return type: int