4

I have a special-purpose piece of custom test equipment that I want to control from another box using the VISA SCPI instrument control commands.

The custom box contains an x86 processor running full Ubuntu Linux. I want that the custom box respond to a very small set of VISA commands. Really, I only need one command, "set frequency".

I want the VISA interface, because the test rack already contains a bunch of commercial instruments controlled by VISA SCPI commands.

How do I send SCPI commands via VISA?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Pedro_Uno
  • 946
  • 10
  • 19

2 Answers2

2

The canonical VISA library for Python is PyVISA. It supports Windows, Mac, and Linux.

PyVISA is a Python package that enables you to control all kinds of measurement devices independently of the interface (e.g. GPIB, RS232, USB, and Ethernet). It works on Windows, Linux and Mac; with arbitrary adapters (e.g., National Instruments, Agilent, Tektronix, Stanford Research Systems).

jacknad
  • 13,483
  • 40
  • 124
  • 194
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
  • Stephen, I'm looking for the software that goes on the other end, inside the instrument to receive and respond to SCPI commands. – Pedro_Uno Jan 08 '18 at 18:52
  • I found a couple of SCPI parser projects, https://github.com/j123b567/scpi-parser and https://github.com/MightyPork/scpi_parser These may be just what I need. If I understand correctly, I can just write a program that opens a socket to listen to a port. Messages are then passed to the parser for processing. – Pedro_Uno Jan 08 '18 at 18:53
  • PyVISA on Linux (Suse) is not working on my site. It is no so that someone could install PyVISA from scratch and then it starts to work. If used, it throws errors about the installation, something not found. But I´ve already installed all and propagated the directories. Most people do not have the time diving deep into the system to fix such sorts of problems and a quick research on the internet shows that not many people use PyVISA. At least not installing it by themself. Here it is not working, so im reduced to SCPI. – Coliban Oct 24 '19 at 06:46
1

OK, I tried out the GitHub project SCPI Parser.

It provides exactly what I needed. There is even an SCPI-TCP example that starts up a process listening on port 5025 and processes SCPI commands that come in there. I only need to add a few callback functions to talk to my custom hardware.

I'm good to go.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Pedro_Uno
  • 946
  • 10
  • 19