Thank you Dave, that is exactly what I feared. The HP82357 adapter is sooo much easier to use.
I offer my Prologix adapter for sale....
My best,
Harke (having a lot of fun with these HP USB-GPIB adapters!)
toggle quoted message
Show quoted text
On 17/09/2024 13:21, Dave_G0WBX via groups.io wrote:
Re Python and GPIB via ... Prologix devices.
? "Open the port with the python "serial" library, and send direct GPIB commands to it."
Sadly, It's not quite as simple as that, as anyone who has worked with Prologix (and clone) devices will tell you.
You first have to discover the serial port the adapter appears at*, and after establishing communications with that, then configure it for the instrument (or instrument's) on the bus you will be using, so it can handle any vagaries of their individual GPIB command/response language.
* And that can sometimes change unexpectedly if your OS re-enumerates the connected USB devices for any reason!? And not only on Windows!? (At least on Linux, and maybe Mac's, there is the wonderful "udev rules" facility to nail their feet to the ground!)
Also, in the case of multiple instruments on the bus (sig-gen and power meter for example) you will need to reconfigure at least the GPIB bus address to communicate with, that the Prologix adapter uses, whenever you want to communicate with another instrument. (And maybe in extreme cases, the command terminator methods too.)
Only once you have the interface configured for an instrument, is it then "mostly" transparent sending/receiving data between instrument and computer.
If you need to send or receive binary data, then that's another ball of string to unravel.
As before, read the Prologix documentation 'in full', before you start!? Especially regarding filtering any data to send, and "escaping" certain byte values to prevent the Prologix device itself interpreting part of any sent binary data (to the instrument) as it's own commands!
There are libraries about that can handle most of that for you, but there is often still some customising and tuning needed to get the best performance, especially with measuring instruments, they all need time, not all by default wait for a new valid measurement to be made after your request, before replying.
Also, even SCPI is not always fully/faithfully implemented in some instruments.
(Reading the capability string is often not or poorly implemented.)
"Have Fun"!
Dave 'KBV