Set PS

This program was initially written for HP 6032A. I wrote it to be used at work but as I wrote it at home where I don't have a HP supply I used my PS 5010 instead and then added the HP commands.

A few minor changes in appearance had to be made and as a result this program now can control both and as of v1.2 also PS5004.

The program can control both positive and negative supplies of the PS5010 but not the +5 V supply other than turning output on and off.

The Tek PS 50xx  must be is in the high power (rightmost) compartment of the TM 5006.

The program will automatically find any supported PS on the bus as long as its address is higher than 0. If more than one supported PS is connected the one with lowest address will be selected.


Oct 17, 2015  - New version 1.3


Changes from 1.2.2 to 1.3:


   Current Limit textbox accepted space if in focus rather toggle output.

   Both textboxes accepted invalid characters e.g.letters and symbols, now only numbers, comma and period.

   If the mainframe was switched off before ending the program an Error occured when the program was closed because the it couldn't read the actual values.

     Now if the PS is off the last settings done by program are saved i.e. in case a manual setting has been done it will not be saved unless a Refresh was done before shutdown.



   Changed the way settings are loaded at start and saved at exit, now only the settings for the particular PS are loaded/saved where settings for all PS's were loaded/saved before.

   The way invalid settings error trapping worked changed.

   Default settings i.e. setting at the very first time the program is run removed i.e. no change to the PS setting is done.



   Option to ignore loading saved settings at start up added.


Changes from 1.2 to 1.2.2:

  BugFix: Didn't indicate correct output status when Apply was clicked if output had been changed manually.


  New: Got rid of the ini-file and saved settings in Registry instead.


Changes from 1.1 to 1.2:

  A lot of code rewritten.



  Support for Tek PS5004 added.

  The ini-file increased to contain the actual settings when the program was last terminated which are now restored when the program is started again.

  A short delay introduced to ensure that the output has been turned off before the voltage/current settings are changed when this option is enabled.


Changes from 1.0 to 1.1: 

  The ini-file saves at exit rather than manual edit.

  Some error handling changed.



   Output ON/OFF can now be toggled with space bar.

   A green dot now indicates when output is on.


Version 1.0

  Initial version.


Here's a screen shot.



Default values for the two checkboxes are "checked" but can be changed by editing the values in the ini-file located in the same folder as the exe-file.

This applies to v1.0 only, later versions save the ini-file on exit and from v1.22 the settings are saved in the registry.


Refresh inputs the actual settings of the PS to the program and Apply does the opposite i.e. sets the PS to the settings of the program.

Turn OFF Output ... option: If ticked turns off the output before sending setting changes to the PS (New in v1.3).

Ignore Save settings option: If ticked the program will start with the actual settings of the PS as opposed to starting with the saved settings which also are sent to th PS.

Confirm Output change option: If ticked a dialog box asking for confirmation to change the output status will appear when Turn ON/OFF Output is clicked.

Turn ON/OFF Output toggles the output status.

One hidden feature is that the output could be toggled by hitting the space bar on the keyboard (New in v1.1).


You must have a NI GPIB card with the proper drivers installed.  Find  and download National Instruments GPIB card drivers here.

It is expected to work on any PC/win OS (not 3.1) with a  correctly installed and working NI card.


Be sure to uninstall any previous version before installing this one or extract the *.exe file from the *.CAB file and replace your current file.


Download Set PS here


Email me with comments  /Håkan

Home  /  Go back