LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting values other than time on X-axis

Hey all,

I would like to plot dB (or Pascals) vs Frequency, the time averaged frequency that is. I am thinking of using the Timing and Transition Measurements vi which outputs frequency and the DAQ Assistant VI which outputs Pascals vs Time and tying these output together and asking the Waveform graph vi to plot Pascal (from the DAQ) vs Frequency (from the TTM). But I am having the following problems
  1. the VI's I have come across do not allow me to change the values on the x axis.  I have looked at this discussion forum: http://forums.ni.com/ni/board/message?board.id=170&message.id=38706&query.id=123293#M38706 but I don't know how or if it applies to me.
  2. I don't know which VI gives me the time averaged frequency of a signal
I am using the NI-9234 DAQ card and the DAQ Assistant.vi to accept the data from the device. I have tried the SVFA Freq Response VI, the Waveform Chart and Graph VIs and the FFT Spectrum VI to no avail.

Any help you geniuses can offer would be greatly appreciated.

struggling researcher
swilson
0 Kudos
Message 1 of 7
(3,557 Views)

You may want to look at an XY graph instead.

To change the values of a waveform graph, you can change the properties of T0 and dt for the X-axis.  Waveform graphs are based on a series of equally spaced points.

0 Kudos
Message 2 of 7
(3,555 Views)
The Waveform Graph is based on the premise that your X data is evenly spaced. It does not need to be time. It can be anything. You need to specify a starting point for X, a delta X, and the Y values:

Of course, you can always use an XY graph.

EDIT: Sorry for the double answer. Was distracted while composing reply and Ravens Fan answered while some pesky person was bothering me. Smiley Very Happy


Message Edited by smercurio_fc on 07-15-2008 04:24 PM
0 Kudos
Message 3 of 7
(3,552 Views)
Exactly where can I find the dt and T0 settings?
0 Kudos
Message 4 of 7
(3,549 Views)
From your data. As the figure shows, you need to create a cluster of 3 elements. The first element is the starting value of X. The second element is the change in X. The third element is the Y values. Then you feed that cluster to the Waveform Graph. So, if you were sweeping frequency from, say, 100 Hz to 1000 Hz in 10 Hz steps, you would create the cluster so:


Again, this assumes that your X data is equally spaced.

Please see the examples that ship with LabVIEW. Open the Example Finder (Help -> Find Examples) and search for "graph". There is an example called "Waveform Graph" that shows you several ways of generating a waveform graph.


Message Edited by smercurio_fc on 07-15-2008 05:08 PM
0 Kudos
Message 5 of 7
(3,540 Views)
Thanks!!! I see what you are talking about. But before getting your response I decided to try the XY graph but I encountered this problem:
  1. Out of my DAQ, I have 'data' coming out which is Pascals vs Time info (dynamic). Then out of my "Transition-Timing Measurement" vi I have Frequency (dynamic data). When I bundle them using the bundling node, the output of the node is not compatible with the input of the XY graph. I am thinking I need to "strip" the pascal data from the Pascals vs Time data and use that as input into the XY graph. Any suggestions?

Now when I tried to use the Waveform Graph.
I tried the "FInd Examples" that you mentioned above but somehow they don't have a step by step explanation of this. Where can I go for step by step explanantion of things. For instance, the specifying of x0 and T0 on the Waveform Graph vi example, how exactly is that done? Do I right click and add a special vi or what?
0 Kudos
Message 6 of 7
(3,513 Views)

@swilson wrote:
I tried the "FInd Examples" that you mentioned above but somehow they don't have a step by step explanation of this. Where can I go for step by step explanantion of things. For instance, the specifying of x0 and T0 on the Waveform Graph vi example, how exactly is that done? Do I right click and add a special vi or what?

You still do not understand. The code I showed you above is exactly how you specify the starting X value for your data. If you are referring to setting the scale min/max, that's a different thing. The Waveform Graph example shows several examples of using the Bundle function to do the same thing.

You cannot wire dynamic data like that. Dynamic data can be wired directly to a waveform graph terminal, as it contains the necessary waveform information. If you need to extract particular components of the dynamic data then you need to convert it using the From DDT function (in the Express -> Signal Manipulation palette).

I have no idea how you're collecting your data, but it makes no sense to me that you have Pascal vs Time, and a separate Frequency list and you want to plot Pascal vs Frequency. What is the relationship between Time and Frequency? I also have no idea what you mean when you say "time averaged frequency" as you said in your original post.
0 Kudos
Message 7 of 7
(3,504 Views)