Keithley 2281S power supply and battery simulator / characterizer
- class pymeasure.instruments.keithley.Keithley2281S(adapter, name='Keithley2281S', **kwargs)
Bases:
SCPIMixin,Instrument,KeithleyBufferRepresents 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 operationupper_voltage (
float) – charge end voltage, set this slightly higher (~0.05V) than in normal operationcharge_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 tomodel_voltage_offset (
float) – 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.05charge_delay (
float(default:0)) – 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.05)
- 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=Trueis 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=Trueis 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.
- config_buffer(points=64, delay=0)
Configure the measurement buffer for a number of points, to be taken with a specified delay.
- Parameters:
points – The number of points in the buffer. (default:
64)delay – The delay time in seconds. (default:
0)
- disable_buffer()
Disable the connection between measurements and the buffer, but does not abort the measurement process.
- 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.
- is_buffer_full()
Return True if the buffer is full of measurements.
- 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.
- reset_buffer()
Reset the buffer.
- shutdown()
Brings the instrument to a safe and stable state
- Return type:
None
- start_buffer()
Starts the buffer.
- property status: Any
Get the status byte and Master Summary Status bit.
- stop_buffer()
Abort the buffering measurement, by stopping the measurement arming and triggering sequence. If possible, a Selected Device Clear (SDC) is used.
- 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 (
float|None) – Delay between writing and reading in seconds. None is default delay. (default:None)- Return type:
None
- wait_for_buffer(should_stop=<function KeithleyBuffer.<lambda>>, timeout=60, interval=0.1)
Block the program, waiting for a full buffer. This function returns early if the
should_stopfunction 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 (default:
<function KeithleyBuffer.<lambda> at 0x7f837c49d7a0>)timeout – A time in seconds after which this function should return early (default:
60)interval – A time in seconds for how often to check if the buffer is full (default:
0.1)
- write(command, **kwargs)
Write a string command to the instrument appending write_termination.
- Parameters:
command (
str) – command string to be sent to the instrumentkwargs – 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[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(*values)
Enum containing Keithley2281S Operation Instrument Summary Event Register definition
- class pymeasure.instruments.keithley.keithley2281S.Keithley2281SMeasurementEventRegister(*values)
Enum containing Keithley2281S Measurement Instrument Summary Event Register definition