Skip to content

voltageSweepSingleSMU (pulsed) hangs or rises error codes #17

@martin3366

Description

@martin3366

The keithley_driver.py drastically simplifies working with Keithley 2651A when performing DC sweep. But running the "voltageSweepSingleSMU" with "pulsed" setting, such that the power source operates only in "pulsed mode area" (outside of DC area) causes that the function hangs on keithley_driver.py line 927:
# while loop that runs until the sweep begins
while self.status.operation.sweeping.condition == 0:
time.sleep(0.1)

OR the function "voltageSweepSingleSMU" returns successfully, but after the execution, the error codes are set:
-286: TSP Runtime error at line 1: attempt to index field `smub' (a nil value)
5028: SMU A: Cannot perform requested operation while source autorange is enabled
1011: Parameter too big

The measured values re being often (not always!) incorrect (the sweep is not finished, the higher values, usually above 20 [V] are change and go back to 0[V]). Keithley 2651A should be able to perform "pulsed" sweep up to 40[V] and 50[A]. The test is performed for a device that reaches 5[A] at 27[V], which is above the DC operation, but well within the "pulsed" mode limit.

The code below should reproduce the behavior.

#%% Import
from keithley2600 import Keithley2600 # uses pyvisa to produce an object/session to represent Keithley 2651A
import numpy as np # arrays and operations on arrays
import time # timing (sleep)
import matplotlib.pyplot as plt # plotting

#%% User input
v_reverse = 15.0 # [V] (less than 40 [V])
v_reverse_max = 40 # [V]
i_reverse_max = 20 # [V] Only pulsed operation
v_reverse_len = 5


#%% Perform measurement
k = Keithley2600('TCPIP0::192.168.0.101::inst0::INSTR')
k.connect()

time.sleep(1.0)
if( not k.connected ):
    raise TypeError("Device not connected")
print('connect: OK')

k.smua.reset()
print('reset: OK')

k.smua.source.output = k.smua.OUTPUT_ON   # turn on SMUA
print('measure: START')

#%% Memory allocation   
v_meas = np.zeros((v_reverse_len,1))
i_meas = np.zeros((v_reverse_len,1))

#%% reverse measurement
k.smua.source.limitv = v_reverse_max # set voltage limit
k.smua.source.limiti = i_reverse_max # set current limit

#[v_meas, i_meas] = k.voltageSweepSingleSMU(smu=k.smua, smu_sweeplist=np.arange(0,v_reverse,3), t_int=0.001, delay=0.1, pulsed=True)
#print('measure: reverse END')
[v_meas, i_meas] = k.voltageSweepSingleSMU(smu=k.smua, smu_sweeplist=[20], t_int=0.001, delay=0.1, pulsed=True)
print('measure: reverse END')

errs_end = k.readErrorQueue()  # gets all entries from error queue
print('read errors: OK')

#k.smua.nvbuffer1.clear()  # clears nvbuffer1 of SMUA
#print('clear buffer: OK')

k.smua.source.output = k.smua.OUTPUT_OFF   # turn off SMUA
print('output off: OK')

k.disconnect()
print('disconnect: OK')

#%% Plotting
plt.plot(v_meas, i_meas)
plt.plot(v_meas, i_meas, 'ro')
plt.ylabel('I [A]')
plt.xlabel('V [V]')
plt.xlim(-5, 40)
plt.ylim(-0.2, 0.2)
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions