This one started as a question under one of our YouTube videos, and the answer was short enough that recording it seemed faster than typing it. So: a spontaneous video, and this equally spontaneous write-up.
The question
Plenty of modern instruments expose a plain TCP socket, commonly port 5025, where
you open a connection, write *IDN?, and read a line back. No VISA, no
drivers, no libraries. It's a nice way to talk to an instrument from a language or an
environment that has nothing but a socket API. Can
GPIBEE be used the same way?
Yes. GPIBEE's ++protocol listens on
TCP port 1234, and it's the same command set as the USB UART ++protocol mode.
Anything that can open a socket can drive it: PuTTY in raw mode, netcat,
a five-line Python script, a PLC.
The one difference: addressing
An instrument with a socket interface is the instrument, so the connection
alone identifies it. GPIBEE is a gateway:
behind that one IP address sits an entire GPIB bus with up to 15 instruments. So you
have to say who you mean, and that's what ++addr is for:
++addr 4 # talk to the instrument at GPIB primary address 4
++auto 1 # read back automatically after each write
*IDN?
HEWLETT-PACKARD,34401A,0,5-1-1
MEAS:VOLT:DC?
+2.81160000E-05
++addr accepts primary addresses 0–31 (31 is reserved for
GPIBEE's own SCPI interface), and it can
select secondary addresses, or sub-addresses, as well, for instruments that use them.
Switch addresses whenever you like: the same connection can move between instruments
on the bus.
++auto 1 reads back using EOI termination, which is what most
instruments assert at the end of a response, so this example needs nothing further.
If an instrument doesn't, there are separate ++protocol commands for choosing the read
and write termination behavior; the firmware manual lists the complete command set.
When to use it, and when not to
GPIBEE is built around standard protocols first: VXI-11 and USBTMC give you VISA auto-discovery, locking, service requests, and drop-in compatibility with software you already have. That's the path we'd point you to for anything real.
The ++protocol is for the other cases: scripting from somewhere VISA doesn't reach, an embedded controller, a quick poke from a terminal to see whether an instrument is even alive. It costs nothing to have, and sometimes it's exactly the right tool.