Author Topic: Keithley 2015 measurements with computer display?  (Read 12619 times)

0 Members and 1 Guest are viewing this topic.

Offline slow_riderTopic starter

  • Regular Contributor
  • *
  • Posts: 80
Keithley 2015 measurements with computer display?
« on: October 03, 2015, 04:16:01 pm »
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)?
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Keithley 2015 measurements with computer display?
« Reply #1 on: October 03, 2015, 04:53:16 pm »
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.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline slow_riderTopic starter

  • Regular Contributor
  • *
  • Posts: 80
Re: Keithley 2015 measurements with computer display?
« Reply #2 on: October 03, 2015, 05:08:47 pm »
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.
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Keithley 2015 measurements with computer display?
« Reply #3 on: October 03, 2015, 05:58:23 pm »
You can use Excel if it's not too much of data :).
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline JSE009

  • Contributor
  • Posts: 15
  • Country: nl
Re: Keithley 2015 measurements with computer display?
« Reply #4 on: October 03, 2015, 06:48:19 pm »
I have a 2015 for a couple of weeks now and received my 2nd one today  :-+
I 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 response  :o
I also would like to get the data into Excell but do not now how to start  :-//



 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #5 on: October 03, 2015, 07:24:02 pm »
Plenty to be getting on with here...

http://www.keithley.co.uk/products/data/datalogger/?path=2015/Downloads

I 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.  :-+
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #6 on: October 03, 2015, 07:27:54 pm »
I have a 2015 for a couple of weeks now and received my 2nd one today  :-+
I 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 response  :o
I also would like to get the data into Excell but do not now how to start  :-//


You 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.
 

Offline G0HZU

  • Super Contributor
  • ***
  • Posts: 3015
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #7 on: October 03, 2015, 07:41:07 pm »
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 :)

 

Offline JSE009

  • Contributor
  • Posts: 15
  • Country: nl
Re: Keithley 2015 measurements with computer display?
« Reply #8 on: October 03, 2015, 07:56:23 pm »
I have a 2015 for a couple of weeks now and received my 2nd one today  :-+
I 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 response  :o
I also would like to get the data into Excell but do not now how to start  :-//


You 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.


I started with setting up the 2015:
9600
8 bits
1 stop bit
Flow Control OFF
And 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  :-//

 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #9 on: October 03, 2015, 09:34:25 pm »
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 keys

RS 232: ON
BAUD: 19.2K
FLOW: NONE
TX TERM: CR

and in putty:

Connection -> Serial
Serial line: COM2 (check your Control Panel / System / Device Manager / Ports for your adaptor)
Speed 19200
Data bits 8
Stop bits 1
Parity None
Flow control None

Click 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 like

KEITHLEY INSTRUMENTS INC.,MODEL 2015,0912345,B17  /A02

Once you have that sorted move on to installing NI-VISA, etc...
 

Offline Magnum

  • Regular Contributor
  • *
  • Posts: 195
  • Country: de
Re: Keithley 2015 measurements with computer display?
« Reply #10 on: October 03, 2015, 09:38:20 pm »
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.  :-+

There is a home edition available now for around US$ 50.

https://digilentinc.com/Products/Detail.cfm?NavPath=2,66,1457&Prod=LABVIEW-HE
 

Offline JSE009

  • Contributor
  • Posts: 15
  • Country: nl
Re: Keithley 2015 measurements with computer display?
« Reply #11 on: October 03, 2015, 09:57:42 pm »
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 keys

RS 232: ON
BAUD: 19.2K
FLOW: NONE
TX TERM: CR

and in putty:

Connection -> Serial
Serial line: COM2 (check your Control Panel / System / Device Manager / Ports for your adaptor)
Speed 19200
Data bits 8
Stop bits 1
Parity None
Flow control None

Click 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 like

KEITHLEY INSTRUMENTS INC.,MODEL 2015,0912345,B17  /A02

Once you have that sorted move on to installing NI-VISA, etc...

Thanxs.
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 not
displayed  :-//
But when I press enter I receive an answer, strange or what  :-/O
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #12 on: October 03, 2015, 10:04:21 pm »
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)
 

Offline casinada

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: us
Re: Keithley 2015 measurements with computer display?
« Reply #13 on: October 03, 2015, 10:04:30 pm »
turn the echo on in Putty
 

Offline JSE009

  • Contributor
  • Posts: 15
  • Country: nl
Re: Keithley 2015 measurements with computer display?
« Reply #14 on: October 04, 2015, 06:57:43 pm »
turn the echo on in Putty

 :palm: :palm: :palm: :palm: Stupid me.
After a good night rest  :=\ I found it.

Thanks  :-+
 

Offline Performa01

  • Super Contributor
  • ***
  • Posts: 1631
  • Country: at
Re: Keithley 2015 measurements with computer display?
« Reply #15 on: October 05, 2015, 12:03:57 pm »
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.
 

Offline 3roomlab

  • Frequent Contributor
  • **
  • Posts: 825
  • Country: 00
Re: Keithley 2015 measurements with computer display?
« Reply #16 on: October 05, 2015, 12:40:03 pm »
I have a 2015 for a couple of weeks now and received my 2nd one today  :-+
I 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 response  :o
I also would like to get the data into Excell but do not now how to start  :-//



i 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 THD
i 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 chip
are you still having problems?
i OTOH could not get NI VISA to work in python :( 

see 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
« Last Edit: October 05, 2015, 03:07:51 pm by 3roomlab »
 

Offline 3roomlab

  • Frequent Contributor
  • **
  • Posts: 825
  • Country: 00
Re: Keithley 2015 measurements with computer display?
« Reply #17 on: October 05, 2015, 12:52:33 pm »
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 :)

did you have to deal with memory leak? in python 2.7, it seems in very long logs, there is something leaky :/
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Keithley 2015 measurements with computer display?
« Reply #18 on: October 05, 2015, 05:10:53 pm »
You know there is always PyVISA https://github.com/hgrecco/pyvisa  :-+
 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: Keithley 2015 measurements with computer display?
« Reply #19 on: October 05, 2015, 08:05:15 pm »
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.
 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: Keithley 2015 measurements with computer display?
« Reply #20 on: October 06, 2015, 03:32:42 am »
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.
 

Offline ivaylo

  • Frequent Contributor
  • **
  • Posts: 661
  • Country: us
Re: Keithley 2015 measurements with computer display?
« Reply #21 on: October 07, 2015, 06:24:50 am »
 

Offline eas

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: us
    • Tech Obsessed
Re: Keithley 2015 measurements with computer display?
« Reply #22 on: October 07, 2015, 06:47:52 am »
yea there isnt a "close workbook". even for the ODS, XLSX variants, even simpleODS. i didnt read into the library itself, but they all look like "buddies of each other". anybody have any idea what other data/array saving architecture is worth a try? or maybe, even a diff programming language?  >:D
For storage, I've been using SQLlte.
« Last Edit: October 07, 2015, 06:50:13 am by eas »
 

Offline CZYRF

  • Newbie
  • Posts: 1
  • Country: cn
Re: Keithley 2015 measurements with computer display?
« Reply #23 on: January 18, 2018, 05:04:44 pm »
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 :)
Hi Jeremy,

Is your Windows application for the Keithley 2015 THD available anywhere?
Can you share it with me? My email: czyrf@icloud.com
 

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 measurements with computer display?
« Reply #24 on: April 14, 2022, 02:12:30 pm »
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
 
The following users thanked this post: jeffjmr


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf