LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To connect a Power Supply over RS-232 in LabView

Have a nice day,

dear friends, I have done some basic programs before in LabView, my project is now to connect Agilent E3631A DC Power Supply serially and sending/recieving data(my aim to change input voltage from the computer without touching the hardware device).

I actually already connected the Power Supply to my computer ,I also downloaded driver of it from Agilents web site.
So the only thing is now to establish the connection in LabView.

hmmm. can you please tell me what to do now ? I have no idea if I should choose VISA or DAQ or sth else.. how can I let the LabView to send a new voltage to the hardware.

With best wishes



Message Edited by Support on 11-09-2007 08:29 AM
0 Kudos
Message 1 of 23
(6,887 Views)
Hai

The drivers you have downloaded, is the driver a dll or VI's? if the driver is a dll you will have to use the inbuilt functions by calling the "Call library function node", else use the vi's supplied by the power supply to send the commands, chek the input for the driver vi, and enter it appropriately, i guess thats it

Arun
Message 2 of 23
(6,877 Views)
The "driver" you downloaded isn't really a driver. (not like a hardware driver for your video card) It's really just a set of VIs that let you communicate with the instrument.

If you look on your functions palette from the block diagram, there's a sub palette named "Instrument I/O" and a sub palette of that one named "Instrument Drivers". In this drivers palette, you should see a palette for the drivers you installed for the power supply. There should also be a sub palette in there named "Applicaiton Examples" that can help you get started.

Any communication over the serial port will use VISA functions.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 23
(6,875 Views)
Hi,

find attached a very simple made vi ( using GPIB ) but it's trivial to change into serial with VISA.
If you need further help ......... let me know.

Hope this helps a little bit.

Regards
Werner
0 Kudos
Message 4 of 23
(6,769 Views)
Dear friends,

Thanks alot for your fast reply concerning my question. After installing LabView 7.0 and VISA Now I have concrete questions. Do I need some more program to install ? ( drivers I already found from ni.com )

first of all I installed LabVIEW Evaluation version 7.0 , and I can`t open sources which are written with ver. 7.1 , how can i handle this problem ? ( because somebody sent me some codes which are written in 7.1 and I definetely want to see them )

second; should I use VISA or IVI ? whats the difference between them ?

third; lets concider that I use VISA . From the IO Config menu, I choose COM 2 and VISA interface name is than ASRL2(automatic).
And than from VISA Assistant, I choose the place of the driver of my Power Supply. Up to now everything seems to be ok.

what is the next step after here ? Do i forget some configurations ?

I simply want to send 5 Volts as output from the power supply and read it with LabView.

Thank you very much for your help.

Best regards



Message Edited by Support on 11-09-2007 08:30 AM
0 Kudos
Message 5 of 23
(6,815 Views)
I cant run your codes because they are written with LabVIEW 7.1 and I have the version of 7.0 !

what can I do to run your codes ? I really would like to see them.

Best Regards



Message Edited by Support on 11-09-2007 08:30 AM
0 Kudos
Message 6 of 23
(6,704 Views)

After installing LabView 7.0 and VISA Now I have concrete questions. Do I need some more program to install ? ( drivers I already found from ni.com )

You should have everything you need to do serial communications installed. The drivers you downloaded should help you get started with your applicaition, so I'd install them as well.


first of all I installed LabVIEW Evaluation version 7.0 , and I can`t open sources which are written with ver. 7.1 , how can i handle this problem ? ( because somebody sent me some codes which are written in 7.1 and I definetely want to see them )

You can save VIs to the previous version only. So will need to have somebody save the code to 7.0 for you.


second; should I use VISA or IVI ? whats the difference between them ?

At this point, I wouldn't worry about IVI. The drivers you downloaded are probably "IVI Drivers" but use VISA to communicate with your instrument. If you want to know a bit more about IVI in general, just do a search on ni.com for "IVI".


third; lets concider that I use VISA . From the IO Config menu, I choose COM 2 and VISA interface name is than ASRL2(automatic). And than from VISA Assistant, I choose the place of the driver of my Power Supply. Up to now everything seems to be ok. what is the next step after here ? Do i forget some configurations?

The first step is to initialize the port and instrumnet. If you look on your functions palette from the block diagram, there's a sub palette named "Instrument I/O" and a sub palette of that one named "Instrument Drivers". In this drivers palette, you should see a palette for the drivers you installed for the power supply. There should also be a sub palette in there named "Applicaiton Examples" that can help you get started. There should be one or two examples that will allow you to control the power supply, and you should be able to open the block diagram and see how it's put together.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 7 of 23
(6,805 Views)
Dear Ed Dickens,

I did (probably) everything that you wrote me, BUT ,

from Measurement & Automation Explorer I can NOT send any commands to my hardware ! what can be the problem ?
you think i didn`t install the drivers correctly ? I think i did it correct , because in LabView code , I can see from I/O Assistant , I can see a exactly my power supply. But why can`t i send commands from MAX ?
How this error can be corrected ?

Once happend that I got error light on in the hardware , it was first -113 , than -110 than sth else than sth else !

why do I get so many different kinds of error ? I will get crazy if I cant write HELLO in the display of power supply...

with BEst regards
0 Kudos
Message 8 of 23
(6,798 Views)
I just re-read your original message, and it looks like you downloaded the IVI from Agilents web site instead of NI web site.

If this is what you did, try downloading the drivers from NI here. After the file is downloaded, just double click on it to install.

This will install the sub menus as shown in the attached image, where you’ll be able to get to the example applications as show in the image. You should be able to communicate with the power supply using these.

I have not used this particular power supply, so I'm not familiar with its error codes or serial protocol in general. Why are you trying to send commands from MAX? The IO Assistant "should" be easier for sending single commands. And the drivers will let you do everything you need to.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 9 of 23
(6,795 Views)
Dear Edwin Dickens,

your question;

" Why are you trying to send commands from MAX? The IO Assistant "should" be easier for sending single commands. And the drivers will let you do everything you need to. "

my answer;

I used MAX to be sure that I had the physical connection , to see if I can send some data and/or get responce from the device at all.Because before that I was not sure if I installed the right drivers of the DC Power Supply.
Actually my desired idea is, to connect the power supply to a test code which is written in LabView. The test code should read the actual DC current from the device, and use the actual result in the test case.

my question;

" I just re-read your original message, and it looks like you downloaded the IVI from Agilents web site instead of NI web site "

The specific power supply is from Agilent`s ,why do i need also drivers from NI ?
So far that you know what I am trying to do, please tell me what I exactly need.(softwares and drivers)

thank you very much for your answers,I feel like I have a supervisor.GREAT !


my questions seem to be continued...
0 Kudos
Message 10 of 23
(6,782 Views)