Jump to content
Gan Uesli Starling

2 plots stacked in 1 chart with 3 traces each?

Recommended Posts

Granted that I could do this very thing with two single-stack charts of 3 traces each. I could do that... However...

What I'd very much prefer is to have 1 chart with 2 stacks and 3 traces on each.

So my question is...Can I do that? And if so, how can I do that?

I'll tell you what this is for...

I have a test stand measuring pressure and flow. I want to show the current value for each in a separate, vertically stacked plot, with also the current max and min limits as dotted red lines. The settings are progressive steps, each with a different max and min for both those values. I want the operator to not have to think, only just look at the cart, and to know in an instant if it is performing amiss. Also an aid to troubleshooting. Save me a lot of headaches and interruptions down the road.

 

Share this post


Link to post
Share on other sites

I don't think what you are asking is too difficult, but I'd rather see a picture of what you are trying to accomplish.  So I understand where the 6 lines come from, A Minimum, Maximum, and Value for two separate measurements.  But what are the 2 stacks?  I think this can be done pretty easily with an XY graph but I might be misunderstanding your needs.

Also keep in mind that the XY graph also has the ability to place static images on top, or behind graphs using the Plot Images property node.  With this you should be able to also overlay anything you might want on the graph that isn't immediately respectable with XY data.

  • Like 1

Share this post


Link to post
Share on other sites

So, to paint a picture...

In the TOP plot, three lines corresponding to Pressure in PSI:

  1. The ACTUAL pressure as a solid white line, read from a transducer.
  2. Above that (hopefully) a dashed red line corresponding to Do-Not-Exceed value for the present circumstance (a constant).
  3. Below that (hopefully) a dashed red line corresponding to Fall-Not-Below value (another constant).

In the BOTTOM plot, three lines corresponding to Mass Flow in PPH, and that with it's own set of three lines, like for above.

Now, the two plots are simultaneous, and of significantly different magnitudes, so that one would end up squished small if on the same Y axis.  Hence two plots.

Now also, the waveform chart would be zeroed out between changes of circumstance. That is to say, each circumstance would be one step in a staircase of values across the range, some very small, others quite large. Thus the tolerance for max & min, plus the value itself, would be squished down from auto-scaling once higher values passed through the view. So I break up the display into circumstances of one stair step each, with each lasting a minute or so.

Share this post


Link to post
Share on other sites

If I understand you right you want this.  Here I did it with a Waveform Graph, but it could be done with XY, and probably a chart.

Graph Test_FP.png

Graph Test.vi

  • Like 1

Share this post


Link to post
Share on other sites


Thank you for that. However, it seems I explained poorly. So I beg pardon. I should have said, upper and lower "stack", each with 3 lines, both stacks on the same chart. This as opposed to needing two separate charts, thus to keep the two simultaneous. Two, because with auto-scale in Y on the same non-stacked chart, if PSI is in the hundreds while PPH is in the teens, the PPH will be sorely squished down.

Your otherwise very fine example is showing six lines in a non-stacked chart.

Playing around I somehow managed, quite accidentally, a 2-stack plot with one line above and two lines below. But I've no idea how that occurred and have not been able to reproduce it.

Edited by Gan Uesli Starling
More clarity

Share this post


Link to post
Share on other sites

I still don't know what you mean by upper and lower stack, is this a graphing term I should be familiar with?  Do you mean two separate Y scales?  Cause that can be done as well with one on the left and one on the right.  This was also why I asked for a picture since I wasn't sure what you were talking about.  Glad you seem to have something working or close to it.

  • Like 1

Share this post


Link to post
Share on other sites

Hmm... The Waveform Charts can display as "stacked plots". There is a checkbox for that in the front panel as an option. It is very like a digital oscilloscope, yes? And in my Yokogawa DL850 scope (and others) you can divide the screen into sections (or plots, stacks, whatever may be the most correct term). And in each of those sections (on the DL750 and others) you can have more than one trace. So, for instance, I could be viewing Temperature in one section, with all my temp data there, Pressure in another with my transducer data there, and Flow in another with all my coriolis meter outputs there. Similar types of data, in similar ranges, all nice and tidy. All on one device (for a scope). I was hoping for the Waveform chart to emulate this behavior.

But if need be, I can call separate Waveform charts, one for each type of data. It just seemed less tidy, plus a bit more bother for having to deal with plural references (versus one) to thread the controls down through sub-sub-sub-routines via cluster.

Sorry this is taking up so much of your time. It seemed a simple concept to start. Perhaps I was wrong.

Edited by Gan Uesli Starling
grammar

Share this post


Link to post
Share on other sites

OOOOhhh, yeah I've never used that feature but it seems to be a feature of the Waveform Chart and not the graph.

http://forums.ni.com/t5/LabVIEW/How-to-stack-plots-using-Waveform-Graph/td-p/329917

The good news is a Mixed Signal Graph can look and behave in a similar way.

Graph Test.png

Graph Test 2.vi

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.