09-16-2008 04:11 AM
I am beginner to labview |
Trying to control Agilent E3631A power connected through GPIB using Labview8 |
It able to set the voltage to the Power supply(PS) as well as read output from the PS separately (Different program). |
But not able set voltage and read the voltage from the PS in one program |
|
Below attached all three set of code |
1) set the voltage |
2) Read the voltage |
3) set and read the voltage |
|
Pls help onthis problem |
|
Appreciate your reply |
|
Regards |
Jshyl |
|
09-16-2008 06:58 AM - edited 09-16-2008 07:00 AM
I used to use this device on a daily basis but never liked the driver Agilent/HP provided. I prefered to writed my own driver using the GPIB commands. I've just moved company now and don't have access to the software anymore, so you can't have a copy - sorry.
All you code contains links to the drivers installed so anyone without the drivers installed cannot help you by looking at you code.
Try looking at the manual on the agilent website http://cp.literature.agilent.com/litweb/pdf/E3631-90011.pdf (especially starting from P47
Basically:
MEAS:VOLT: DC? = take a voltage reading (no space - turn into a face if put colon before cap D like This : 😄 )
MEAS:CURR: DC? = take a current reading - ditto -
*RST will reset to defaults
P6V = CH1, P25V = ch2 N25V = CH3
OUTP ON (or OFF) will turn on (or off) the outputs selected
(Don't forget if you write your own code, check the commands work in MAX, then a Query = Write then Read, Pretty much every other command is a write.)
09-16-2008 11:08 AM
More than likely what's happening is that the code is jumping between a read and write while it's in the middle of reading. Remember that reading usually involves two steps: (1) send command to request reading; (2) read. If you jump to sending another command after (1) the instrument can get confused. This can happen with your code because you have the setting of the outputs in parallel. Force a sequential operation on all the VIs.
Also: You really should wire the error cluster through.
09-16-2008 07:58 PM
Thanks Both of you...
How i can avoid this jumping between read and write.
Bcos i need to write and read.
Pls do reply
09-17-2008 04:14 AM
I used to Write my Query Command e.g.
MEAS:VOLT:DC?
then wait for a period of time (say 50ms +)
then Read back the number of Bytes that were required.
I think the driver reads about 50-60 bytes - you can check by looking at their code and make it yourself, but make it work for you and get it doing exactly what you want.
(Don't forget to use the error cluster to sequence things as this will tell you when you have finished reading or have got an error.)
09-17-2008 08:50 AM
Jshyl wrote:Thanks Both of you...
How i can avoid this jumping between read and write.
I've already told you. Use the error cluster to wire the VIs in sequence. Dataflow will dictate what executes when. You can also use the VISA resource wire. Instead of branching it out the way you do, wire it out->in->out->in... However, you should not ignore the error cluster.
To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
09-18-2008 04:05 PM
You must have a different set of drivers than I for the E3631. Here is the way it is done with my drivers. The library is called E363x. The attached vi shows proper use of error wires. These are necessary in case an error occurs. How else are you going to know if an error occurs? Anyway, just substitute your drivers if different. They basically perform the same function. I got my drivers from the NI website. Search for Agilent Drivers, E3631.
09-19-2008 02:49 AM
Hi smercurio,
Thanks for the link...it is very useful
Thanks alot
09-19-2008 02:53 AM
Hi Tbob,
Thanks for the attachment
But I am unable to open the "E3631SetRead.vi" because of labview version
mine is Labview 8
09-19-2008 09:10 AM