Keithley 2281S power supply and battery simulator / characterizer

class pymeasure.instruments.keithley.Keithley2281S(adapter, name='Keithley2281S', **kwargs)

Bases: SCPIMixin, Instrument, KeithleyBuffer

Represents the Keithley 2281S-20-6 power supply and battery simulator / characterizer. Common commands beside function_mode and power supply commands should also work for Keithley 2280S power supplies, although this is untested.

bs
Channel:

BatterySimulationChannel

bt
Channel:

BatteryTestChannel

ps
Channel:

PowerSupplyChannel

property buffer_data

Get a pandas dataframe of values from the buffer.

property buffer_points: Any

Control the maximum number of buffer points to store.

characterize(lower_voltage, upper_voltage, charge_current, memory_slot, model_voltage_offset=0.05, charge_delay=0)

Convenience function for testing a battery and saving its model to the internal memory.

The device can only discharge the battery at a fixed 1A! If this current is too high, a series resistor has to be used during discharge to limit the current! If the battery is discharged below the lower limit, it will be charged with a 10th of the set charge current till it reaches the lower limit, then the battery profile will be characterized. The function will block until the end of the measurement!

Parameters:
  • lower_voltage (float) – discharge end voltage, set this slightly lower (~0.05V) than in normal operation

  • upper_voltage (float) – charge end voltage, set this slightly higher (~0.05V) than in normal operation

  • charge_current (float) – maximum charge current. A 1/100th is used as (dis-)charge end current.

  • memory_slot (int) – Internal memory slot to save the model to

  • model_voltage_offset (float, optional) – Voltage offset for the generated model upper and lower limits. These have to be in the range of the actual measured values, i.e. in between the hard limits of the measurement. Defaults to 0.05 (default: 0.05)

  • charge_delay (float, optional) – Seconds to wait between discharging and charging. Actual time is higher since the device has some internal delay on reporting end of a test. Defaults to 0. (default: 0)

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 – 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 – List of error entries.

clear()

Clear the instrument status byte.

property complete: Any

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.

property display_text_data: Any

Set control text to be displayed(24 characters).

property function_mode: Any

Control function mode to use.

Valid values are “POWER”, “TEST” and “SIMULATOR”.

property id: Any

Get the identification of the instrument.

property line_frequency: Any

Get line frequency.

property measurement_event: Any

Get measurement event register.

property measurement_ongoing: bool

Get measurement status.

property next_error: Any

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

property options: Any

Get the device options installed.

read(**kwargs)

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

Return type:

str

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

Return type:

bytes

property reading_available: bool

Get availability of a reading.

reset()

Reset the instrument.

shutdown()

Brings the instrument to a safe and stable state

Return type:

None

property status: Any

Get the status byte and Master Summary Status bit.

property summary_event: Any

Get summary event register.

wait_for(query_delay=None)

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

Parameters:

query_delay (Optional[float]) – Delay between writing and reading in seconds. None is default delay. (default: None)

Return type:

None

write(command, **kwargs)

Write a string command to the instrument appending write_termination.

Parameters:
  • command (str) – command string to be sent to the instrument

  • kwargs – Keyword arguments for the adapter.

Return type:

None

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

Write binary values to the device.

Parameters:
  • command (str) – Command to send.

  • values (Sequence[Union[int, float]]) – The values to transmit.

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

Return type:

None

write_bytes(content, **kwargs)

Write the bytes content to the instrument.

Return type:

None

class pymeasure.instruments.keithley.keithley2281S.Keithley2281SOperationEventRegister(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Enum containing Keithley2281S Operation Instrument Summary Event Register definition

class pymeasure.instruments.keithley.keithley2281S.Keithley2281SMeasurementEventRegister(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Enum containing Keithley2281S Measurement Instrument Summary Event Register definition