Keithley 2200 Series Power Supplies
- class pymeasure.instruments.keithley.Keithley2200(adapter, name='Keithley2200', **kwargs)
Bases:
SCPIUnknownMixin,InstrumentRepresents the Keithley 2200 Power Supply.
- class BaseChannelCreator(**kwargs)
Bases:
objectBase class for ChannelCreator and MultiChannelCreator.
- Parameters:
cls – Class for all children or tuple/list of classes, one for each child.
**kwargs – Keyword arguments for all children.
- class ChannelCreator(cls, id=None, **kwargs)
Bases:
BaseChannelCreatorAdd a single channel to the parent class.
The child will be added to the parent instance at instantiation with
CommonBase.add_child(). The attribute name that ChannelCreator was assigned to in the Instrument class will be the name of the channel interface.class Extreme5000(Instrument): # Two output channels, accessible by their property names # and both are accessible through the 'channels' collection output_A = Instrument.ChannelCreator(Extreme5000Channel, "A") output_B = Instrument.ChannelCreator(Extreme5000Channel, "B") # A channel without a channel accessible through the 'motor' collection motor = Instrument.ChannelCreator(MotorControl) inst = SomeInstrument() # Set the extreme_temp for channel A of Extreme5000 instrument inst.output_A.extreme_temp = 42
- Parameters:
cls (
type[Child]) – Channel class for channel interfaceid (
Union[int,str,None]) – The id of the channel on the instrument, integer or string. (default:None)**kwargs – Keyword arguments for all children.
- class MultiChannelCreator(cls, id=None, prefix='ch_', **kwargs)
Bases:
BaseChannelCreatorAdd channels to the parent class.
The children will be added to the parent instance at instantiation with
CommonBase.add_child(). The attribute name (e.g.channels) will be used as the collection of the children. You may define the attribute prefix. If there are no other pressing reasons, usechannelsas the attribute name and leave the prefix at the default"ch_".class Extreme5000(Instrument): # Three channels of the same type: 'ch_A', 'ch_B', 'ch_C' # and add them to the 'channels' collection channels = Instrument.MultiChannelCreator(Extreme5000Channel, ["A", "B", "C"]) # Two channel interfaces of different types: 'fn_power', 'fn_voltage' # and add them to the 'functions' collection functions = Instrument.MultiChannelCreator((PowerChannel, VoltageChannel), ["power", "voltage"], prefix="fn_")
- Parameters:
cls (
Union[type[Child],Sequence[type[Child]]]) – Class for all children or tuple/list of classes, one for each child.id (
Union[int,str,None]) – tuple/list of ids of the channels on the instrument. (default:None)prefix (
Optional[str]) – Collection prefix for the attributes, e.g. “ch_” creates attribute self.ch_A. If prefix evaluates False, the child will be added directly under the variable name. Required if id is tuple/list. (default:'ch_')**kwargs – Keyword arguments for all children.
- add_child(cls, id=None, collection='channels', prefix='ch_', attr_name='', **kwargs)
Add a child to this instance and return its index in the children list.
The newly created child may be accessed either by the id in the children dictionary or by the created attribute, e.g. the fifth channel of instrument with id “F” has two access options:
instrument.channels["F"] == instrument.ch_FNote
Do not change the default collection or prefix parameter, unless you have to distinguish several collections of different children, e.g. different channel types (analog and digital).
- Parameters:
cls (
type[TypeVar(child, bound=Child)]) – Class of the channel.id (
Union[int,str,None]) – Child id how it is used in communication, e.g. “A”. (default:None)collection (
str) – Name of the collection of children, used for dictionary access to the channel interfaces. (default:'channels')prefix (
Optional[str]) – For creating multiple channel interfaces, the prefix e.g. “ch_” is prepended to the attribute name of the channel interface self.ch_A. If prefix evaluates False, the child will be added directly under the collection name. (default:'ch_')attr_name (
Optional[str]) – For creating a single channel interface, the attr_name argument is used when setting the attribute name of the channel interface. (default:'')**kwargs – Keyword arguments for the channel creator.
- Returns:
TypeVar(child, bound=Child) – Instance of the created child.
- binary_values(command, query_delay=None, **kwargs)
Write a command to the instrument and return a numpy array of the binary data.
- Parameters:
command (
str) – Command to be sent to the instrument.query_delay (
Optional[float]) – Delay between writing and reading in seconds. (default:None)kwargs – Arguments for
read_binary_values().
- Returns:
NumPy array of values.
- 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.
- 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_enabled: Any
Control whether the display is enabled.
- property display_text_data: Any
Control text to be displayed(32 characters).
- static get_channel_pairs(cls)
Return a list of all the Instrument’s channel pairs
- static get_channels(cls)
Return a list of all the Instrument’s ChannelCreator and MultiChannelCreator instances
- Return type:
list[tuple[str,BaseChannelCreator]]
- property id: Any
Get the identification of the instrument.
- 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_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
- remove_child(child)
Remove the child from the instrument and the corresponding collection.
- Parameters:
child (
Child) – Instance of the child to delete.- Return type:
None
- 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.
- 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_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.keithley2200.PSChannel(parent, id, **kwargs)
Bases:
ChannelImplementation of a Keithley 2200 channel.
- property current: Any
Measure the current in Amps.
- property current_limit: Any
Control output current in Amps.
- insert_id(command)
Insert the channel id in a command replacing placeholder.
Subclass this method if you want to do something else, like always prepending the channel id.
- property output_enabled: Any
Control the output state.
- property power: Any
Measure the power in watts.
- property voltage: Any
Measure the voltage in Volts.
- property voltage_limit: Any
Control the maximum voltage that can be set.
- property voltage_limit_enabled: Any
Control whether the maximum voltage limit is enabled.
- property voltage_setpoint: Any
Control output voltage in Volts.