Close

New revision of the HP E3634 tool and a version for the HP E3641A

A project log for HP E3634A Power Supply Control Software

A command line tool to control an HP Power Supply via Linux_GPIB

bharbourBharbour 12/25/2023 at 00:161 Comment

The new revision has an interactive command added. To use it, enter:

HP3634_ctl interactive

This allows you to enter commands only, without exiting the tool or allowing the 3634A to drop out of remote mode between commands.  My use for this mode is to call this tool from another program using pipes and the execv call. It will exit if there are any syntax errors or other issues. Upon return from each command, the fflush () function is called to get around the wacky flow control for the pipes. It results in getting parent process getting the results of the command immediately after completion.

While working with a similar tool talking to the HP34401A multimeter, I found that the trigger stuff would not work if you allowed the meter to go out of remote mode between commands. I am not sure if the 3634A power supplies behave similarly, but the ability to exec this program from another one is useful.


The help screen display was really messy. The parameters for each command were jumbled up to the right of the command name. I got all of the parameters to line up vertically which is more pleasing to my eye. May be easier to read maybe not...

I picked up another GPIB capable power supply and wanted to be able to drive it with a tool like the one that drives the 3634A. The command sets are almost identical, with the exception of the 3641A not having any overcurrent protection commands. It still supports the current limit operations though. Also, the minimum/maximum voltages and currents changed. Because the 3641A commands are a subset of the 3634A commands, it seemed like ifdef'ing out big chunks would get messy, so I ported a copy of the 3634A tool to the 3641A.

A friend has the 3 output version (E3631A) of the 3634A and there is only one additional command that power supply needs to select between the outputs. He would be interested in driving the supply from the RS232 port rather than the GPIB port, so there would be some work to change the code for that and adding the channel control command would be trivial to implement. It would be necessary to add current channel tracking to make the limit checking make sense, or just get rid of the limit checking entirely. If you enter something out of bounds for a channel, the supply will catch it and complain without accepting the bad value. If anybody else is interested in this supply, please leave me a message in the comments section or PM me.

Discussions

scofeild wrote 12/28/2023 at 06:31 point

The latest revision introduces an interactive command "HP3634_ctl interactive," allowing users to enter commands without exiting the tool or dropping the 3634A out of remote mode between commands. This mode is particularly useful when calling the tool from another program using pipes and the execv call. Syntax errors or other issues trigger an exit, and the fflush() function addresses flow control challenges for pipes, ensuring the parent process receives command results immediately after completion. The help screen display has been improved for better readability, aligning parameters vertically next to the command name. Additionally, the tool has been adapted to support the HP3641A power supply, which shares a similar command set with minor differences. Future adaptations for the E3631A, a 3-output version of the 3634A, are considered, with potential adjustments for RS232 port usage and channel control commands. For services, consider https://seatechinnovations.net/ for expert assistance.

  Are you sure? yes | no