Showing results for 
Search instead for 
Did you mean: 

Question: Add limit lines to a waveform graph


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,



Message Edited by sean_cork on 09-01-2008 05:22 AM
0 Kudos
Message 1 of 9

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".


Hope it helps.


0 Kudos
Message 2 of 9




Message Edited by sean_cork on 09-01-2008 06:02 AM
0 Kudos
Message 3 of 9

Hi Sean,

read the old waveform, add your limit line and write it back to your control. Smiley Wink



Message 4 of 9


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" either.



FSP data output to waveform graph



0 Kudos
Message 5 of 9

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.


Message 6 of 9

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),





0 Kudos
Message 7 of 9

Search the example files for limit.


C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Limit Testing

C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Frequency Analysis of a Filter

C:\Program Files\National Instruments\LabVIEW 8.5\examples\measure\maxmpl.llb\Limit Testing for Unevenly Sampled Data

C:\Program Files\National Instruments\LabVIEW 8.5\examples\Waveform\Operations.llb\Waveform Scalar Limit Comparison

Message 8 of 9
Remember that you can also draw on the graph if you don't want to add additional plots for your limit lines. Here's an example which draws lines interactively, but you can easily modify it to draw the lines programmatically.
Message 9 of 9