Beginner introduction to GPIB in the HP3455A - Page 1
Forum section: electronics / beginners

author: Atomillo
author_rank: Regular Contributor
timestamp: January 31, 2022, 10:00:33 am
content: Hello:I'm currently building the Arduino GPIB-USB:http://egirland.blogspot.com/2014/03/arduino-uno-as-usb-to-gpib-controller.htmlThe problem is that I've never used GPIB before and I'm completely unfamiliar with any commands or instructions. I've also not found a comprehensive guide for noobs like myself.My main objetive is to be able to record readings from a HP3455A. My understanding is that newer instruments like the HP34401A have commands that are easy to read and understand, but that older models are a bit more cryptic and require sending alphanumeric strings that aren't readable at all.Reading the operating manual of the HP3455A (https://xdevs.com/doc/HP_Agilent_Keysight/HP%203455A%20Operating.pdf), I've found that there are two modes of operation selectable by the rear switch: TALK ONLY, and normal device. And here start my questions:1: In TALK ONLY mode, if I plug the controller in, will the readings just appear in the Serial Monitor of the Arduino? Or must I send some sort of command? For instance, must I select some address, or read any buffer, etc...2: In normal device, then I just type in the Serial Monitor of the Arduino whatever command I choose from the Operating Manual. So, for instance, I just copy the attached command? Or do I eliminate the "address" part and just send the message?The end goal is just to use the meter for data logging, so it would not be great loss to not be able to talk to it. Eventually, I also want to be able to talk to a K181, but from other threads in this forum that seems quite more complicated.Many thanks for all the help!

author: Venturi962
author_rank: Regular Contributor
timestamp: February 01, 2022, 12:00:43 am
content: To answer some questions:1: In TALK ONLY mode, if I plug the controller in, will the readings just appear in the Serial Monitor of the Arduino? Or must I send some sort of command? For instance, must I select some address, or read any buffer, etc...Since you mention Arduino-GPIB, you'll have to issue the following commands via Serial to get a reading:++addr N (N = Address number)++read2: In normal device, then I just type in the Serial Monitor of the Arduino whatever command I choose from the Operating Manual. So, for instance, I just copy the attached command? Or do I eliminate the "address" part and just send the message?You'll only need to put enter the second half with the commands, e.g. "F1 R3 A0 H1 M3 T3" then you can issue a ++read to get the reading. Once you specify the parameters, you then only need to send T3 to issue another measurement trigger before reading.

author: Atomillo
author_rank: Regular Contributor
timestamp: February 02, 2022, 01:38:21 pm
content: Hello!It kinda works...Introducing the address of the device and then typing ++read shows numbers on the serial monitor, but not what they should.First image, called test, is when 16.something volts are applied to the input. The first input is positive polarity and the second one is negative polarity. This reveals the first problem: instead of a positive sign, it shows a dot and instead of showing a negative sign, it shows a comma. Simmilarly. instead of the showing E (for exponent) it shows a D.However, it lacks the 1 in 16V, and instead shows a 0, despite the exponent being correct.The second image (test1) is with 8.something volts at the input. For some reason, the point is located one decimal place before it should.Any idea from where this errors are coming?Attached for reference is also what the reading should look like.EDIT: After doing more tests, I realized also that not all the numbers are the same in the serial port than those shown in the LED display. It's not a huge difference but for sometimes there are around 10mV of difference or so

author: Atomillo
author_rank: Regular Contributor
timestamp: February 02, 2022, 07:36:56 pm
content: Hi:Sorry to violate the doble post rule, but after remaking all connections and making sure they were rock solid it reads data perfectly without any problem!In addressable mode, it only sends data when set to the correct address also.My only problem now is that I don't know how to configure the meter through GPIB. I have tried inputting the command using ++, "", and all combinations of those but it never changed anything. Might be I'm missing something?

author: Venturi962
author_rank: Regular Contributor
timestamp: February 02, 2022, 10:29:43 pm
content: Glad to hear you got it working.You likely need to enable Carriage Return and Line Feed when you send a Program Code for the multimeter to accept it. Easy to try if you use Arduino IDE serial monitor. Here's a Python Example as well:gpib.write(b'F1\r\n') #DCV

author: Atomillo
author_rank: Regular Contributor
timestamp: February 03, 2022, 06:18:14 pm
content: Hi:I just tried it but unfortunately it doesn't work.When I enable Debug mode, it says that it has sent the command. Strangely, the REMOTE LED of the HP3455A isn't lid. However when it talk only the TALK LED is lid.Could this be a clue?

author: Venturi962
author_rank: Regular Contributor
timestamp: February 03, 2022, 11:25:29 pm
content: Remote LED should be lit when in Remote mode, so that's definitely an issue.In the debug output, it looks like you are sending quoted strings? You should be sending commands without quotes. Here's an example with debug mode turned on.Did try "F1 R4 T3" (with quotes) and it looks like it did nothing - I think the firmware doesn't know how to parse the command with quotes.

author: Atomillo
author_rank: Regular Contributor
timestamp: February 04, 2022, 08:23:06 am
content: Even without quotes, the multimeter doesn't react at all. The fact that that the LED should be ON worries me because it points to some error within the multimeter.To make sure the controller is correctly I will try to talk to a Keithley 181. Time to dig through that manual nowEDIT: selecting the rear switch so that the unit is addressable, I can't control it. Sending R1 X for instance doesn't change the LED REMOTE to on neither the range.Thus, I suspect a problem with the controller. Have to check the wiring

author: Atomillo
author_rank: Regular Contributor
timestamp: February 04, 2022, 10:36:45 am
content: Quote from: Atomillo on February 04, 2022, 08:23:06 amEDIT 2: Pretty sure it's not a connection problem. I soldered all the cables. Strangely, now the + sign in the HP3455A is / but I can read everything without a problem. The ++dcl command also works no problem. So I'm really at a loss here.EDIT 3: SUCCESS! Simply connecting REN to GND allows me to program the instrument through the Serial Monitor and also turns on the REMOTE LED. Now I probably have to tinker with the code so that it isn't always connected to GND and only does it when I send some config paramenter.Many thanks to Venturi962 for his kind and very useful help!EDIT 3: I've monitored on the scope the behaviour of DAV, NRFD and NDAC lines as well as some data lines, all seem to be fine. Now I'm going to try to solder REN pin and just connect it to ground, and see if that enters the device intro programmable mode. Wish me luck!

author: Venturi962
author_rank: Regular Contributor
timestamp: February 04, 2022, 12:19:55 pm
content: Glad you found that out about the REN line, I believe AR488 has control over the REN line whereas Arduino-GPIB by Emanuele Girlando requires it to be grounded (so shouldn't need to modify his code). From his docs:NOTE:GPIB pins 10, 17-24 goto GND, but (!!):GPIB pin 17 (REN) has to be implemented ..stay ready to reroute it differently in the future;

author: Atomillo
author_rank: Regular Contributor
timestamp: February 04, 2022, 12:59:23 pm
content: Damn I actually missed that!I didn't have the pin connected to anywhere. Of course the controller worked in the sense that the message was sent perfectly as I observed in the scope but the device didn't recognize it.Once again many thanks!

author: Atomillo
author_rank: Regular Contributor
timestamp: February 04, 2022, 06:48:52 pm
content: Hi:I've been playing around with GPIB in my HP3455A and K181 with no problems.I've only noticed one strange thing: in the HP3445A, the positive is instead a \. The negative sign has no problem thougs.Also, the K181 displays a + no problem too! I understand this is a problem of the multimeter itselft right?

author: Venturi962
author_rank: Regular Contributor
timestamp: February 04, 2022, 09:48:15 pm
content: Hmm, shouldn't have any issue reading a '+' is that value straight from the Serial Port?I see that too, I end up stripping it off in my code.