Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

First start

Crucible ships an example bench with three instruments: a DC power supply, a multimeter and a Keithley 2400. It is there to see it working before you describe anything.

Start the bench

  • Linux: run crucible with no arguments.
  • Windows: Start menu → Crucible → Arrancar banco.
$ crucible
Crucible 0.1.0 — banco.yaml

  ID          MODELO         RECURSO VISA
  fuente      FUENTE-DC      TCPIP0::127.0.0.1::5025::SOCKET
  multimetro  MULTIMETRO     TCPIP0::127.0.0.1::5026::SOCKET
  smu         KEITHLEY-2400  TCPIP0::127.0.0.1::5027::SOCKET

Listo. Ctrl+C para parar.

Each row is an instrument listening on its port (the columns: ID, model, VISA resource). While the window stays open they are “switched on”; every incoming connection is logged below. Ctrl+C switches them off (Listo means ready).

With no arguments, crucible uses the first bench it finds from this list:

  1. banco.yaml in the folder you run it from.
  2. banco/banco.yaml next to the executable (Windows installation).
  3. /usr/share/crucible/banco/banco.yaml (Linux installation).

To start a specific one: crucible path/to/banco.yaml.

Ask each instrument who it is

In another terminal, with the bench running:

$ printf '*IDN?\n' | nc -q1 127.0.0.1 5025
Crucible,FUENTE-DC,SIM0001,1.0
$ printf '*IDN?\n' | nc -q1 127.0.0.1 5026
Crucible,MULTIMETRO,SIM0002,1.0
$ printf '*IDN?\n' | nc -q1 127.0.0.1 5027
Keithley,2400,1234567,A1.2

Each port is a different instrument, and each one answers with its own *IDN?.

-q1 matters. Without it, Debian’s and Ubuntu’s nc does not close the connection after sending, and the command waits forever.

That is all you need to get going: they are TCP sockets speaking SCPI terminated by a newline. The next chapter connects a real program.