# Keithley 2182 Nanovoltmeter

class pymeasure.instruments.keithley.Keithley2182(adapter, name='Keithley 2182 Nanovoltmeter', read_termination='\r', **kwargs)

  Bases: `SCPIMixin`, `KeithleyBuffer`, `Instrument`

  Represents the Keithley 2182 Nanovoltmeter and provides a high-level interface for interacting with the instrument.

      keithley = Keithley2182("GPIB::1")

      keithley.reset()                        # Return instrument settings to default
                                                values
      keithley.thermocouple = 'S'             # Sets thermocouple type to S
      keithley.active_channel = 1             # Sets channel 1 for active measurement
      keithley.channel_function = 'voltage'   # Configures active channel for voltage
                                                measurement
      print(keithley.voltage)                 # Prints the voltage in volts

      keithley.ch_1.setup_voltage()           # Set channel 1 active and prepare
                                                voltage measurement
      keithley.ch_2.setup_temperature()       # Set channel 2 active and prepare
                                                temperature measurement

  ch_1
    Channel:

      `Keithley2182Channel`

  ch_2
    Channel:

      `Keithley2182Channel`

  property active_channel

    Control which channel is active for measurement. Valid values are 0 (internal temperature sensor), 1, and 2.

  auto_line_frequency()

    Set appropriate limits for NPLC voltage and temperature readings.

  property auto_zero_enabled

    Control the auto zero option (bool).

  property buffer_data

    Get a numpy array of values from the buffer.

  property buffer_points

    Control the number of buffer points. This does not represent actual points in the buffer, but the configuration value instead.

  property channel_function

    Control the measurement mode of the active channel. Valid options are voltage and temperature.

  check_errors()

    Read all errors from the instrument.

    Returns:

      List of error entries.

  check_get_errors()

    Check for errors after having gotten a property and log them.

    Called if `check_get_errors=True` is set for that property.

    If you override this method, you may choose to raise an Exception for certain errors.

    Returns:

      List of error entries.

  check_set_errors()

    Check for errors after having set a property and log them.

    Called if `check_set_errors=True` is set for that property.

    If you override this method, you may choose to raise an Exception for certain errors.

    Returns:

      List of error entries.

  clear()

    Clear the instrument status byte.

  property complete

    Get the synchronization bit.

    This property allows synchronization between a controller and a device. The Operation Complete query places an ASCII character 1 into the device’s Output Queue when all pending selected device operations have been finished.

  config_buffer(points=64, delay=0)

    Configures the measurement buffer for a number of points, to be taken with a specified delay.

    Parameters:

      - points – The number of points in the buffer.

      - delay – The delay time in seconds.

  disable_buffer()

    Disables the connection between measurements and the buffer, but does not abort the measurement process.

  property display_enabled

    Control whether the front display of the voltmeter is enabled. Valid values are True and False.

  property id

    Get the identification of the instrument.

  property internal_temperature

    Measure the internal temperature in Celsius.

  is_buffer_full()

    Returns True if the buffer is full of measurements.

  property line_frequency

    Get the line frequency in Hertz. Values are 50 or 60. Cannot be set on 2182.

  property maximum

    Get the calculated maximum from the buffer data.

  property mean

    Get the calculated mean (average) from the buffer data.

  property minimum

    Get the calculated minimum from the buffer data.

  property next_error

    Get the next error in the queue. If you want to read and log all errors, use `check_errors()` instead.

  property options

    Get the device options installed.

  read(**kwargs)

    Read up to (excluding) read_termination or the whole read buffer.

  read_binary_values(**kwargs)

    Read binary values from the device.

  read_bytes(count, **kwargs)

    Read a certain number of bytes from the instrument.

    Parameters:

      - count (int) – Number of bytes to read. A value of -1 indicates to read the whole read buffer.

      - kwargs – Keyword arguments for the adapter.

    Returns bytes:

      Bytes response of the instrument (including termination).

  reset()

    Reset the instrument and clear the queue.

  reset_buffer()

    Resets the buffer.

  sample_continuously()

    Configure the instrument to continuously read samples and turn off any buffer or output triggering.

  shutdown()

    Brings the instrument to a safe and stable state

  property standard_dev

    Get the calculated standard deviation from the buffer data.

  start_buffer()

    Starts the buffer.

  property status

    Get the status byte and Master Summary Status bit.

  stop_buffer()

    Aborts the buffering measurement, by stopping the measurement arming and triggering sequence. If possible, a Selected Device Clear (SDC) is used.

  property temperature

    Measure the temperature in Celsius, if active channel is configured for this reading.

  property temperature_nplc

    Control the number of power line cycles (NPLC) for temperature measurements, which sets the integration period and measurement speed. Valid values are from 0.01 to 50 or 60, depending on the line frequency. Default is 5.(dynamic)

  property temperature_reference_junction

    Control whether the thermocouple reference junction is internal (INT) or simulated (SIM). Default is INT.

  property temperature_simulated_reference

    Control the value of the simulated thermocouple reference junction in Celsius. Default is 23 C.

  property thermocouple

    Control the thermocouple type for temperature measurements. Valid options are B, E, J, K, N, R, S, and T.

  trigger()

    Execute a bus trigger, which can be used when `trigger_on_bus()` is configured.

  property trigger_count

    Control the trigger count which can take values from 1 to 9,999. Default is 1.

  property trigger_delay

    Control the trigger delay in seconds, which can take values from 0 to 999999.999 s. Default is 0.

  trigger_immediately()

    Configure measurements to be taken with the internal trigger at the maximum sampling rate.

  trigger_on_bus()

    Configure the trigger to detect events based on the bus trigger, which can be activated by `trigger()`.

  property voltage

    Measure the voltage in Volts, if active channel is configured for this reading.

  property voltage_nplc

    Control the number of power line cycles (NPLC) for voltage measurements, which sets the integration period and measurement speed. Valid values are from 0.01 to 50 or 60, depending on the line frequency. Default is 5.(dynamic)

  wait_for(query_delay=None)

    Wait for some time. Used by ‘ask’ to wait before reading.

    Parameters:

      query_delay – Delay between writing and reading in seconds. None is default delay.

  wait_for_buffer(should_stop=<function KeithleyBuffer.<lambda>>, timeout=60, interval=0.1)

    Blocks the program, waiting for a full buffer. This function returns early if the `should_stop` function returns True or the timeout is reached before the buffer is full.

    Parameters:

      - should_stop – A function that returns True when this function should return early

      - timeout – A time in seconds after which this function should return early

      - interval – A time in seconds for how often to check if the buffer is full

  write(command, **kwargs)

    Write a string command to the instrument appending write_termination.

    Parameters:

      - command – command string to be sent to the instrument

      - kwargs – Keyword arguments for the adapter.

  write_binary_values(command, values, *args, **kwargs)

    Write binary values to the device.

    Parameters:

      - command – Command to send.

      - values – The values to transmit.

      - **kwargs (*args,) – Further arguments to hand to the Adapter.

  write_bytes(content, **kwargs)

    Write the bytes content to the instrument.

class pymeasure.instruments.keithley.keithley2182.Keithley2182Channel(parent, id)

  Bases: `Channel`

  Implementation of a Keithley 2182 channel.

  Channel 1 is the fundamental measurement channel, while channel 2 provides sense measurements. Channel 2 inputs are referenced to Channel 1 LO. Possible configurations are

  Voltage (Channel 1) Temperature (Channel 1) Voltage (Channel 1) and Voltage (Channel 2) Voltage (Channel 1) and Temperature (Channel 2)

  acquire_temperature_reference()

    Acquire a temperature measurement and store it as the relative offset value.

    Only acquires reference if temperature offset is enabled.

  acquire_voltage_reference()

    Acquire a voltage measurement and store it as the relative offset value.

    Only acquires reference if voltage offset is enabled.

  setup_temperature(nplc=5)

    Change active channel and configure channel for temperature measurement.

    Parameters:

      nplc – Number of power line cycles (NPLC) from 0.01 to 50/60

  setup_voltage(auto_range=True, nplc=5)

    Set active channel and configure channel for voltage measurement.

    Parameters:

      - auto_range – Enables auto_range if True, else uses set voltage range

      - nplc – Number of power line cycles (NPLC) from 0.01 to 50/60

  property temperature_offset

    Control the relative offset for measuring temperature. Displayed value = actual value - offset value. Valid values are -273 C to 1800 C.

  property temperature_offset_enabled

    Control whether temperature is measured as a relative or absolute value (bool). Disabled by default.

  property voltage_offset

    Control the relative offset for measuring voltage. Displayed value = actual value - offset value. Valid ranges are -120 V to +120 V for Ch. 1, and -12 V to +12 V for Ch. 2.(dynamic)

  property voltage_offset_enabled

    Control whether voltage is measured as a relative or absolute value (bool). Enabled by default for Ch. 2 voltage, which is measured relative to Ch. 1 voltage.

  property voltage_range

    Control the positive full-scale measurement voltage range in Volts. The Keithley 2182 selects a measurement range based on the expected voltage. DCV1 has five ranges: 10 mV, 100 mV, 1 V, 10 V, and 100 V. DCV2 has three ranges: 100 mV, 1 V, and 10 V. Valid limits are from 0 to 120 V for Ch. 1, and 0 to 12 V for Ch. 2. Auto-range is automatically disabled when this property is set.(dynamic)

  property voltage_range_auto_enabled

    Control the auto voltage ranging option (bool).