Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent E4980A LCR meter automation using Labview.

Hello,

I want to measure capacitance and resistance in a frequency domain. The maximum number of measued data is 200 in this LCR meter. for example from 100 Hz to 300 Hz we wıll have the C and R values at 101 Hz, 102Hz,....300 Hz  which is 200 values. because of this I want to to do frequency sweep in small domaıns in order to obtain more data. for example frequency sweep from 100 to 150 Hz and obtain 200 data and write them, then change the frequency sweep from 150 to 200 and do the same thing. the example code will be like this:   insert initiate frequency&sweep domain  (for eg. 100 Hz, 50Hz) --------->100 Hz- 150 Hz -------->measure and write C and R values in Excel (200 values)----> change the frequency (150Hz to 200 Hz)----> measure and write C and R in the same Excel ----> do this until a defined frequency( for example 500 Hz)     I downloaded all visa and keysight drivers needed. I connected the device to the labview.

I will apperciate any guidance.   Thank you in advance  

0 Kudos
Message 1 of 8
(7,809 Views)

Hi PA65

 

It sounds like the first step will be determining how to collect and store the data in LabVIEW. Do you know what VISA commands you need to issue to the LCR meter? I would take a look at an example such as GPIB with VISA functions which can be found by going to Help >> Find Examples... >> Browse >> Hardware Input and Output >> VISA and see if you can work from one of those.

 

Once you have the data collected and stored as an array perhaps, you can write to a spreadsheet with one of the VIs mentioned here:

http://digital.ni.com/public.nsf/allkb/1678E94CB6FC508C86256C2200771468

 

You will have more VIs available to you with the Report Generation Toolkit.

 

There are also links to more specific examples at the bottom of that page.

 

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 2 of 8
(7,788 Views)

Hi 

Thank you for your reply. 

I am using keysight driver Labview package instead of Visa.  I am trying to do a frequency sweep. I wrote a code which uses single mesurment command in a FOR loop which adds a specific amount to frequency amount and then again conducts another single mesurment and gave the results at the end of loop. The problem here is that  it takes long to obtain data.  In LCR meter device there is SWEEP option that is more faster. Also in driver package Vi's  there are "configure list sweep" and "configure list band" Vi's. In order to control a sweep in device I think I should use "configure list sweep"  Vi instead of single mesurment.  But i have problems with input and output of these vi's.  What I am trying to do now is : A frequency sweep from F1 to Fn then obtain 2 different output (such as C and R) for each frequency using Agilent E4980 driver vi's. 

 

Thank you 

0 Kudos
Message 3 of 8
(7,763 Views)

Have you had a look at the Read Measurement List Sweep example? You should be able to find it here:

 

Help >> Find Examples... >> Hardware Input and Output >> Instrument Drivers >> LabVIEW Plug and Play

 

It uses the list configuration VIs so you can se what inputs they expect.

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 4 of 8
(7,754 Views)

Hello Dale 

 

Yes I have tried that example. It doesnt have the outputs. It sweeps between 3 frequencies and has high and low limit bands (which I dont know what these bands are)

My problem is that I do not know how to get my outputs (Cp and Rp) for sweeped frequencies. Do you know how I should modify this example?

Thank you for your reply

 

0 Kudos
Message 5 of 8
(7,747 Views)

I've had a chance to look at the example a bit more closely now. It looks like the drivers can overcome the 200 point limit for you (from what I can tell). The example seems to gather 1000 data points between 100Hz and 200Hz, then 2000 data points between 100Hz and 200Hz and then 5000 data points between 100Hz and 200Hz.

 

As for choosing measurement type, I took a look at the other included example and saw that it uses the Configure Measurement vi to select a Function (one of them being Cp-Rp). Your data should then be returned by the Fetch Measurement Data (In the Primary and Secondary Parameter arrays). If you place this after the Initialize vi I think it should work.

 

I would like to verify that this is correct, but I do not actually have the hardware available to me.

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 6 of 8
(7,739 Views)

Hello dear Dale 

 

In that example the sweep is between 3 points. 1000 , 2000, 5000. It does not give the 2000 data. 

I think I almost finished the code. After finalizing it I will publish it here for those who one day may need it.  Thank you for your consideration and time dear Dale. 

Inside the code I have a problem: 
I converted an 3x2 array to 2x3 array by transpose 2D array, then I used "array to spreadsheet string" vi  to convert my 2x3 array to string. The string format is %f. The array consists of numbers and text like:

frequency       capacitance      resistance
100                  10                     100

when I try to write the data on text file the number at middle becomes 0. I used probes for debugging. I found out that the problem is in output of the "array to spreadsheet string"vi.  Input data ( which is a 2D array) is ok but in output (which is a string) the middle data are zero!! I can not find the reason.

 

 

 

 

0 Kudos
Message 7 of 8
(7,714 Views)

Awesome, thanks!

Dale S.
RF Systems Engineer - NI
0 Kudos
Message 8 of 8
(7,671 Views)