LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a real-time graph

I'm starting out by collecting data from lab equipment that gives me intensity per wavelength.  There are 3648 data points that make up the wavelength range.  I know how to make a graph of Intensity on the Y axis and wavelength on the X axis.  What I need to do is isolate one wavelength data point and graph it's change in intensity over time.  I'm using the Extract Portion of Signal VI to isolate the correct wavelength and its corresponding intesity.  What I need to do now is graph the isolated intensity values over time.

 

I've tried showing this using a Chart VI and selecting Strip Chart in the Update Mode, but what keeps happening is the chart shows intensity on the Y axis and data points on the X axis.  I would like the chart to update live and show time on the X axis.  What am I doing wrong?

0 Kudos
Message 1 of 9
(5,920 Views)

If your points are equidistant in time, a chart is appropriate. What you have to do is to configure it to display the proper x axis scale. You can edit the scale parameters and adjust t0 (offset) and Deltat (multiplier) : right-click on the chart > properties > scales > scaling factors. 

The same operation can be done programmatically using the corresponding property nodes.

Hope this helps. 

Message Edité par chilly charly le 09-13-2008 06:56 AM
Chilly Charly    (aka CC)
Message 2 of 9
(5,903 Views)
My problem is not with the scale of the x-axis.  My problem is that the x-axis is displaying wavelength data points no matter what I select in the properties tabs.  I am trying to get time on the x-axis.  How do I do this?
0 Kudos
Message 3 of 9
(5,868 Views)

Trying to understand the problem... You have either a 2D array with wavelength values in one column and a second column with intensity (amplitude, absorbance, transmittance,...) values. Or, alternatively you have two 1D arrays containing respectively the wavelength and the intensities.

You know how to plot intensity against wavelength.

Your measurements are reproduced at various times, generating additionnal colums of amplitude data. You can plot these data on the same graph, generating a series of stacked plots.

And you want to select a given wavelength, retrieve and plot the intensities as a function of time (or measurement index).

If this is correct, could you give us a sample of your data ? 

Attached is an example, where a cursor is used to select a specific wavelength on the I = f(Lambda,t) graph, before plotting I = f(t) for this specific lambda.

 

Message Edité par chilly charly le 09-15-2008 06:16 PM
Chilly Charly    (aka CC)
Download All
Message 4 of 9
(5,855 Views)

Here is the program that I am using.  You cannot run it because you don't have the lab equipment that I am using.  However, I've added the final Excel fial that is recorded called Fog.  This spreadsheet, which includes a graph of the data, is the end result of the entire program.  What I want to be able to do is see that graph update live through LabVIEW.  Currently when we try to hook up the the time and intensity (irradiance) signals into a XY graph or a chart, we get a Irradiance over Wavelength graph.

Download All
0 Kudos
Message 5 of 9
(5,834 Views)

Convert the output of the Extract Portion of Signal into a scalar, using the from DDT function (in the Express vis/Signal manipulation subpalette).

Wire directly the scalar to a chart. Adjust the x scale as I told you in my first reply.

 

Run away from Express vis as soon as you can. They were not designed to work with scalars. They make complicated things easy and easy things complicated...

 

One additionnal comment : How can you be sure your deltaT value is equal to 1/72 ? How do you take into account the time spent to process data once the spectrum has been acquired ?

Message Edité par chilly charly le 09-16-2008 02:51 AM
Chilly Charly    (aka CC)
Message 6 of 9
(5,825 Views)
Thanks!  That was exactly what I needed.  Graph is running now.
0 Kudos
Message 7 of 9
(5,782 Views)
Glad you could solve your problem. But you didn't answer my question... 😉
Message Edité par chilly charly le 09-17-2008 07:04 PM
Chilly Charly    (aka CC)
Message 8 of 9
(5,774 Views)

Hi,

 

Recently I am using labview to display a series of values in an excel onto a chart. I was able to display all the values of the excel values on a chart. However for my chart, I am unable to set my x axis to real time value, like example setting x-axis scale to follow windows system's time. Is there anyway I can do so?

 

TW  

0 Kudos
Message 9 of 9
(4,978 Views)