LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A multi-plot grah that has a buffer and lets you scroll back

Solved!
Go to solution

Could someone help me, I'm trying to make a graph that can handle more than 1 plot, and updates in real time, has a buffer and allows you to scroll back while it's running without the x-axis cursor jumping back to the front of the x-axis when you let go of the mouse.

 

I am ok with using with either waveform graph or waveform chart.

 

Waveform chart almost does it!  it's sooo close, it has a buffer, it updates in real time, and it can handle more than 1 plot... but whenever I scroll back to look at some previous data, once I let go of the mouse button the cursor shoots back to the front.... can't analyze my data like that (and pausing the graph is not an option).

 

I've been able to set up waveform graph with a buffer, credit goes to chilly  chilly charly charly from this forum for this solution... which was also soooo close, but I haven't been able to graph more than one plot with this buffer....

 

I'm attaching the waveform graph solution which almost works... except no multi-plots.  It also takes to Sub-VIs to function... which is fine if that's what it takes, I thought there might be an easier solution... the waveform chart is sooo close.

 

Much Thanks! 

0 Kudos
Message 1 of 22
(4,226 Views)

So, I'm trying to pursue an option with the waveform graph right now and writing my own buffer... but it is scrolling in the wrong direction... this is what I have so far... any help would be much appreciated.

 

Thanks! 

0 Kudos
Message 2 of 22
(4,193 Views)
I'm not sure you can get the waveform chart or waveform graph scrolling to stop flashing back to the end.  You may need to pursue other graphing options, or make your timescale bigger so you don't have to scroll as much (I know that's a smart-ass answer, sorry).
0 Kudos
Message 3 of 22
(4,185 Views)
Sure you can, it's right there in the example I included in my first post.
0 Kudos
Message 4 of 22
(4,168 Views)

Fibo wrote:

Could someone help me, I'm trying to make a graph that can handle more than 1 plot, and updates in real time, has a buffer and allows you to scroll back while it's running without the x-axis cursor jumping back to the front of the x-axis when you let go of the mouse.

 

I am ok with using with either waveform graph or waveform chart.

 

Waveform chart almost does it!  it's sooo close, it has a buffer, it updates in real time, and it can handle more than 1 plot... but whenever I scroll back to look at some previous data, once I let go of the mouse button the cursor shoots back to the front.... can't analyze my data like that (and pausing the graph is not an option).

 

I've been able to set up waveform graph with a buffer, credit goes to chilly  chilly charly charly from this forum for this solution... which was also soooo close, but I haven't been able to graph more than one plot with this buffer....

 

I'm attaching the waveform graph solution which almost works... except no multi-plots.  It also takes to Sub-VIs to function... which is fine if that's what it takes, I thought there might be an easier solution... the waveform chart is sooo close.

 

Much Thanks! 


 

By starting a new thread you may have lost CC's attention.

 

Re: pausing not an option

 

I think that is exactly what you want. It is when the new data is presented to the chart that it jumps. Maintaining updates in buffer while doing the anaylsis will let you use the chart as is.

 

Re:CC example

Ading another channel to his buffer will be a little involved since it is set up to buffer scalar values and not an array. The lazy-wire-worker approach would use another copy (Save As ... Do not open new copy) of CC's buffer for a second channel. Once you have a copy of the buffer (edit the icon so you can keep them straight) you can use it for the second channel.

 

Another idea:

Use two Charts, one for monitoring another for analysis. When not analyzing write updates to one of the charts. The other chart should be hidden (visable = False). When analysis time comes, hide the monitoring chart, read it history property. Use that to write the history property of the Analysis chart and then show the analysis chart. While you do your analysis, the updates will still be applied to the hidden chart so it is all there when done analyzing.

 

CC (if you are reading this),

 

Why is your defalut action "Write" ?

 

I hope this helps,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 22
(4,163 Views)

Hi Ben !

You are right, I had missed this new thread. Anyway, you have done the analysis for me 🙂

I use "write" as default because this is the way the buffer is used most often, and the read output is always active. The alternative was to set the input as mandatory. I think this is a matter of personal preferences... but I may be missing something here ?

Chilly Charly    (aka CC)
Message 6 of 22
(4,156 Views)

chilly charly wrote:

...

I use "write" as default because this is the way the buffer is used most often, and the read output is always active. The alternative was to set the input as mandatory. I think this is a matter of personal preferences... but I may be missing something here ?


Hi CC,

 

That is legitamate in my book and I have code that is similar. I was asking because in most cases (this is an exception) "write" operations are destructive (if used improperly they casue problems).

 

Re: Preferences

The "required" setting for an AE has saved me a number of times. I believe it was Jim Kring that suggested creating a "wrapper" for each action implemented by an AE where all ot the inputs needed for that action are on the icon of the wrapper, marked required but use a constant of the target action in the diagram of the wrapper. This is a practice that I have been trying to make part of my AE's and makes a lot of sense. The wrappers make the use of the AE a "no-brainer" since the wrapper ensures the AE is being called correctly with all of the required inputs. This also simplifies the documentation for the AE since I don't have to doc the details of each method in a single VI. I can doc to my hearts desire on just one method at a time.

 

So I'm not faulting your code CC. Just sharing notes. Smiley Happy

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 22
(4,150 Views)

I have modified sightly the previous example to show how multiple plots can be handled simply. You can use several instances of the buffer without worrying about making copies with different names, since I have made it re-entrant now (Ben I got you here 😉 😄 !)

 

Message Edité par chilly charly le 12-31-2008 05:53 PM
Chilly Charly    (aka CC)
Download All
Message 8 of 22
(4,146 Views)

chilly charly wrote:
Kudos glutton - Press the yellow button on the left...

CC .... the kudos button is on the right side of the screen 

 

Cory K
Message 9 of 22
(4,144 Views)

Cory K a écrit:

chilly charly wrote:
Kudos glutton - Press the yellow button on the left...

CC .... the kudos button is on the right side of the screen 

Well... it depends on how you look at your screen (from the top, from behind...). That's something you can expect from a crazy frog. :D:D:D

 

Chilly Charly    (aka CC)
Message 10 of 22
(4,134 Views)