From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot/graph impedance vs frequency

Hi,

 

I'm a newbie to labview programming and so as in communicating with any lab instruments using labview.  

 

To help me get started and become familiar with the Labview programming environment, I was asked to study and create an individual program for each of our Lab Instrument.

 

And one of my task is to create a program for our LCR Meter (E4980A) that can graph impedance vs frequency for a given DUT and will allow the user  to set the sweep frequency using text boxes and a button to start/stop the test.I have found an example from NI and have it as my reference in doing the program. But my problem now is how to graph/plot the measured impedance & frequency . Kindly see the attached VI.

 

 

Thank you.

 

 

Geng

0 Kudos
Message 1 of 2
(4,356 Views)

Your question is more of a LabVIEW programming question rather a question about instrument control, so you'd probably get bettter visibility by posting in the LabVIEW forum. But, since we're here... In order to graph something vs something you need an XY graph. Right now you have a waveform graph and are only graphing your (presumably) frequency points. With a waveform graph this will simply graph frequency vs point#, and thus will simply show your frequency values. There's an example that ships with LabVIEW showing you the various types of graphs and how to build data for them.

 

A few tips regarding the code:

  • You should not put operations which take a long time inside of event cases. The event structure should handle the UI and thus return as soon as possible to responding to UI events. As it is, the UI will be completely unresponsive until the operation finishes, which could take a long time. You should look into using the Application Design Patterns: Producer/Consumer architecture as an alternative.
  • Your front panel controls will only be read at the start of the program. If you change their values and then click the Start button, the code will not "see" the new values since they are being fed the original values through tunnels. If you want to use the current values then you need to place the terminals inside the structure.
0 Kudos
Message 2 of 2
(4,349 Views)