Is it possible to integrate readings for temperataure and output voltage using the same dmm with two channels in order to see an output graph of temperature and voltage output ?
Yes, that is possible. You will need to some extra setup though. I pasted some code from a python class I wrote specifically for collecting temperature and voltage at the same time (Seebeck measurements). I'm sorry for the poor formatting. Please paste the code into your IDE or notepad++ so it doesn't look so awful. If you want to run this code, you will have to remove the "self" in front of everything. If you were able to follow along with the video, you'll be able to edit the below code and get it working. You can see from the commented code that I'm setting channels 111 to 120 along with 211 and 212 to measure voltage. Channels 101 through 110 along with 201 and 202 are set to measure temperature. def continuousScanSetup(self): self.instrument.write("*RST") # Reset to defaults for this time.sleep(0.05) self.instrument.write(':SYSTem:BEEPer:STATe OFF') # Turn off the beeper. This has to be done again here because of *RST time.sleep(0.05) self.instrument.write(":TRACe:CLEar") # Clear the buffer time.sleep(0.05) #self.instrument.write(":FORMat:ELEMents CHANnel, READing, UNITs, RNUMber, TSTamp") # Format the output. These are not in order unfortunately because Keithley is setup that way. self.instrument.write(":FORMat:ELEMents CHANnel, READing, UNITs") # Format the output to include channel, reading, and units time.sleep(0.05) self.instrument.write(":INITiate:CONTinuous OFF") # Turn off continuous initiation time.sleep(0.05) self.instrument.write(":TRIGger:SOURce IMMediate") # Start scanning immediately after triggering occurs. No delays. time.sleep(0.05) self.instrument.write(":TRIGger:COUNt 1") # This is the number of times that triggering will occur. time.sleep(0.05) self.instrument.write(":SAMPle:COUNt 110000") # time.sleep(0.05) self.instrument.write(":FUNCtion 'VOLT', (@111:120,211,212)") # Set channels to measure voltage. time.sleep(0.05) self.instrument.write("VOLTage:NPLC 1, (@111:120,211,212)") time.sleep(0.05) self.instrument.write(":FUNCtion 'TEMP', (@101:110,201,202)") # Set channels to measure temperature. time.sleep(0.05) self.instrument.write("TEMPerature:NPLC 1, (@101:110,201,202)") time.sleep(0.05) self.instrument.write(":ROUTe:SCAN (@101:120,201,202,211,212)") # Set channels to be scanned. time.sleep(0.05) self.instrument.write(":ROUTe:SCAN:TSO IMM") # Scan source immediately? time.sleep(0.05) self.instrument.write(":ROUTe:SCAN:LSEL INT") time.sleep(0.05) return "Scan setup complete" Here are the other functions I used with the above function: def initiateContinuousScan(self): self.instrument.write(":INITiate:Immediate") # Start scanning immediately. return 'scan initiated' def readBuffer(self): data = self.instrument.query("TRACe:DATA?") return data
@@jesseadamczyk1745 Hi Jesse, thank you for your tutorial and your code. I am, unfortunately, a beginner in this and I have problems reading multiple channels. I want to read the VDC of several channels continuously. However, if I do instrument.write(":ROUTe:MULTiple:CLOSe (@101:102)"), it never is able to scan both channels seperately. DO you have any idea how I can fix that and how the output will be? Do I need to do a "for" with the string and seperate the two channels as output. The handbook is not that clear how the output is given for several channels.
Hi jesse I am using 2750 Dmm for 2 wire resistance measurement. can u please share detailed video of how to get the readings on excelinx - 1a software using gpib connection
I will paste the code below. It is organized by file. There are 3 files, find_device.py, one_shot.py, and keithley_plotter.py. I apologize, this is the easiest way for me to get the code to you. find_device.py file import pyvisa print(pyvisa.ResourceManager().list_resources()) one_shot.py file import pyvisa multimeter = pyvisa.ResourceManager().open_resource('GPIB0::1::INSTR') # Connect to the keithley and set it to a variable named multimeter. #multimeter.write(":ROUTe:CLOSe (@101)") # Set the keithley to measure channel 1 of card 1 multimeter.write(":SENSe:FUNCtion 'TEMPerature'") # Set the keithley to measure temperature #print(multimeter.query(':SENSe:DATA:FRESh?')) # Collect the most recently measured data multimeter.write(":ROUTe:OPEN:ALL") # Open all card channels and thereby set the keithley to measure the front panel inputs. print(multimeter.query(':SENSe:DATA:FRESh?')) # Collect the most recently measured data keithley_plotter.py file import pyvisa import time import matplotlib.pyplot as plt # Initialize the keithley and create some useful variables multimeter = pyvisa.ResourceManager().open_resource('GPIB0::1::INSTR')# Connect to the keithley and set it to a variable named multimeter. multimeter.write(":ROUTe:CLOSe (@101)") # Set the keithley to measure channel 1 of card 1 multimeter.write(":SENSe:FUNCtion 'TEMPerature'") # Set the keithley to measure temperature. timeList = [] # Create an empty list to store time values in. temperatureList = [] # Create an empty list to store temperature values in. startTime = time.time() # Create a variable that holds the starting timestamp. # Setup the plot plt.figure(figsize=(10,10)) # Initialize a matplotlib figure plt.xlabel('Elapsed Time (s)', fontsize=24) # Create a label for the x axis and set the font size to 24pt plt.xticks(fontsize=18) # Set the font size of the x tick numbers to 18pt plt.ylabel('Temperature ($^\circ$C)', fontsize=24) # Create a label for the y axis and set the font size to 24pt plt.yticks(fontsize=18) # Set the font size of the y tick numbers to 18pt # Create a while loop that continuously measures and plots data from the keithley forever. while True: temperatureReading = float(multimeter.query(':SENSe:DATA:FRESh?').split(',')[0][:-2]) # Read and process data from the keithley. temperatureList.append(temperatureReading) # Append processed data to the temperature list timeList.append(float(time.time() - startTime)) # Append time values to the time list time.sleep(0.5) # Interval to wait between collecting data points. plt.plot(timeList, temperatureList, color='blue', linewidth=10) # Plot the collected data with time on the x axis and temperature on the y axis. plt.pause(0.01) # This command is required for live plotting. This allows the code to keep running while the plot is shown.
Hello! Thanks for this tutorial. Why do you need to set up the GPIB address to 01? Is this like a default value that PyVISA reads? I tried to read other channels without success, for some reason it can only read measurements from channel 1.
Hello, I am trying to communicate the 2701 to the RS-232 but I can not communicate the computer with the system. Do I need to configure it manually before?
Keithley/Tektronix has examples of controlling RS232 instruments via PyVisa. You should be able to find something in the examples for the DAQ6510, which is the successor to the 2700 and 2701.
@@omunoz meanwhile I tried it myself and it is working. GPIB is not a protocol. It is a hardware interface. The protocol is called SCPI. You can replace the interface easily with Ethernet, serial or whatever the device supports
Hi Jesse, thanks for the hard work. I applied your method when I tried to get data from Keithley 2182A, which looks very similar to your Keithley 2700. But I always get an "Error 113" on the front panel of Keithley 2182A. I'm sure the GPIB address is correct. Do you have any suggestions for this problem? Thank you so much.
For Error 113, it says "Undefined Header". I am not quite sure what this means. 2182A is a little bit different for some reason. Try this code below but change the GPIB address to whatever is on your 2182A. If this does not work, send me a DM and I'll send you a python class I wrote for the 2182a. You'll be able to figure it out from there. import time import visa # Setup the instrument instrument = visa.ResourceManager().open_resource('GPIB ADDRESS GOES HERE') time.sleep(0.05) instrument.timeout = 30000 time.sleep(0.05) # Setup voltage measurement instrument.write(':SENSe:CHANnel 1') instrument.write(':SENSe:FUNCtion "VOLTage:DC"') instrument.write(':SENSe:VOLTage:DC:RANGe:AUTO ON') instrument.write(':SENSe:VOLTage:DC:NPLC 1') instrument.write('TRIGger:COUNt 1') # Take the voltage measurement voltage = self.instrument.query(':SENSe:DATA:FRESh?')
I have never done this sort of measurement before, so I will only be so much help. If you can get python to read a frequency from the Keithley 2700, then you should be able to append the frequency value to a list of frequency values. Then using matplotlib, you would need to plot the frequency values on the x-axis and your other values on the y-axis. It would be something like: plt.plot(frequencyList, otherList)
I am using Keithley_2750_DMM to measure the 4 wire resistance with 6 channels ,with 6 sample count when i am trying to read the values ,but it is showing errors did you wrote code in python to measure the 4 wire resistance ? how can I contact you ?
HI Jesse, thank you for your video :) I have the connector KUSB 488B which came with the sourcemeter. I have installed the driver of this connector and followed you advices, but I had this error : "VI_ERROR_LIBRARY_NFOUND (-1073807202): A code library required by VISA could not be located or loaded." If you have any suggestion :/
I have not used this exact model of connector before. This seems like a Python issue, but here are a few things I would try: 1) If there are lights on the connector, check to make sure that they are the correct colors (i.e. connected vs fail etc) 2) Restart your computer. Sometimes the driver installation/USB connections magically get fixed after you do this. 3) Make sure PyVisa is installed correctly with "pyvisa-info" in the command prompt/terminal. 4) Try another GPIB-USB connector if you have one lying around. I have had these connectors die randomly once in a while. 5) Try installing pyvisa-py (pip install pyvisa-py) and use that instead of pyvisa. Sometimes this works but I'm not quite sure why. Best of luck!
@@jesseadamczyk1745 Thank you for your awesome support !!! :) In the meantime, I have changed connector with a 9 pin to USB and it worked ! But I will definitely try again the first connector with your guidance ! Thank you Jesse
Yes, this should work almost the same. You may have to play with the channels commands as I don't think the 2001 has the same style of card to install in the back.
@@jesseadamczyk1745 Thank you so much for your reply dear Jesse. I have no idea about it's input channels card, but I want to record from its panel inputs only.
@@jesseadamczyk1745 Dear Jesse, I have Keithley 2001. I want to set up a Data logging system using python and keysight gpib adapter. How code should be written in python in order to acquire data at specified intervals ? I don't want plot I need only saved readings.
I used the Keysight Instrument Control Bundle here: www.keysight.com/us/en/lib/software-detail/computer-software/keysight-instrument-control-bundle-download-1184883.html
The Keithley 2400 Sourcemeter uses some different SCPI commands. The overall python code structure will be the same but the commands you send over pyvisa will likely be a bit different. Take a look at the manual for the Keithley 2400 and look for the "one shot" measurement examples.
Hi Jesse, awesome video! This is really helpful. I am trying to do something very similar with the same Keithley model and a 7700 20 channel card but I got stuck and have a few questions. Where in the code is the type of thermocouple (K, T, J, etc. ) inputted? Is there a way to set the scan rate? I am trying to scan seven thermocouples. Is that fairly simple to implement? For the plotting, for temperature scans which are long (>2 hrs) I have been trying to figure out a way to have an additional plot that just shows the temperature measurements over the last 2-5 minutes in case there are temperature changes which may be difficult to see in a longer scan. I have looked into seeing if this is possible in Labview but haven't found much. I was wondering if you have any suggestions on how to implement this. I would be very interested to hear your thoughts. Would it be possible to reach out to you over email if you think that would be easier?
Hi Joseph, For the thermocouple type, I have never set this via the code. I have only ever set this by the front panel controls of the Keithley. Page 3-50, table 3-7 of the Keithley 2700 manual shows the commands you would use to change the different thermocouple types. I am working on a new video that will cover scanning multiple thermocouples and sources at once. Here is a python script that will help you with your long/short plotting. I'll comment this up for the new video soon, but right now you can see how it works. Let me know if it does not work. import matplotlib.pyplot as plt import time import numpy as np fig, (ax1, ax2) = plt.subplots(1,2, figsize=(8,4)) ax1.set_xlabel('Total elapsed time (s)') time_list = [] sin_list = [] start_time = time.time() while True: current_time = time.time() - start_time time_list.append(current_time) sin_list.append(np.sin(current_time)) ax1.plot(time_list, sin_list, color='blue') if len(time_list) >= 10: plt.cla() ax2.plot(time_list[-10:], sin_list[-10:], color='red') ax2.set_xlabel('Last 10 measurements') if len(time_list) < 10: ax2.plot(time_list, sin_list, color='red') ax2.set_xlabel('Last 10 measurements') plt.pause(0.1) if time_list[-1] >=20: break
@@jesseadamczyk1745 Hi Jesse, Thank you! I really appreciate you taking the time to respond in detail. This information is very helpful. I am playing around with the thermocouple type. The one issue I see is I am having trouble figuring out if I can set different channels to different thermocouple types. What do you mean by setting the specific thermocouple type for the channels on the front panel? Thank you for including the manual. That would be awesome! I really look forward to seeing your new video on this. Do you know if it's possible to set the scan rate? If the default is the fastest possible then that is fine. Thank you for sharing your python script, I really appreciate you doing that. I am going to try it today and I will make sure to let you know if it works. Thank you for all of your help Jesse!
Could you please explain how could we modify the python code in case we acquire data from 4 probes instead of 1, thanks in advance
if I wanted to display the Keithley instrument screen on a large monitor, is there a way to do that with the USB port on instrument ? Thanks
I would really appreciate if you could embed that plot into tkinter...
Nice! Do you have any tutorials on the Keithley 2230 power supply? Or something close.
Would it be possible to use the same idea for the 3458A multimeter? Could you make a tutorial about it? Thanks, keep up the videos.
Is it possible to integrate readings for temperataure and output voltage using the same dmm with two channels in order to see an output graph of temperature and voltage output ?
Yes, that is possible. You will need to some extra setup though.
I pasted some code from a python class I wrote specifically for collecting temperature and voltage at the same time (Seebeck measurements). I'm sorry for the poor formatting. Please paste the code into your IDE or notepad++ so it doesn't look so awful. If you want to run this code, you will have to remove the "self" in front of everything. If you were able to follow along with the video, you'll be able to edit the below code and get it working.
You can see from the commented code that I'm setting channels 111 to 120 along with 211 and 212 to measure voltage. Channels 101 through 110 along with 201 and 202 are set to measure temperature.
def continuousScanSetup(self):
self.instrument.write("*RST") # Reset to defaults for this
time.sleep(0.05)
self.instrument.write(':SYSTem:BEEPer:STATe OFF') # Turn off the beeper. This has to be done again here because of *RST
time.sleep(0.05)
self.instrument.write(":TRACe:CLEar") # Clear the buffer
time.sleep(0.05)
#self.instrument.write(":FORMat:ELEMents CHANnel, READing, UNITs, RNUMber, TSTamp") # Format the output. These are not in order unfortunately because Keithley is setup that way.
self.instrument.write(":FORMat:ELEMents CHANnel, READing, UNITs") # Format the output to include channel, reading, and units
time.sleep(0.05)
self.instrument.write(":INITiate:CONTinuous OFF") # Turn off continuous initiation
time.sleep(0.05)
self.instrument.write(":TRIGger:SOURce IMMediate") # Start scanning immediately after triggering occurs. No delays.
time.sleep(0.05)
self.instrument.write(":TRIGger:COUNt 1") # This is the number of times that triggering will occur.
time.sleep(0.05)
self.instrument.write(":SAMPle:COUNt 110000") #
time.sleep(0.05)
self.instrument.write(":FUNCtion 'VOLT', (@111:120,211,212)") # Set channels to measure voltage.
time.sleep(0.05)
self.instrument.write("VOLTage:NPLC 1, (@111:120,211,212)")
time.sleep(0.05)
self.instrument.write(":FUNCtion 'TEMP', (@101:110,201,202)") # Set channels to measure temperature.
time.sleep(0.05)
self.instrument.write("TEMPerature:NPLC 1, (@101:110,201,202)")
time.sleep(0.05)
self.instrument.write(":ROUTe:SCAN (@101:120,201,202,211,212)") # Set channels to be scanned.
time.sleep(0.05)
self.instrument.write(":ROUTe:SCAN:TSO IMM") # Scan source immediately?
time.sleep(0.05)
self.instrument.write(":ROUTe:SCAN:LSEL INT")
time.sleep(0.05)
return "Scan setup complete"
Here are the other functions I used with the above function:
def initiateContinuousScan(self):
self.instrument.write(":INITiate:Immediate") # Start scanning immediately.
return 'scan initiated'
def readBuffer(self):
data = self.instrument.query("TRACe:DATA?")
return data
@@jesseadamczyk1745 Hi Jesse, thank you for your tutorial and your code. I am, unfortunately, a beginner in this and I have problems reading multiple channels. I want to read the VDC of several channels continuously. However, if I do instrument.write(":ROUTe:MULTiple:CLOSe (@101:102)"), it never is able to scan both channels seperately. DO you have any idea how I can fix that and how the output will be? Do I need to do a "for" with the string and seperate the two channels as output. The handbook is not that clear how the output is given for several channels.
Can I calibrate the 2700 with the GPIB cable, or at least get rid of invalid cal warning?
You save my experiment!! Thank you so much!!
would k2000 be controlled the same way?
Yes, the same commands or very similar should work.
Hi jesse I am using 2750 Dmm for 2 wire resistance measurement. can u please share detailed video of how to get the readings on excelinx - 1a software using gpib connection
Awesome! well done man
Hi Jesse,
Can you able send me the tutorial code, I am unable to get the link to work on my computer.
Thank you very much
I will paste the code below. It is organized by file. There are 3 files, find_device.py, one_shot.py, and keithley_plotter.py.
I apologize, this is the easiest way for me to get the code to you.
find_device.py file
import pyvisa
print(pyvisa.ResourceManager().list_resources())
one_shot.py file
import pyvisa
multimeter = pyvisa.ResourceManager().open_resource('GPIB0::1::INSTR') # Connect to the keithley and set it to a variable named multimeter.
#multimeter.write(":ROUTe:CLOSe (@101)") # Set the keithley to measure channel 1 of card 1
multimeter.write(":SENSe:FUNCtion 'TEMPerature'") # Set the keithley to measure temperature
#print(multimeter.query(':SENSe:DATA:FRESh?')) # Collect the most recently measured data
multimeter.write(":ROUTe:OPEN:ALL") # Open all card channels and thereby set the keithley to measure the front panel inputs.
print(multimeter.query(':SENSe:DATA:FRESh?')) # Collect the most recently measured data
keithley_plotter.py file
import pyvisa
import time
import matplotlib.pyplot as plt
# Initialize the keithley and create some useful variables
multimeter = pyvisa.ResourceManager().open_resource('GPIB0::1::INSTR')# Connect to the keithley and set it to a variable named multimeter.
multimeter.write(":ROUTe:CLOSe (@101)") # Set the keithley to measure channel 1 of card 1
multimeter.write(":SENSe:FUNCtion 'TEMPerature'") # Set the keithley to measure temperature.
timeList = [] # Create an empty list to store time values in.
temperatureList = [] # Create an empty list to store temperature values in.
startTime = time.time() # Create a variable that holds the starting timestamp.
# Setup the plot
plt.figure(figsize=(10,10)) # Initialize a matplotlib figure
plt.xlabel('Elapsed Time (s)', fontsize=24) # Create a label for the x axis and set the font size to 24pt
plt.xticks(fontsize=18) # Set the font size of the x tick numbers to 18pt
plt.ylabel('Temperature ($^\circ$C)', fontsize=24) # Create a label for the y axis and set the font size to 24pt
plt.yticks(fontsize=18) # Set the font size of the y tick numbers to 18pt
# Create a while loop that continuously measures and plots data from the keithley forever.
while True:
temperatureReading = float(multimeter.query(':SENSe:DATA:FRESh?').split(',')[0][:-2]) # Read and process data from the keithley.
temperatureList.append(temperatureReading) # Append processed data to the temperature list
timeList.append(float(time.time() - startTime)) # Append time values to the time list
time.sleep(0.5) # Interval to wait between collecting data points.
plt.plot(timeList, temperatureList, color='blue', linewidth=10) # Plot the collected data with time on the x axis and temperature on the y axis.
plt.pause(0.01) # This command is required for live plotting. This allows the code to keep running while the plot is shown.
Hello! Thanks for this tutorial. Why do you need to set up the GPIB address to 01? Is this like a default value that PyVISA reads? I tried to read other channels without success, for some reason it can only read measurements from channel 1.
The GPIB address is set to 01 on the multimeter because it is also set to 1 in the python code address: "GPIB0::1::INSTR"
@@jesseadamczyk1745 Thanks for replying!
It's really helpful!!Thank you
Hello, I am trying to communicate the 2701 to the RS-232 but I can not communicate the computer with the system. Do I need to configure it manually before?
I unfortunately don't have experience with RS-232 communications with the Keithleys. Any chance you can get ahold of a GPIB-USB cable?
Keithley/Tektronix has examples of controlling RS232 instruments via PyVisa. You should be able to find something in the examples for the DAQ6510, which is the successor to the 2700 and 2701.
I have a 2701 connected over Ethernet. Does this work too?
No, the video is only for GPIB protocol
@@omunoz meanwhile I tried it myself and it is working. GPIB is not a protocol. It is a hardware interface. The protocol is called SCPI. You can replace the interface easily with Ethernet, serial or whatever the device supports
@@MarkusBurrer Are you using Ethernet cable instead of GPIB cable to the PC
@@NiteshKumar-ss4gg yes.
@@MarkusBurrer If i use USB to send the commands will it work?
Hi Jesse, thanks for the hard work. I applied your method when I tried to get data from Keithley 2182A, which looks very similar to your Keithley 2700. But I always get an "Error 113" on the front panel of Keithley 2182A. I'm sure the GPIB address is correct. Do you have any suggestions for this problem? Thank you so much.
For Error 113, it says "Undefined Header". I am not quite sure what this means. 2182A is a little bit different for some reason.
Try this code below but change the GPIB address to whatever is on your 2182A. If this does not work, send me a DM and I'll send you a python class I wrote for the 2182a. You'll be able to figure it out from there.
import time
import visa
# Setup the instrument
instrument = visa.ResourceManager().open_resource('GPIB ADDRESS GOES HERE')
time.sleep(0.05)
instrument.timeout = 30000
time.sleep(0.05)
# Setup voltage measurement
instrument.write(':SENSe:CHANnel 1')
instrument.write(':SENSe:FUNCtion "VOLTage:DC"')
instrument.write(':SENSe:VOLTage:DC:RANGe:AUTO ON')
instrument.write(':SENSe:VOLTage:DC:NPLC 1')
instrument.write('TRIGger:COUNt 1')
# Take the voltage measurement
voltage = self.instrument.query(':SENSe:DATA:FRESh?')
@@jesseadamczyk1745 Thank you so much! This fixed that error code.
Hi, what if we wanna display the frequency on the x axis ranging from 10 Hz to 10kHz for example, how do we do that ?
I have never done this sort of measurement before, so I will only be so much help. If you can get python to read a frequency from the Keithley 2700, then you should be able to append the frequency value to a list of frequency values. Then using matplotlib, you would need to plot the frequency values on the x-axis and your other values on the y-axis. It would be something like: plt.plot(frequencyList, otherList)
I am using Keithley_2750_DMM to measure the 4 wire resistance with 6 channels ,with 6 sample count
when i am trying to read the values ,but it is showing errors
did you wrote code in python to measure the 4 wire resistance ?
how can I contact you ?
Hi Ahmad, are you using a special card in the back of the 2750 DMM? Perhaps the 7709 matrix card?
Hi jesse, wich softfare do you use for programming?
I use notepad++ and then I made a hotkey to run the code in Python (Anaconda)
HI Jesse, thank you for your video :) I have the connector KUSB 488B which came with the sourcemeter. I have installed the driver of this connector and followed you advices, but I had this error : "VI_ERROR_LIBRARY_NFOUND (-1073807202): A code library required by VISA could not be located or loaded." If you have any suggestion :/
I have not used this exact model of connector before. This seems like a Python issue, but here are a few things I would try:
1) If there are lights on the connector, check to make sure that they are the correct colors (i.e. connected vs fail etc)
2) Restart your computer. Sometimes the driver installation/USB connections magically get fixed after you do this.
3) Make sure PyVisa is installed correctly with "pyvisa-info" in the command prompt/terminal.
4) Try another GPIB-USB connector if you have one lying around. I have had these connectors die randomly once in a while.
5) Try installing pyvisa-py (pip install pyvisa-py) and use that instead of pyvisa. Sometimes this works but I'm not quite sure why.
Best of luck!
@@jesseadamczyk1745 Thank you for your awesome support !!! :) In the meantime, I have changed connector with a 9 pin to USB and it worked ! But I will definitely try again the first connector with your guidance ! Thank you Jesse
Thank you for making this video.
I have to acquire continuous data from Keithley 2001 through gpib. Is it possible by using this idea..???
Yes, this should work almost the same. You may have to play with the channels commands as I don't think the 2001 has the same style of card to install in the back.
@@jesseadamczyk1745 Thank you so much for your reply dear Jesse. I have no idea about it's input channels card, but I want to record from its panel inputs only.
@@jesseadamczyk1745 Dear Jesse, I have Keithley 2001. I want to set up a Data logging system using python and keysight gpib adapter. How code should be written in python in order to acquire data at specified intervals ?
I don't want plot I need only saved readings.
Do you have code of in in python to program?
Please see the link in the description!
What driver are you using for 82357B?
I used the Keysight Instrument Control Bundle here:
www.keysight.com/us/en/lib/software-detail/computer-software/keysight-instrument-control-bundle-download-1184883.html
Hi Jesse, awesome work. Does the same apply with a SourceMeter vs a MultiMeter??
The Keithley 2400 Sourcemeter uses some different SCPI commands. The overall python code structure will be the same but the commands you send over pyvisa will likely be a bit different. Take a look at the manual for the Keithley 2400 and look for the "one shot" measurement examples.
@@jesseadamczyk1745 Thanks so much for the reply man.
Very informative
Hi Jesse, awesome video! This is really helpful. I am trying to do something very similar with the same Keithley model and a 7700 20 channel card but I got stuck and have a few questions.
Where in the code is the type of thermocouple (K, T, J, etc. ) inputted?
Is there a way to set the scan rate?
I am trying to scan seven thermocouples. Is that fairly simple to implement?
For the plotting, for temperature scans which are long (>2 hrs) I have been trying to figure out a way to have an additional plot that just shows the temperature measurements over the last 2-5 minutes in case there are temperature changes which may be difficult to see in a longer scan. I have looked into seeing if this is possible in Labview but haven't found much. I was wondering if you have any suggestions on how to implement this.
I would be very interested to hear your thoughts. Would it be possible to reach out to you over email if you think that would be easier?
Hi Joseph,
For the thermocouple type, I have never set this via the code. I have only ever set this by the front panel controls of the Keithley. Page 3-50, table 3-7 of the Keithley 2700 manual shows the commands you would use to change the different thermocouple types.
I am working on a new video that will cover scanning multiple thermocouples and sources at once.
Here is a python script that will help you with your long/short plotting. I'll comment this up for the new video soon, but right now you can see how it works. Let me know if it does not work.
import matplotlib.pyplot as plt
import time
import numpy as np
fig, (ax1, ax2) = plt.subplots(1,2, figsize=(8,4))
ax1.set_xlabel('Total elapsed time (s)')
time_list = []
sin_list = []
start_time = time.time()
while True:
current_time = time.time() - start_time
time_list.append(current_time)
sin_list.append(np.sin(current_time))
ax1.plot(time_list, sin_list, color='blue')
if len(time_list) >= 10:
plt.cla()
ax2.plot(time_list[-10:], sin_list[-10:], color='red')
ax2.set_xlabel('Last 10 measurements')
if len(time_list) < 10:
ax2.plot(time_list, sin_list, color='red')
ax2.set_xlabel('Last 10 measurements')
plt.pause(0.1)
if time_list[-1] >=20:
break
Link to Keithley 2700 Manual: download.tek.com/manual/2700-900-01K_Feb_2016.pdf
@@jesseadamczyk1745 Hi Jesse,
Thank you! I really appreciate you taking the time to respond in detail. This information is very helpful.
I am playing around with the thermocouple type. The one issue I see is I am having trouble figuring out if I can set different channels to different thermocouple types. What do you mean by setting the specific thermocouple type for the channels on the front panel? Thank you for including the manual.
That would be awesome! I really look forward to seeing your new video on this.
Do you know if it's possible to set the scan rate? If the default is the fastest possible then that is fine.
Thank you for sharing your python script, I really appreciate you doing that. I am going to try it today and I will make sure to let you know if it works.
Thank you for all of your help Jesse!
Hi Jesse, I just wanted to follow up. No worries if you are too busy!
Miller Jessica Moore Amy Perez Michelle
Wilson Helen Hall Betty Jones Karen