time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

python or matlab/octave for Keysight instruments?

J
jimlux
Sat, Jul 2, 2016 4:09 PM

I'm looking for a simple portable software library to do some
control/data acquisition from either python or octave for
Agilent/Keysight gear, specifically over the USB or Ethernet interfaces.

the "Keysight IO Libraries Suite CD " is, I think, Windows only

I'm fine with writing the SCPI commands and parsing the output, I'm just
looking for the "glue" between "send_message_to_instrument" or
"read_message_from_instrument" and the instrument itself.

Sort of like the python interfaces to the Prologix Ethernet/GPIB
controllers.

I've got the whole numpy/scipy infrastructure already installed, if
that's relevant.

Is PyVISA reasonably easy to work with, or is it one of those "once
you've spent 6 weeks recompiling the kernel and finding all the
libraries from 4 different sources, it works great"..

There's also the Agilent Command Expert which seems to provide a matlab
and python interface, but, looks like "windows only" and I'm in a cross
platform environment (OS X, Ubuntu, Windows) (Hmm, KCE isn't as nice an
acronym as ACE)

I'm looking for a *simple* *portable* software library to do some control/data acquisition from either python or octave for Agilent/Keysight gear, specifically over the USB or Ethernet interfaces. the "Keysight IO Libraries Suite CD " is, I think, Windows only I'm fine with writing the SCPI commands and parsing the output, I'm just looking for the "glue" between "send_message_to_instrument" or "read_message_from_instrument" and the instrument itself. Sort of like the python interfaces to the Prologix Ethernet/GPIB controllers. I've got the whole numpy/scipy infrastructure already installed, if that's relevant. Is PyVISA reasonably easy to work with, or is it one of those "once you've spent 6 weeks recompiling the kernel and finding all the libraries from 4 different sources, it works great".. There's also the Agilent Command Expert which seems to provide a matlab and python interface, but, looks like "windows only" and I'm in a cross platform environment (OS X, Ubuntu, Windows) (Hmm, KCE isn't as nice an acronym as ACE)
AK
Attila Kinali
Sat, Jul 2, 2016 4:56 PM

On Sat, 2 Jul 2016 09:09:49 -0700
jimlux jimlux@earthlink.net wrote:

Is PyVISA reasonably easy to work with, or is it one of those "once
you've spent 6 weeks recompiling the kernel and finding all the
libraries from 4 different sources, it works great"..

About half a year ago, I tried to do some measurement using an HP E5810
as interface. I tried several of the libs that are around, but none
really worked for me. The one library that worked out of the box and
got me some data was https://github.com/applied-optics/vxi11
I just hacked some C code together (I'm more familiar with C than python)
but there is also a python wrapper.

		Attila Kinali

--
Malek's Law:
Any simple idea will be worded in the most complicated way.

On Sat, 2 Jul 2016 09:09:49 -0700 jimlux <jimlux@earthlink.net> wrote: > Is PyVISA reasonably easy to work with, or is it one of those "once > you've spent 6 weeks recompiling the kernel and finding all the > libraries from 4 different sources, it works great".. About half a year ago, I tried to do some measurement using an HP E5810 as interface. I tried several of the libs that are around, but none really worked for me. The one library that worked out of the box and got me some data was https://github.com/applied-optics/vxi11 I just hacked some C code together (I'm more familiar with C than python) but there is also a python wrapper. Attila Kinali -- Malek's Law: Any simple idea will be worded in the most complicated way.
HB
Hugh Blemings
Sat, Jul 2, 2016 10:33 PM

Hiya,

On 3 Jul 2016, at 02:09, jimlux jimlux@earthlink.net wrote:

I'm looking for a simple portable software library to do some control/data acquisition from either python or octave for Agilent/Keysight gear, specifically over the USB or Ethernet interfaces.

[...]

Might sigrok be in the right direction ? https://sigrok.org/

Started as a Libre Logic analyzer tool but seems to have been expanding to do all sorts of test equipment interfacing.

Cheers,
Hugh

VK1YYZ/AD5RV

Hiya, > On 3 Jul 2016, at 02:09, jimlux <jimlux@earthlink.net> wrote: > > I'm looking for a *simple* *portable* software library to do some control/data acquisition from either python or octave for Agilent/Keysight gear, specifically over the USB or Ethernet interfaces. > > [...] Might sigrok be in the right direction ? https://sigrok.org/ Started as a Libre Logic analyzer tool but seems to have been expanding to do all sorts of test equipment interfacing. Cheers, Hugh VK1YYZ/AD5RV
KT
Keenan Tims
Mon, Jul 4, 2016 8:19 PM

PyVISA depends on the NI binary VISA libraries, which you then need to
get to work with your instruments. Getting this all working is an
endeavour I quickly gave up on.

I've had good luck with python-ivi:
https://github.com/python-ivi/python-ivi which should work well with
modern instruments that support USBTMC or VXI11 (SCPI-over-IP), and I
wrote an adapter for the Keithley 2000 serial interface that was also
pretty easy. It can also use PyVISA as a backend if you've got some
'real' GPIB gear you need to deal with. The only real gotcha is that
if your instrument is not supported 'natively' you will need to write
the object-oriented driver code yourself. This is not particularly
difficult, and most of the standard device classes need very little
modification, but it might be a turn off if you just want to throw a
few commands at the devices.

This same python-ivi project also contains lower-level VXI11 and
USBTMC drivers you can use if you prefer.

On 2 July 2016 at 09:09, jimlux jimlux@earthlink.net wrote:

I'm looking for a simple portable software library to do some
control/data acquisition from either python or octave for Agilent/Keysight
gear, specifically over the USB or Ethernet interfaces.

the "Keysight IO Libraries Suite CD " is, I think, Windows only

I'm fine with writing the SCPI commands and parsing the output, I'm just
looking for the "glue" between "send_message_to_instrument" or
"read_message_from_instrument" and the instrument itself.

Sort of like the python interfaces to the Prologix Ethernet/GPIB
controllers.

I've got the whole numpy/scipy infrastructure already installed, if that's
relevant.

Is PyVISA reasonably easy to work with, or is it one of those "once you've
spent 6 weeks recompiling the kernel and finding all the libraries from 4
different sources, it works great"..

There's also the Agilent Command Expert which seems to provide a matlab and
python interface, but, looks like "windows only" and I'm in a cross platform
environment (OS X, Ubuntu, Windows) (Hmm, KCE isn't as nice an acronym as
ACE)


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

PyVISA depends on the NI binary VISA libraries, which you then need to get to work with your instruments. Getting this all working is an endeavour I quickly gave up on. I've had good luck with python-ivi: https://github.com/python-ivi/python-ivi which should work well with modern instruments that support USBTMC or VXI11 (SCPI-over-IP), and I wrote an adapter for the Keithley 2000 serial interface that was also pretty easy. It can also use PyVISA as a backend if you've got some 'real' GPIB gear you need to deal with. The only real gotcha is that if your instrument is not supported 'natively' you will need to write the object-oriented driver code yourself. This is not particularly difficult, and most of the standard device classes need very little modification, but it might be a turn off if you just want to throw a few commands at the devices. This same python-ivi project also contains lower-level VXI11 and USBTMC drivers you can use if you prefer. On 2 July 2016 at 09:09, jimlux <jimlux@earthlink.net> wrote: > I'm looking for a *simple* *portable* software library to do some > control/data acquisition from either python or octave for Agilent/Keysight > gear, specifically over the USB or Ethernet interfaces. > > the "Keysight IO Libraries Suite CD " is, I think, Windows only > > I'm fine with writing the SCPI commands and parsing the output, I'm just > looking for the "glue" between "send_message_to_instrument" or > "read_message_from_instrument" and the instrument itself. > > > Sort of like the python interfaces to the Prologix Ethernet/GPIB > controllers. > > I've got the whole numpy/scipy infrastructure already installed, if that's > relevant. > > Is PyVISA reasonably easy to work with, or is it one of those "once you've > spent 6 weeks recompiling the kernel and finding all the libraries from 4 > different sources, it works great".. > > There's also the Agilent Command Expert which seems to provide a matlab and > python interface, but, looks like "windows only" and I'm in a cross platform > environment (OS X, Ubuntu, Windows) (Hmm, KCE isn't as nice an acronym as > ACE) > > > > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
PK
Poul-Henning Kamp
Mon, Jul 4, 2016 9:26 PM

I've had good luck with python-ivi:

I wrote and use this:

https://github.com/bsdphk/pylt

Very basic, works with the Prologix GPIB adapter but general enough to
also use other carriers (USB, TCP/IP etc)

--
Poul-Henning Kamp      | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG        | TCP/IP since RFC 956
FreeBSD committer      | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

-------- In message <CAMu5KjUWMY47Fiwqbe0JAS0JpbDt0OkYbtjTePhUWKtGWuDJ5w@mail.gmail.com> , Keenan Tims writes: >I've had good luck with python-ivi: I wrote and use this: https://github.com/bsdphk/pylt Very basic, works with the Prologix GPIB adapter but general enough to also use other carriers (USB, TCP/IP etc) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
J
jimlux
Wed, Jul 6, 2016 1:33 PM

On 7/4/16 2:26 PM, Poul-Henning Kamp wrote:

I've had good luck with python-ivi:

I wrote and use this:

https://github.com/bsdphk/pylt

Very basic, works with the Prologix GPIB adapter but general enough to
also use other carriers (USB, TCP/IP etc)

Thanks to all who replied..
I got the PyVisa working fairly easily on a mac
I'm skeptical about how easy it will be on Ubuntu
I'd expect it to be fairly straightforward on Windows

As with all these things, the "platform dependency" comes in when you
talk to the interface hardware, and there's a fair number of packages
out there that say "platform independent" (which, being in python, they
sort of are) but which depend on a underlying interface layer which may
or may not exist (e.g. Keysight libraries for Windows only)

I'm looking into the USBTMC stuff next as a low end simpler approach
(which is what phk's pylt uses, as well as python-ivi.

On 7/4/16 2:26 PM, Poul-Henning Kamp wrote: > -------- > In message <CAMu5KjUWMY47Fiwqbe0JAS0JpbDt0OkYbtjTePhUWKtGWuDJ5w@mail.gmail.com> > , Keenan Tims writes: > >> I've had good luck with python-ivi: > > I wrote and use this: > > https://github.com/bsdphk/pylt > > Very basic, works with the Prologix GPIB adapter but general enough to > also use other carriers (USB, TCP/IP etc) > Thanks to all who replied.. I got the PyVisa working fairly easily on a mac I'm skeptical about how easy it will be on Ubuntu I'd expect it to be fairly straightforward on Windows As with all these things, the "platform dependency" comes in when you talk to the interface hardware, and there's a fair number of packages out there that say "platform independent" (which, being in python, they sort of are) but which depend on a underlying interface layer which may or may not exist (e.g. Keysight libraries for Windows only) I'm looking into the USBTMC stuff next as a low end simpler approach (which is what phk's pylt uses, as well as python-ivi.