Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling power supply via LabVIEW with either GPIB or RS232

Hi:

  I am trying to control a power supply( Agilent E3649A ) via LabVIEW through GPIB-USB, or RS232-USB interface.  I have googled several websites, but still do not have a clear idea of how to implement such task.  From what I know:

I need to download drivers for power supply Agilent 3649(http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9184659CE034080020E748...), but other than that, I really don't have a clue as how to proceed.

 

My question is:

1. Is there any other driver I need to download?  

2. Is there an existing simple example in vi file for my purpose/application?

3. Should I even need my USB-6251 for performing such task?

 

 

Thanks.

Jason

 

0 Kudos
Message 1 of 12
(21,187 Views)

Hello Jason,

        You will need to install the NI-VISA driver and the NI-488.2 driver to communicate with your instrument over GPIB-USB (which I strongly recommend over RS-232).  You might have those already installed on your system if you ran the NI Device Drivers DVD.  Once those are installed, you should configure the instrument in Measurement and Automation Explorer (MAX).  If you run into problems here, I recommend that you give our Applications Engineers a call (ni.com/support).  After configuring the instrument, you should verify communication with the instrument in MAX.  It will then be time to try communicating in LabVIEW.

       I recommend that you use the newer LabVIEW driver, which is "project-style."  The best way of getting started is running some of the examples that are included in the driver.  If you use the newer driver, the examples will show up in the NI Example Finder.  If you encounter problems when using the instrument driver, please go through the steps listed in the Instrument Driver Troubleshooting Guide

 

Cheers,

 

NathanT

0 Kudos
Message 2 of 12
(21,164 Views)

Hey Nathan:

  Thanks for the advice!  I still have several questions regarding this simple implementation...

 

So:

 1. If the port at my PC side is a USB, do I still have to install IEEE 488.2 driver?(The port of power supply is GPIB)

 2. Is there anyway I could find out whether I have all the drivers installed (since PC I am using is somelse's, and I wasnt the one who installed the Labview program)

3. I tried using Instrument I/O assistant, but was informed it is not installed correcttly??  Does this mean I have to re-install the whole thing?

4. If the port on my PC side is USB, I do not have to buy any GPIB board, and etc. right?

 

Thanks.

Jason

0 Kudos
Message 3 of 12
(21,090 Views)

1. If you are going to use an NI USB-GPIB controller, you need NI-488.2

2. Open MAX (Measurement & Automation Explorer) and see what is installed.

3. Check MAX

4. You have to buy the NI USB-GPIB controller.

Message 4 of 12
(21,080 Views)

Hello Jason,

        It looks like Dennis answered your questions and I just have one thing to add:

 

How Can I Fix an "Instrument I/O Assistant Not Installed Properly" Error?

 

Cheers,

 

NathanT

0 Kudos
Message 5 of 12
(21,076 Views)

Hi:

  Thanks for the tutorials and info.  Now I could succesfully control the output of power supply through Labview-USB-GPIB using cable,driver from NI.  However, I found out that there seems to have some lag between the time I change the voltage and corresponding reaction from power supply.  Could anyone please provide me on how to have the response faster??  Attached is the code.  Thank you very muchSmiley Happy.

0 Kudos
Message 6 of 12
(20,983 Views)

You should not have the Initialize and Close inside the loop. These should be outside the loop. I would also suggest using an event structure inside the loop so that you only perform the action when you actually change the front panel control's value. Otherwise, you're always sending the command, which is pointless.

 

As for the "slowness", this is most likely due to the fact that you are using a higher-level VI that's changing the voltage, current, overvoltage setting, overcurrent setting, overvoltage protection state, overcurrent protection state, output state, whether you want fries, whether you want an apple pie or a cherry pie, whether you want a diet soda... This is the main thing I HATE about the older style instrument drivers, which appears to be what you're using. These had these monolithic VIs that changed half a dozen parameters when all you wanted to do was change the voltage. I don't know if the "project-style" ones are better in that there is a single VI to say, just change the voltage. You should still look at the project-style ones as those are the preferred drivers over the LLB ones. If neither of these has it then you can just find the code that sets the parameter you want to change and make that into its own subVI.

0 Kudos
Message 7 of 12
(20,974 Views)

Hi:

  Thanks forr the help , and I solved the problem!  Now I need to use PID vi for my application in Labview, and found there is nothing installed when I go to "control design & simulation" or "addons" in my labview 8.6!!  Could anyone please tell me where to download these things such as PID vis?  Thank you very much.

Jason

 

0 Kudos
Message 8 of 12
(20,854 Views)

Like shown in this comparison table, the PID toolkit is shipped only with the Developer Suite. Therefore, you must buy it separately.

0 Kudos
Message 9 of 12
(20,832 Views)

hey Knight of NI  Knight of NI

KNIGHT OF Ni, 
 
 

i just want to know if  NI USB-GPIB controller is necessary in order to controlled the power supply in LabVIEW

0 Kudos
Message 10 of 12
(10,373 Views)