0

I want to program some simple automation using test gear like Keysight DMM 34461A. I have done this sort of thing using VISA, SCPI etc (for example with pyVISA) over ethernet. But I'd like to know how to do it over ethernet without the overhead of installing VISA, vendor drivers etc.

After all, with older instruments you can just use RS-232 and connect with a terminal (PuTTY etc), or program using serial I/O. So I was rather hoping that underlying the fancy VISA ethernet way of doing things was plain old serial-over-ethernet, ie: Telnet, or SSH, and that it was feasible to connect that way and just exchange SCPI commands and responses. But so far I don't seem to have stumbled on the right docs for this.

Any pointers?

gwideman
  • 2,729
  • 14
  • 19
  • Why would a DMM run a SSH server?! – Marcus Müller Mar 10 '23 at 11:00
  • @MarcusMüller The instrument runs a web server, so running servers is not extraordinary per se. An SSH or Telnet server would be similar to older instruments providing a serial interface. Clearly the instrument offers some kind of commands server interface, which is what VISA communicates with. – gwideman Mar 10 '23 at 23:11
  • .@MarcusMüller ... and as I later discovered, the DMM does indeed offer a Telnet service, though not SSH. – gwideman Mar 11 '23 at 02:12
  • 1
    Ah nice! Yeah telnet makes a lot of sense. Ssh is a bit of a monster to implement on embedded devices, but then again, if the device already does run a webserver with TLS, that would not sound too crazy. – Marcus Müller Mar 11 '23 at 07:33

2 Answers2

4

My pointer would be to read the "fine" manual.

The SCPI commands will be spelled out in detail and you don't need anything other than a program (which you can write in C, Python or whatever) to generate those commands and parse the responses. You don't need the NI overhead.

I found this fairly trivial to do with some 6-1/2 digit multimeters in a bespoke test jig.

Spehro Pefhany
  • 397,265
  • 22
  • 337
  • 893
  • 3
    Yes, forgo the NI baggage whenever possible. We regularly control Keysight DSO3000 scopes and Keysight 33500 waveform generators, on both windows and linux on Ethernet via python. I do happen to have a programming guide for DSO1000 and some sample code (USB, I think), if you want... – Chris Knudsen Mar 10 '23 at 20:31
  • As my original post says, I already know my way around SCPI, (and have read the manual's SCPI Programming Reference). But regarding network connection, the manual only say to install the Keysight IO Libraries. So what I'm missing is how to connect to the instrument over ethernet (without libraries) in order to start a session and use those SCPI commands. Attempting a connection with PuTTY using either Telnet or SSH just gets an immediate connection rejected error. The web interface to the instrument works showing basic network is OK. – gwideman Mar 10 '23 at 22:57
  • @ChrisKnudsen So how did you connect to the instruments over ethernet, absent NI or Keysight VISA? – gwideman Mar 10 '23 at 22:58
  • 1
    VXI-11 so you can use, for example, python-vxi11 – Spehro Pefhany Mar 11 '23 at 01:33
1

Turns out that you can, in fact, Telnet to instruments like Keysight DMM 34461A. For that specific meter, useful documentation is in manual section (paralleling the meter's menus):

  • Features and Functions
    • Utility menu
      • I/O Configuration
        • LAN Settings
          • LAN Services
            • Telnet > switch this on.

There you can also enable/disable VXI-11, Sockets, and Web interface.

(The SCPI section of the manual rather unhelpfully does not point you to this info.)

Key nugget of info:

"The instrument Telnet port is 5024. Open SCPI sessions on the Telnet connection by entering: telnet IP address 5024"

So the very simplest "Hello World" exercise is as follows:

  • Connect the meter ethernet port to the LAN.
  • Check the Utility Menu > I/O Configuration > LAN Settings page for the IP address it obtained via DHCP, or to set IP address.
  • Use a terminal program (for example PuTTY) set for Telnet, with port 5024.
  • Start a Telnet session to the IP address of the meter.

The meter responds with a prompt. At this point you can enter SCPI commands. For example *IDN? returns an identifying string.

Comments

  1. This Telnet access is, of course, not secure. But then neither are the web services nor VXI-11 (that cooperates with VISA). All of these can be turned off if you want.

  2. There are undoubtedly merits to using VISA, and possibly also an IVI instrument driver (that runs on top of VISA), which further civilizes and speeds up access to particular instruments. But this Telnet path gives at least bare bones access without having to deal with any complexities of vendor-provided (or NI-provide) piles of software and corresponding libraries that you may or may not need, and might have conflicts with each other.

gwideman
  • 2,729
  • 14
  • 19