LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add plot to a graph

Hi everybody,

I first a plot on a waveform graph. I want then to add on the same graph a second plot (in my case an exponential who gives the enveloppe of my signal) as you can see in the image attached.



I cannot draw the first plot and then the second plot. The second plot erase the first one. I also try with active plot property but it doesn't seems to work.
I also attached a test VI

Can anyone help me?

thanks in advance



Message Edited by valais on 05-20-2008 07:02 AM
Download All
0 Kudos
Message 1 of 6
(8,093 Views)

Hi valais,

write both channels at the same time, same as with your other waveform graph. Smiley Happy

Mike

0 Kudos
Message 2 of 6
(8,085 Views)
Thanks for your answer Mike,

In fact I don't want to write both channels at the same time. Because in my case, the first plot is a measurement, and I want to draw the enveloppe after. The enveloppe is in an another case event. So the event are separeted.

I try to use active plot like that, but the result is only the second plot. I don't have anymore the first plot.


Any idea?



Message Edited by valais on 05-20-2008 07:21 AM
Download All
0 Kudos
Message 3 of 6
(8,080 Views)

Hi valais,

you have to write the second channel, so that the graph has the correct dimension. I use an array of "NaN" for that and replace it later with the new values. See the attached example.
Hope it helps.

Mike

0 Kudos
Message 4 of 6
(8,068 Views)
Any time you write a Value property to a Graph, you overwrite all data in the graph.  The Active Plot property is used to select a plot to set such things as line style and color.  To do what you want to do, you must write both data sets to the graph at the same time.  Save the original data in a wire or shift register until you need it.  Alternately, you can write it to the graph and use the Value property to read it before combining it with the new envelope and plotting again.  As mentioned before, on your first write, you will need to create a dummy waveform composed of NaNs as a placeholder to get the graph data type correct (2D array, array of bundles of arrays, array of waveforms, etc.).

Let us know if you need more help.
0 Kudos
Message 5 of 6
(8,043 Views)

Hello 2 all !

 

I'm faced with the same problem as stated in this post.

 

I still don't understand hot to handle the display of two waveforms using a case structure.

 

Let's say 1 have a case structure with 2 cases, thus 2 waveforms.

 

So in the 1'st case, a waveform is displayed. But how to overlay the second waveform generated in the next case over the first one  ?

 

Please give me an example !

 

Thank you very much 4 your time !

0 Kudos
Message 6 of 6
(7,812 Views)