Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence of measurements fail on KXCI Keithley 4200

I am running a series of IV measurements using KXCI and python through a GPIB on a keythley 42000.

1. 2P current voltage

2. 4P current voltage

3. Voltmeter sequence

 

When I run them separately opening and closing the KXCI interface for each separate measurement there is no issue. However, If I try to run them in series, one after the other, the KXCI hangs up with the SRQ indicator on and a timeout error on the computer side. I am trying to run a *RST in between each measurement but I get a GPIB command error. I have tried a coupe of things but have had no success in making this work. 

 

This is what my script looks like :

 

####  2P

 

 

my4200.write("BC") # Clears all readings from the buffer
my4200.write("IT2") # Sets the integration time
my4200.write("DR1") # Enables or disables service request for data ready when communications is set to GPIB 0 is NO and 1 is YES.
my4200.write("ID")

my4200.write("DE") # Selects the channel definition page
my4200.write(f"CH{i}, 'V1', 'I1', 2, 1") # Sets up SMU1 (CH1) to V source, constant function
my4200.write(f"CH{i2}, 'V2', 'I2', 3, 3") # Sets up SMU2 (CH2) to V source, constant common


my4200.write("SS") # Selects the source setup page
my4200.write(f"IR1, {min_current}, {max_current}, {step}, {compliance}") # Configures SMU1 to start sweep at -1V, stop at 1V, and step 0.1V with a compliance of 100mA
my4200.write("HT 0") # Sets a hold time of 0s
my4200.write("DT 0") # Sets the time to wait between when the output voltage is set and when measurement is made in the sweep to 1ms
my4200.write("EC 0") # exits if compliance is reached

my4200.write("SM") # Selects the measurement setup page
my4200.write("DM1") # Prepares 4200A-SCS to receive graphics commands
my4200.write(f"XN 'I1', 1, {min_current}, {max_current}") # Configures X-axis of graph to plot V1
my4200.write(f"YA 'V1', 1, -1, 1") # Configures Y-axis of graph to plot I1
my4200.write("MD") # Selects the measurement control page
my4200.write("BC") # Clears all readings from the buffer
my4200.write("ME1") # Runs a single trigger test and stores readings in cleared buffer 1
my4200._instrument_object.wait_for_srq() # waits until data is ready by waiting for serial request coming from the 4200A-SCS
Current_Data = my4200.query("DO 'I1'") # must go before requesting data
Volt_Data = my4200.query("DO 'V1'")

 

 

### Voltmeter

 

pairs = [(2, 1), (1, 2), (3, 1), (1, 3), (2, 4), (4, 2), (3, 4), (4, 3)]

for i, i2 in pairs:
my4200.write("BC") # Clears all readings from the buffer
my4200.write("IT3") # Sets the integration time
my4200.write("DR1") # Enables service request for data ready
my4200.write("ID")

my4200.write("DE") # Selects the channel definition page
my4200.write(f"CH{i}, 'VP1', 'I3', 2, 3") # Set channel for voltage measurement
my4200.write(f"CH{i2}, 'V2', 'I2', 3, 3") # Set up SMU channel for V source

my4200.write("SS") # Selects the source setup page
my4200.write(f"IC{i}, 0, 20") # Set current level, compliance of 20V
my4200.write("DT 0") # Set time delay to 1ms
my4200.write("EC 1") # Exit if compliance is reached

my4200.write("SM") # Selects the measurement setup page
my4200.write("NR 20") # Set number of measurements
my4200.write("IN 0.5") # Time interval between measurements
my4200.write("DM1") # Prepare for graphics commands
my4200.write("DM1") # Prepare for graphics commands
my4200.write(f"XT 0, 10") # Configure graph axis
my4200.write(f"YA 'VP1', 1, -0.001, 0.001") # Configure graph axis
my4200.write("MD") # Selects the measurement control page
my4200.write("BC") # Clears all readings from the buffer
my4200.write("ME1") # Run a single trigger test
 
 
Does anybody has an idea on how to fix this ?

 

 

0 Kudos
Message 1 of 1
(69 Views)