09-01-2008 05:20 AM - edited 09-01-2008 05:22 AM
Hi,
I'm a very new LabVIEW 8.5 user. I wish to add user controlled limit lines to a waveform graph. Is there an easy way to accomplish this or a freely available example?
The wavefrom graph in question displays data from a Rhode and Schwarz FSP 30. I can't use an express XY graph due to the VI's supplied for the FSP30. The measured spectrum is outputted as a 3 element cluster. Can a waveform data type like this, x0, xt, y array, be converted so it can be displayed on an XY graph? I ask this to provide an alternative way of adding limit lines if it cannot be done with a waveform graph.
Any help would be greatly appreciated,
Sean
09-01-2008 05:28 AM
Hi Sean,
you can draw your limit lines, if you add a new channel to your graph. This channel has the fixes limit value. You can also use Cursors in a graph, maybe this helps. You can convert your data to xy, you have already the y values and you can calculate the x values. You can also use the ready function "Waveform to xy Pairs.vi".
Hope it helps.
Mike
09-01-2008 06:01 AM - edited 09-01-2008 06:02 AM
Hi MikeS81,
Thanks for the speedy reply. I'm afraid cursors won't help as the limits vary according to frequency. Can you recommend an approach to adding the limit lines? Should I create an array with the the limit lines xy values and, if so, how do I add this to the pre-existing waveform graph as a second plot? (Which propery node will I address?)
Thanks for the help so far. I will look into "Waveform to xy Pairs.vi" as well.
Sean
09-01-2008 06:03 AM
Hi Sean,
read the old waveform, add your limit line and write it back to your control.
Mike
09-01-2008 06:20 AM
Mike,
If I append the limit line data to the original signal I think I'll encounter two problems. The first is a minor one. The graph is saved using the Export Image function and the limit line, for report making purposes, has to be a different colour to the data. If I append the limit line data to the signal won't it be treated as one plot and hence be the same colour? Secondly, as I mentioned in the first post, the data is not in the form of XY points (it is as shown below). I should have made it clear that this is my main problem (my bad). I don't think I can use the "Waveform to XY Pairs.vi" either.
Sean
09-01-2008 06:32 AM
Hi sean,
see the attached picture please, it shows how you can transform your waveform graph to a xy-graph. Yes you are right, if you add the limit as an extra channel, then the color of some channels after this can change.
Hope it helps.
Mike
09-01-2008 06:40 AM
Thanks Mike,
I'll use your example to create an XY graph from the waveform data available, and add the limit lines on another channel. This may be a bit compliated but the FSP VIs aren't passworded so I can easily acces the trace points and data.
Issue resolved (hopefully),
Sean
09-01-2008 09:10 AM
Search the example files for limit.
C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Limit Testing Measurement.vi
C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Frequency Analysis of a Filter Design.vi
C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Limit Testing for Unevenly Sampled Data Measurement.vi
C:\Program Files\National Instruments\LabVIEW 8.5\examples\Waveform\Operations.llb\Waveform Scalar Limit Comparison example.vi
09-01-2008 02:18 PM