KEITHLEY Source Meter 2612 module

Created on Fri Dec 10 08:39:48 2021

@author: Martin.Mihaylov

class KEITHLEY2612.KEITHLEY2612(resource_str)[source]

Bases: object

This function is using pyvisa. Please install PyVisa before you use it.

Close()[source]
Reset(chan)[source]
Parameters:

chan (str) – Select Channel A or B and restore to default channel settings.

Raises:

ValueError – Error message

Return type:

None.

ask_Current(chan: str) float[source]

This function performs one current measurements and returns the value.

Parameters:

chan (str) – Select channel A or B

Raises:

ValueError – Error message

Returns:

Return float with the measured current value on the channel.

Return type:

TYPE float

ask_LimitReached(chan: str) bool[source]

This attribute contains the state of source compliance.

Parameters:

chan (str) – This output indicates that a configured limit has been reached. (voltage, current, or power limit)

Returns:

DESCRIPTION.

Return type:

TYPE

ask_Power(chan: str) float[source]

This function performs one power measurements and returns the value.

Parameters:

chan (str) – Select channel A or B

Raises:

ValueError – Error message

Returns:

TYPE – Return float with the measured power value on the channel.

Return type:

float

ask_Resistance(chan: str) float[source]

This function performs one resistance measurements and returns the value.

Parameters:

chan (str) – Select channel A or B

Raises:

ValueError – Error message

Returns:

TYPE – Return float with the measured resistance value on the channel.

Return type:

float

ask_Voltage(chan: str) float[source]

This function performs one voltage measurements and returns the value.

Parameters:

chan (str) – Select channel A or B

Raises:

ValueError – Error message

Returns:

TYPE – Return float with the measured voltage value on the channel.

Return type:

float

ask_readBuffer(chan, start, stop)[source]

TODO: This function should be checked. Also is doesn’t return anything at the moment.

Parameters:
  • chan (str) – Select channel A or B

  • start (int) – select start value

  • stop (int) – select stop value

Raises:

ValueError – Error message

Returns:

  • Print the source function used

  • for ‘start’ - ‘stop’ readings stored in

  • source-measure unit (SMU)

  • channel A, buffer 1.

getIdn()[source]
Returns:

Instrument identification

Return type:

TYPE str

get_Data(chan)[source]
Parameters:

chan (str) – Select channel A or B

Returns:

OutPut – Return a dictionary with the measured voltage and current.

Return type:

dict

query(message)[source]
set_AutoCurrentRange(chan: str, state: int | str) None[source]

This attribute contains the state of the source autorange control (on/off).

Parameters:
  • chan (str) – Select channel A or B

  • state (str) – ON/OFF current source automatic range

Raises:

ValueError – Error message

Return type:

None.

set_AutoVoltageRange(chan: str, state: int | str) None[source]

This attribute contains the state of the source autorange control (on/off).

Parameters:
  • chan (str) – Select channel A or B

  • state (str) – ON/OFF voltage source automatic range

Raises:

ValueError – Error message

Return type:

None.

set_ChannelDisplay(chan: str, double: bool = True) None[source]
Parameters:
  • chan (str) – Select channel A or B

  • double (boolean, optional) –

    Displays source-measure for SMU A and SMU B. double = True per default. if double = True:

    Display Chan A and B

    else:

    Display only Chan selected

Raises:

ValueError – Error message

Return type:

None.

set_Current(chan: str, value: int | float) None[source]

This attribute sets the source level current.

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Set Current on channels A and B

Raises:

ValueError – Error message

Return type:

None.

set_CurrentLimit(chan: str, value: int | float) None[source]

Sets current source compliance. Use to limit the current output when in the voltage source mode. This attribute should be set in the test sequence before turning the source on.

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Sets the current limit of channel X to A. Using a limit value of 0 will result in a “Parameter Too Small” error message (error 1102)

Raises:

ValueError – Error message

Return type:

None.

set_CurrentRange(chan: str, value: int | float) None[source]
This attribute contains the positive full-scale value

of the measure range for current

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Set current source voltage limit

Raises:

ValueError – Error message

Return type:

None.

set_DisplayMeasurementFunction(chan: str, type: str) None[source]

This attribute specifies the type of measurement being displayed.

Parameters:
  • chan (str) – Select channel A or B

  • type (str) – Selects the displayed measurement function: volt, amp, ohm, or watt. SMU A and SMU B can be set for different measurement functions!

Raises:

ValueError – Error message

Return type:

None.

set_MeasOutput(chan: str, state: int | str) None[source]

This attribute sets source output state (on or off)

Parameters:
  • chan (str) – Select channel A or B

  • state (str) – Set source output (CHAN A/B) ON or OFF

Raises:

ValueError – Error message

Return type:

None.

set_MeasurementVoltageRange(chan: str, type: str, value: int | float) None[source]

This attribute contains the positive full-scale value of the measure range for voltage or current.

Parameters:
  • chan (str) – Select channel A or B

  • type (str) – Selects the measurement function: ‘volt’ or ‘amp’. SMU A and SMU B can be set for different measurement functions!

  • value (int/float) – Set to the maximum expected voltage or current to be measured.

Raises:

ValueError – Error message

Return type:

None.

set_OutputSourceFunction(chan: str, type: str) None[source]

This attribute sets the source function (V source or I source).

Parameters:
  • chan (str) – Select channel A or B

  • type (str) – The source function. Set to one of the following values: type = ‘volt’ Selects voltage source function type = ‘amp’ Selects current source function

Raises:

ValueError – Error message

Return type:

None.

set_PulseMeasured(chan: str, value: int | float, ton: int | float, toff: int | float) None[source]
Parameters:
  • chan (str) – Select channel A or B

  • value (int/float or list with curly braces for example {1,2,3....}.)

  • ton (int/float) – X ms pulse on

  • toff (int/float) – X ms pulse off

Raises:

ValueError – Error message

Return type:

None.

set_SourceOutput(chan: str, state: int | str) None[source]

This attribute sets source output state (on or off)

Parameters:
  • chan (str) – Select channel A or B

  • state (str) – Set source output (CHAN A/B) ON or OFF

Raises:

ValueError – Error message

Return type:

None.

set_Voltage(chan: str, value: int | float) None[source]

This attribute sets the source level voltage.

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Set voltage on channels A and B

Raises:

ValueError – Error message

Return type:

None.

set_VoltageLimit(chan: str, value: int | float) None[source]

Sets voltage source compliance. Use to limit the voltage output when in the current source mode. This attribute should be set in the test sequence before turning the source on.

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Sets the voltage limit of channel X to V. Using a limit value of 0 will result in a “Parameter Too Small” error message (error 1102)

Raises:

ValueError – Error message

Return type:

None.

set_VoltageRange(chan: str, value: int | float) None[source]
This attribute contains the positive full-scale value

of the measure range for voltage

Parameters:
  • chan (str) – Select Channel A or B

  • value (int/float) – Set voltage source voltage limit

Raises:

ValueError – Error message

Return type:

None.

set_offmode(chan: str, type: int | str) None[source]

This attribute sets the source output-off mode

Parameters:
  • chan (str) – Channel A or B

  • type (int | str) –

    0 or NORMAL: Configures the source function according to

    smuX.source.offfunc attribute

    1 or ZERO: Configures source to output 0 V 2 or HIGH_Z: Opens the output relay when the output is turned off

Raises:

ValueError – Channel not in Channel list or Type not in Type list

write(message)[source]