Keithley 2015 measurements with computer display? - Page 1
Forum section: electronics / testgear

author: slow_rider
author_rank: Regular Contributor
timestamp: October 03, 2015, 04:16:01 pm
content: I'm looking into buying a Keithley 2015. The main appeal of this DMM is THD and various other harmonic related measurements it can perform. One measurement in particular got my attention, the ability to show the amplitude of up to 64 harmonics! This is something useful for me, however I am wondering how the supplied display can make using such a function convenient? If I have to toggle back and forth it seems like a pain. Is there any simple way to display all the data on a PC? Or that would have to be written by yours truly in C or even worse using LabView (god I hate that program)?

author: TiN
author_rank: Super Contributor
timestamp: October 03, 2015, 04:53:16 pm
content: You can use Python for example. After you get interface to PC, there are many many different ways of communicating with instrument and getting data out.

author: slow_rider
author_rank: Regular Contributor
timestamp: October 03, 2015, 05:08:47 pm
content: Yes, but this still means that I need a custom solution for displaying the data on the PC. I'm not saying this is very difficult but it is time consuming. I hate LabView but it does save time.

author: TiN
author_rank: Super Contributor
timestamp: October 03, 2015, 05:58:23 pm
content: You can use Excel if it's not too much of data.

author: JSE009
author_rank: Contributor
timestamp: October 03, 2015, 06:48:19 pm
content: I have a 2015 for a couple of weeks now and received my 2nd one todayI played around with trying to communicate via RS232 by using a software program Putty and a USB/Serial adaptor. Until now I can not get the Keithley 2015 to responseI also would like to get the data into Excell but do not now how to start

author: Macbeth
author_rank: Super Contributor
timestamp: October 03, 2015, 07:24:02 pm
content: Plenty to be getting on with here...http://www.keithley.co.uk/products/data/datalogger/?path=2015/DownloadsI connect to mine using NI-VISA and have also used the Keithley IVI Driver which unlike many IVI drivers that only support C, it supports COM (so is easy to use in Excel or any other VBA application).There are also some LabVIEW downloads to do some of the fancy stuff with the THD analyzer. I haven't had a chance at using them yet - but it appears GPIB may be needed (no doubt a large volume of data is being transferred. Hmm... I finally have an excuse to get a GPIB adaptor!)LabVIEW costs a fortune, and I just can't make head nor tail of it, but you get a 30 day trial to play with and you may be able to reverse engineer the "code" into something you are more used to programming with.

author: Macbeth
author_rank: Super Contributor
timestamp: October 03, 2015, 07:27:54 pm
content: Quote from: JSE009 on October 03, 2015, 06:48:19 pmYou need to elaborate, have you set the 2015 to use RS232 instead of GPIB? Baud rates (I use 19,200 but 9,600 is a good default), flow control, etc? Also some Keithleys are a bit funny with the RTS/CTS pins on the RS232 - you may have to disable one of them or something (do a search). Also, you may be using a pass-through vs a null modem cable.

author: G0HZU
author_rank: Super Contributor
timestamp: October 03, 2015, 07:41:07 pm
content: I'm not a programmer by profession but I wrote my own Windows app for my little Win7 netbook a couple of years ago and it controls the Keithley 2015 remotely and gets the THD data from it in real time.The GUI runs fairly slow if you select all 64 harmonics but with 20 or less harmonics it runs fast even on my basic and slow netbook. I added a mouse/marker function to allow me to click on any harmonic to read its frequency and level etc and this is circled in blue.In the screenshot below it is looking at the spectral purity of one of my DSP based sig gens so the harmonic content is very low.I'm afraid I don't give away my programs (because I ALWAYS end up regretting it for various reasons) but maybe my GUI will give you a few starting ideas

author: JSE009
author_rank: Contributor
timestamp: October 03, 2015, 07:56:23 pm
content: Quote from: Macbeth on October 03, 2015, 07:27:54 pmI started with setting up the 2015:96008 bits1 stop bitFlow Control OFFAnd I used a straight through cable and the USB/RS232 convertor with a drive from Prolific (PL2303)When I start Putty and configure the Com-port I see the Keithley jumping into remote control but it looks like I do not receive a conformation from the meter back

author: Macbeth
author_rank: Super Contributor
timestamp: October 03, 2015, 09:34:25 pm
content: Hmm... I know I might be teaching Grandma to suck eggs, but have you got the port settings the same on both the PC and the Keithleys? If it isn't working on both of them then your RS232-USB adaptor must be duff, or the driver isn't working?I'm using a "CH340" on USB to RS232 cable on Windows 10.On the Keithley 2015, press SHIFT -> RATE (RS232) and set with the arrow keysRS 232: ONBAUD: 19.2KFLOW: NONETX TERM: CRand in putty:Connection -> SerialSerial line: COM2 (check your Control Panel / System / Device Manager / Ports for your adaptor)Speed 19200Data bits 8Stop bits 1Parity NoneFlow control NoneClick open...Type in*IDN? (cr)As soon as you type your first character after clicking open in putty the Keithley should highlight "REM"You should get a string back likeKEITHLEY INSTRUMENTS INC.,MODEL 2015,0912345,B17 /A02Once you have that sorted move on to installing NI-VISA, etc...

author: Magnum
author_rank: Regular Contributor
timestamp: October 03, 2015, 09:38:20 pm
content: Quote from: Macbeth on October 03, 2015, 07:24:02 pmThere is a home edition available now for around US$ 50.https://digilentinc.com/Products/Detail.cfm?NavPath=2,66,1457&Prod=LABVIEW-HE

author: JSE009
author_rank: Contributor
timestamp: October 03, 2015, 09:57:42 pm
content: Quote from: Macbeth on October 03, 2015, 09:34:25 pmThanxs.I just checked it again and I receive an answer from the 2015.Only strange thing is that in the DOS-box of Putty I can see the green cursor, but when I type in text I can not see what I haved typed, the text is notdisplayedBut when I press enter I receive an answer, strange or what

author: Macbeth
author_rank: Super Contributor
timestamp: October 03, 2015, 10:04:21 pm
content: Thats normal. If you want to see what you type then turn on local echo in putty, basically the meter is not echoing back what you type as there is no need to (its normally used under program control, putty is just here for testing debugging)

author: casinada
author_rank: Frequent Contributor
timestamp: October 03, 2015, 10:04:30 pm
content: turn the echo on in Putty

author: JSE009
author_rank: Contributor
timestamp: October 04, 2015, 06:57:43 pm
content: Quote from: casinada on October 03, 2015, 10:04:30 pmStupid me.After a good night restI found it.Thanks

author: Performa01
author_rank: Super Contributor
timestamp: October 05, 2015, 12:03:57 pm
content: As no one has mentioned it so far: AFAIK only the Keithley 2015P can perform spectrum analysis. The 2015 (without P) only does THD measurements.

author: 3roomlab
author_rank: Frequent Contributor
timestamp: October 05, 2015, 12:40:03 pm
content: Quote from: JSE009 on October 03, 2015, 06:48:19 pmi think i have just overcome most of the problems with my unit. (short of cleaning the innards)i use WinXP SP 3 --> Python 2.7 (pyserial 2.7) --> FTDI USB RS232 --> keithley 2015 THDi think many ppl use PROLIFIC RS232, and this was the cause of many problems. but after opening up the FTDI, it is not much of a tiptop gear either in terms of construction, its all made in china . the expensive bit is the genuine chipare you still having problems?i OTOH could not get NI VISA to work in pythonsee here for python code, *xls logging (post #19)https://www.eevblog.com/forum/projects/is-this-a-real-ns-lm399-%28from-polida-ebay%29/msg769388/#msg769388

author: 3roomlab
author_rank: Frequent Contributor
timestamp: October 05, 2015, 12:52:33 pm
content: Quote from: G0HZU on October 03, 2015, 07:41:07 pmdid you have to deal with memory leak? in python 2.7, it seems in very long logs, there is something leaky :/

author: Macbeth
author_rank: Super Contributor
timestamp: October 05, 2015, 05:10:53 pm
content: You know there is always PyVISAhttps://github.com/hgrecco/pyvisa

author: eas
author_rank: Frequent Contributor
timestamp: October 05, 2015, 08:05:15 pm
content: I tried using PyVISA before giving up on RS-232 and getting a VXI-11/GPIB gateway.PyVISA worked, but I didn't feel like I gained much, if anything, from the added complexity of the VISA layer since both RS-232 and VXI-11 were available using basic OS level functionality (serial drivers and/or TCP/IP sockets) rather than requiring a hardware specific driver like a GPIB card or USB adapter.One issue I ran into with the Keithley VISA drivers was that the really only worked at ~9600 baud or so, while raw serial access seemed reliable at much higher rates. Also, as has been mentioned, for many hardware/firmware version combinations, the Keithley 2000 has a problem that causes serial communication to die sporadically but frequently unless the RTS pin is disconnected somehow. Given that the K2015 seems to share the same motherboard as the K2000, I'd expect this to be an issue with the K2015 as well.I didn't see any obvious indication of general python memory leaks when I was running my logging script, but I'm also using a different OS and relying on different libraries. Looking at the code you published in your other topic, it looks like you don't save things to disk until you've filled a worksheet, which means it sits in memory until then. Furthermore, you don't explicitly close the worksheet/workbook when you are done with them. I'd think they'd get garbage collected at some point, but perhaps not.

author: eas
author_rank: Frequent Contributor
timestamp: October 06, 2015, 03:32:42 am
content: I took a look at the docs and source. It doesn't look like there is a close method for the workbook object. When you call save with a filename it opens a file, writes the data out, and closes it. So, I'm out of ideas.

author: ivaylo
author_rank: Frequent Contributor
timestamp: October 07, 2015, 06:24:50 am
content: In case you can't talk to the 2015 via RS232 but GPIB works -https://www.eevblog.com/forum/testgear/reading-from-keithley-2015-via-serial-rs232/msg477519/#msg477519

author: eas
author_rank: Frequent Contributor
timestamp: October 07, 2015, 06:47:52 am
content: Quote from: 3roomlab on October 06, 2015, 09:14:18 amFor storage, I've been using SQLlte.

author: CZYRF
author_rank: Newbie
timestamp: January 18, 2018, 05:04:44 pm
content: Quote from: G0HZU on October 03, 2015, 07:41:07 pmHi Jeremy,Is your Windows application for the Keithley 2015 THD available anywhere?Can you share it with me? My email: czyrf@icloud.com

author: emartine
author_rank: Contributor
timestamp: April 14, 2022, 02:12:30 pm
content: I will purchase this meter and upload an app to github, so anyone can use it..Im already working on it.This is my github page if you wanna help:https://github.com/andmarti1424

author: emartine
author_rank: Contributor
timestamp: July 25, 2022, 10:46:34 pm
content: I have been working on my app lately. In case anyone is interested, you can find it here:https://github.com/andmarti1424/free_keithleyAny help is always welcome!Thanks.

author: jeffjmr
author_rank: Regular Contributor
timestamp: July 26, 2022, 03:33:00 am
content: I'm not even remotely qualified to help from a programming standpoint but I could make good use of such a program, so I will make a monetary contribution.Jeff