02-16-2009 12:05 PM
Hello,
I am an undergrad trying to write a LabVIEW program (using LabVIEW Student Edition version 8.2.1) to control two HP/Agilent power supplies - the HP6654A 0-60V/0-9A System DC Power Supply and the Agilent 6652A 0-20V/0-25A System DC Power Supply. This is to be part of a larger program to run an automated FET characterization setup. I need to sequentially increase/step-up the voltage of the power supplies and believe I have generated the proper block diagram to do so using the NI LabVIEW Plug-and-play drivers for these instruments.
However, I am continually receiving the Error listed in the subject line of this message. I have tried removing the Overvoltage and Overcurrent protection from the power supplies directly (via their front panels), but to no avail. Could someone please tell me, if possible, exactly what this message means and some possible solutions. I have searched the literature, both of LabVIEW and the power supplies, and cannot find anything that sheds definitive light on the subject. I am somewhat of a LabVIEW neophyte and this is the first time I've tried to program using GPIB.
Any help would be greatly appreciated.
Thanks,
Michael
02-16-2009 03:13 PM
Hello Michael
As the LabVIEW error box already explains (right click on the errorcode and select explain error) this is an instrument specific error.
You can look up this error in the HP manual.
This should explain more.
If you want feedback on your program, you can zip your vi's (dont zip the instr libs) and attach it to your post.
02-17-2009 06:21 AM - edited 02-17-2009 06:24 AM
Hi,
the error you are getting (-222) says you are trying to program the instrument with values that are outside the range for that instrument.
Check Table3-1 of the programming manual for valid ranges depend on the instrument model
Regards
Ray Farmer
02-17-2009 03:05 PM
HI All,
I got the same error wwhen i was trying to execure this code.I have attached the VI in this post......It has N number of iterations.The code works correctly for the first time and then gives this error.....DO let me know asap as I newed to get some results very urgently....
thankyou,
Sandesh
02-17-2009 04:31 PM
Sandesh-
Here's my first thoughts You claim that you are using a HP66xxA and an Agilient 66xxA. HMMMMMM. Agilient spun off Hewlett -Packard a number of years ago so esentially these are the same family of instruments. My experience with these devices has let me learn a thing or two about the "Quirks" in these supplies.
1) Verifiy that both devices have the latest FirmWare from Agilient!
2) Many moons ago there was a programming language called HPSL (for HP Power Supply Language). Most of the 66xx family still has support for commands sent in this language (the 6632 uses identical commands but calls the language HPVSL) and I have not seen a driver for this family (that I didn't write) that queried SYStem:LANGuage? or set it during initialize. Verify the supplies are expecting SCPI commands as the driver uses SCPI.
3) Look at the string you are sending with a \codes display. An extra whitespace character in your string will be interperated as a null parameter (out of range)
4) ALWAYS start a SCPI command at ROOT ":"
5) read Section 2 of the programmers guide "intro to SCPI" carefully and completely.
6) check the control resolutions and labels in the driver sub-vi's and double check enumerated types used in them (I've been through enough headaches w/ Agilient drivers)!
Good hunting!
02-17-2009 06:15 PM
The problem I encountered in the past with the Agilent/HP LabVIEW driver was the Configure.vi. Since this driver is universal for an entire family of power supplies the default value of the 'Overvoltage prot value (50 Volts)' is actually set to 50 my 6642 would error with the -222 code. I created a control for this and set it to 20 volts and it cleared up the problem. The 6642 is only rated 0-20 volts and 0-10 amps. Setting the 'Protection (None 0)' did not make any difference. I would create a control for that Overvoltage control and set it appropriately.
Hope this helps.
02-18-2009 04:41 AM
Hi,
The reason it works the first time but not the second is because you have closed the Session handles to your instruments inside the loop
BUT your instrument initialize VIs are outside the loop so they never get Initialised again.
You need to move the Close.VI outside the loop.
Regards
Ray Farmer
02-18-2009 06:29 AM
Hi,
With the 66xx driver (you supplied), you need to make sure you set the Query to TRUE, because the Initialize VI stores the model number in the USER DATA of the session. If you dont query, then I am guessing the model number is going to be 0.
( I think in your example the Query control is default set to TRUE and as you have left it unwired it will be performing a Query)
In the Configure VI the model number is obtain from the USER DATA and a search in a 1D array is used to get an index, relating to the position of the Model number found in the array. This index is used to obtain the various MAX Voltage and Current settings.
You will need to check that you are picking up the correct Model number and that this is a valid model number in the array.
If this index is not the correct value, for what ever reason, eg incorrect model model, model number not in the array etc, the wrong MAX values are going to to be used.
Hope this helps to resolve your problem
Regards
Ray Farmer
02-19-2009 12:08 PM
Hey Ray,
Taking Close.VI outside the loop really worked... 🙂 ...Thankyou very much..........
regards,
Sandesh R
02-19-2009 12:09 PM
Hi All,
Thankyou verymuch for such quick responses......
regards,
Sandesh R