Agilent 6623A power supply GPIB control - Page 1
Forum section: electronics / testgear

author: vintageradiobuff
author_rank: Contributor
timestamp: May 01, 2017, 10:14:25 pm
content: Hello all! My first post here...I am a hobbyist and I have just acquired an Agilent 6623A triple output power supply. I also purchased an Agilent 82357b USB-to-GPIB adapter in the hopes of controlling the 6623A with my laptop running Windows XP Service pack 3. I have downloaded and installed the Agilent IO suite, and the Command Expert and Benchvue Apps. However, after I purchased the 82357b, I found out that the 6623A is not compatible with the Command Expert program. Not sure if Benchvue will work either. So, what are my options (software-wise) to be able to have my laptop talk to the 6623A? The manual for the 6623A indicates that the 6623A can be controlled by HP series 200 / 300 computers using the BASIC language. However, since the 200 / 300 series are long obsolete, how can I achieve the same functionality using a Win XP laptop?

author: pigrew
author_rank: Frequent Contributor
timestamp: May 01, 2017, 11:50:27 pm
content: The "easy" way is to use a graphical programming language like LabView or HP Vee. However, I prefer programming in C#, so I use Visual Studio with Visa libraries. Previously, I used the Visa COM interop library, but with the latest Agilent IO libraries, I'm using Ivi.net. Python is also an option, though it's more popular on Linux.

author: vintageradiobuff
author_rank: Contributor
timestamp: May 02, 2017, 12:24:39 am
content: Thank you. Your response has given me a starting point to begin my research. I am quite new to all of this and not familiar with how to use all the programs you have mentioned to make it work. So, I have a lot of googling to doDo you know of any sites / resources that provide very basic, beginner-level information on this topic?

author: pigrew
author_rank: Frequent Contributor
timestamp: May 02, 2017, 02:45:08 am
content: I usually use the "command line" GPIB interface. You can start to play with it inside the Keysight "Interactive IO" program. You can type a command to send to the instrument, and read responses, to get a feel for the instrument's control. Start by sending a "*IDN?" query to the instrument, and it should read back the model and serial numbers.After you do that, you have to choose which programming language to use.If you use C#, I'd suggest using the Ivi.Net/Visa.net library (assuming that it supports XP). I posted a very small program to read calibration constants from the HP3478 athttps://github.com/pigrew/HP3478Ctrl/blob/master/HP3478Ctrl/HP3478A.cs. Note that that instrument does not speak the SCPI language. I sent binary blocks of data to it, instead of text strings. You'd need to install Visual Studio, which I believe has a free version that is "good enough" for this application.

author: edpalmer42
author_rank: Super Contributor
timestamp: May 02, 2017, 02:52:39 am
content: What programming languages are you familiar with?I've used a freeware program called EZGPIB. It's basically a Pascal interpreter with added GPIB commands. It has some VISA functionality, but I haven't used that. I have an NI PCI GPIB card so I use the NI488 software. I've used it to control my HP 6622A power supply (likely the same as your 6623A). I wanted to monitor the warmup current of an ovenized frequency standard. Worked fine.You could also use Python with the PyVISA addon. That's on my list of things to do.Whatever language you prefer, you can probably find an addon. GPIB isn't magic, it's really just a serial comm channel plus enough fussiness to give you a headache.Ed

author: vintageradiobuff
author_rank: Contributor
timestamp: May 02, 2017, 11:52:19 am
content: Quote from: edpalmer42 on May 02, 2017, 02:52:39 amUnfortunately, noneI was hoping to wing it using snippets of the programming examples in the manual, which are in BASIC or using a graphical programming interface that would shield me from line-level programming commands.

author: pigrew
author_rank: Frequent Contributor
timestamp: May 02, 2017, 03:22:59 pm
content: I second Ed's suggestion of Python. It'll be somewhat similar to that basic code (at least at the beginning). Creating a graphical user interface in Python could be challenging, so you may want to stick to writing console programs with it.

author: edpalmer42
author_rank: Super Contributor
timestamp: May 02, 2017, 03:58:15 pm
content: You haven't mentioned why you want to program your power supply. A power supply isn't rocket science to set up.What do you want to do that's worth the effort of programming?Ed

author: idpromnut
author_rank: Unknown
timestamp: May 02, 2017, 04:23:04 pm
content: This isn't what you want, but it is a control program (for another model of Agilent bench PSU) and it works, sorta. Have fun, muck with it, and maybe it will help you understand a bit more of the command set you will need to use.https://github.com/idpromnut/e3648ctl

author: vintageradiobuff
author_rank: Contributor
timestamp: May 02, 2017, 10:42:31 pm
content: Quote from: edpalmer42 on May 02, 2017, 03:58:15 pmI don't really need to program the power supply. As a hobbyist, I am just interested in wrapping my head around various technologies and familiarizing myself with the features of my equipment.Having said that, one specific reason why I want to access my 6623A via GPIB is to see why I am getting the SRQ annunciator coming on at power up and staying on. According to the manual, the SRQ annunciator is on for the following reasons:· An Output Fault. If there is a fault on one or more of the output channels and you previously sent the SRQ 1 orSRQ 3 command (see Service Request Enable/Disable information below), then an SRQ will be generated.· An Error. If there is an error (see Tables 5-8) and you previously sent the SRQ 2 or SRQ 3 command, (see ServiceRequest Enable/Disable information below), then the supply will generate a service request.· Power-on. At power-on, the PON bit of the serial poll register is set but the supply will only generate an SRQ if youpreviously sent a PON 1 command.· Input Line Voltage Dropout.As far as I can tell, the power supply is working fine on all channels and therefore I suspect that the SRQ annunciator is on because of a previously sent PON 1 command. I want to connect to the 6623A and send a PON 0 command to see if that will cause the SRQ annunciator to turn off. I know it may just be a cosmetic thing, but I like everything to be "normal"

author: TAMHAN
author_rank: Frequent Contributor
timestamp: May 03, 2017, 12:34:42 am
content: Hello,what I can offer you is a ready to run Visual Studio 2010 solution for the HP 6624A with a NI PCIe card using VISA. Sadly, I can not post it live for legal reasons. So shoot me an email to tamhan aht tamoggemon dottything com.AFAIK, the 6623A and the 6624A are very common programming language wise.Tam

author: pigrew
author_rank: Frequent Contributor
timestamp: May 03, 2017, 12:46:18 am
content: Quote from: vintageradiobuff on May 02, 2017, 10:42:31 pmIf this is a one-time thing, you could manually send the commands using the "Interactive IO" program that I mentioned (which comes with the Keysight IO libraries). You can query "SRQ?" or "PON?", etc... Then you can "write" the commands that expect no response, such as "PON 0". If you click Query with a command that doesn't send a response, the interface will freeze for a few seconds until it times out.If you will be doing this often, you'd want to script it (perhaps in Python).

author: vintageradiobuff
author_rank: Contributor
timestamp: May 03, 2017, 01:55:39 am
content: Quote from: TAMHAN on May 03, 2017, 12:34:42 amEmail sent...

author: vintageradiobuff
author_rank: Contributor
timestamp: May 04, 2017, 02:49:22 am
content: Here is an update...Received the 82357B usb-to-gpib adapter today. I am able to connect to the 6623A with my laptop running Win XP (sorta). The Keysight Connection Expert, however, shows it as an "unknown instrument" and sending the *IDN? command in the interactive IO returns no response. When I click on the "read status byte" button, a response is returned and the SRQ annunciator on the 6623A goes out. However, when power-cycled, the SRQ annunciator comes back on. I have tried sending a "PON 0" command, but it has no effect - the SRQ annunciator still comes on after power up. I have re-seated all the RJ-11 cables connecting the GPIB board to the PCBs of the individual output boards. Not sure where to go from here. Any ideas? My suspicion is that if I send a PON 0 command successfully, the SRQ annunciator will not come on at power up. The problem (as I see it) is that although there is some communication between my laptop and the 6623A via the 82357B, the 6623A does not appear to be accepting all commands (at least not the PON 0 command)

author: pigrew
author_rank: Frequent Contributor
timestamp: May 04, 2017, 03:18:10 am
content: Quote from: vintageradiobuff on May 04, 2017, 02:49:22 amChecking the manual more carefully, it looks like it doesn't support the "*idn?" command. Most recent equipment supports *idn?, and I don't think to verify it was proper for the 6623A. Try the "ID?" query instead. Look thorough the manual, and try some of the error or status query commands.

author: vintageradiobuff
author_rank: Contributor
timestamp: May 04, 2017, 10:24:19 pm
content: Quote from: pigrew on May 04, 2017, 03:18:10 amYou are absolutely right... I should have RTFMThe 6623A speaks a different language. I was able to get the proper responses using the correct syntax shown in the manual. I am also happy to report that I successfully sent a PON 0 command and the SRQ annunciator no longer comes on after power up. I am keeping my fingers crossed that this means there is no problem with the PS and that it was just a programming issue. I still need to put the PS through it's paces to ensure everything is working OK, though.