LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write and read from The Agilent E3631A Power Supply- Pls Help

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

 

0 Kudos
Message 1 of 17
(13,629 Views)

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.)

Message Edited by James W on 09-16-2008 12:59 PM
Message Edited by James W on 09-16-2008 01:00 PM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 17
(13,611 Views)

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.

Message 3 of 17
(13,595 Views)

Thanks Both of you...

 

How i can avoid this jumping between read and write.

Bcos i need to write and read.

 

Pls do reply 

 

0 Kudos
Message 4 of 17
(13,577 Views)

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.)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 5 of 17
(13,565 Views)

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.

Message 6 of 17
(13,545 Views)

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.

 

- tbob

Inventor of the WORM Global
Message 7 of 17
(13,521 Views)

Hi smercurio,

 

Thanks for the link...it is very useful

 

Thanks alot

0 Kudos
Message 8 of 17
(13,508 Views)

Hi Tbob,

 

Thanks for the attachment 

But I am unable to open the "E3631SetRead.vi" because of labview version

mine is Labview 8

0 Kudos
Message 9 of 17
(13,504 Views)
You can download updated drivers from the Instrument Driver Network. As noted, just search for your model number. You should get either the "Plug and Play" version of the "Project-Style" version depending on how you're organizing your code. Both are available in 8.0.
Message 10 of 17
(13,495 Views)