LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stacked graph with cursors that extends all plots

Solved!
Go to solution

I use LabView 2009 9.0f3 (32 bit).. I want to create a stacked graph with two cursors that extends all plots. I can only find the stacked option for chart but not for graph, and I don't know how to create cursors that overlaps all plots. Attaching an image that my college created showing what I want to achieve.

 

Thanks,

0 Kudos
Message 1 of 10
(4,398 Views)
Solution
Accepted by topic author mrsound

You can create an array of plots (don't forget to bundle, place them in a cluster first!).

 

Since properties are identical for array elements, the cursor positions will be the same for all graphs, no matter which one you move.

 

 

Download All
Message 2 of 10
(4,374 Views)

That's great, thank you!

0 Kudos
Message 3 of 10
(4,353 Views)

Hmm, to handle events from graphs in an array doesn't seem to work. Any ideas? I try to listen to to cursor move and range change events inside value change for the array.

 

Regards,

0 Kudos
Message 4 of 10
(4,344 Views)

 


@mrsound wrote:

Hmm, to handle events from graphs in an array doesn't seem to work. Any ideas? I try to listen to to cursor move and range change events inside value change for the array.


 

Works just fine with dynamic events. Here's a quick rewrite. 😄

 

Download All
0 Kudos
Message 5 of 10
(4,334 Views)

Actually, you should place the graph terminal inside the loop, else the "other" cursors don't properly update.

 

Message 6 of 10
(4,328 Views)

Thanks, this is cool stuff!

 

I use an event driven state machine and I have placed the event structure in my "Idle" state and I have the graph terminal in my "Update graph" state. Is there any other way to update the other cursors than moving my graph terminal? Maybe the best option is to do my graph calculations in my "update graph" case, but pass the results to a shift register and do the actual graph update in my idle case right before I listen for new events?

 

What do you think?

0 Kudos
Message 7 of 10
(4,303 Views)

Another problem that I have is that I want one graph to show markers and the other graphs to show my signals. I would like to show the markers in a different way and with a different scale than the other signals, but I would like to have the same cursors for all graphs. Do you have any good ideas? Right now I'm thinking about showing markers in each graph as a separate channel in red "point style", but this will probably eat my memory.

 

Thank you very much for your help so far! Smiley Happy

 

Hmm, I got an idea! Smiley Tongue Maybe I could use fixed cursors as my markers?

0 Kudos
Message 8 of 10
(4,294 Views)

As I said, all graphs will have the same properties and that includes the plot colors.

What you need to do is define multiple plots (e.g. two: a line and a point plot)) and send two plots to each graph as a 2D array. For whatever you don't want to show, make that particular row all NaN. Mix & match! 🙂

0 Kudos
Message 9 of 10
(4,278 Views)

Yes, I understood that all graphs in an array have the same properties, but I was thinking that you maybe had other suggestions too. I have already used NaN's for things that I don't want to show up in the graph and it works perfectly. I liked my idea of using fixed cursors as markers and I think that this is the way I want to go. Smiley Happy

 

Ps. I gave you a couple of Kudos. Smiley Wink

 

Thank you for all your help! Smiley Very Happy

0 Kudos
Message 10 of 10
(4,248 Views)