From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable automatic scrolling of waveform chart

Whenver new values are added to a waveform chart, the chart scrolls to the end in order to display the values, even if the user has scrolled to view older data.  If the user is holding on to the x scrollbar, the chart jumps to the end for a second to update the display, and then jumps back to the scroll position; if the user is not holding on the the x scrollbar, the chart just jumps to the end and the old view is lost.  This makes it virtually impossible to view historical data from a live updating chart.  Is there a way to disable this autoscrolling?  This seems like a pretty basic issue that I would have thought I would have run into before, but I just can't figure out how avoid it short of using a waveform graph and buffering the data myself.

0 Kudos
Message 1 of 13
(4,510 Views)

I dont think you can, I just looked and couldn't figure out a way. One work around that I thought of is to have to charts of the same data. The 1st chart only showing the most recent data (say 20 most recent counts), and the 2nd chart showing that same data, but since time 0 (not just most recent time period). This way, when you export data from the second graph into excel, you can pretty quickly see previous data in excel, while still seeing current data in labview on the 1st chart. Definitely not ideal, but this allows you to see your old data without having to pause or stop. 

 

Hope that helped a little 😛 

0 Kudos
Message 2 of 13
(4,490 Views)

Hi jsiegel,

 

One way would be to defer front panel updates when your mouse is on the chart's scrollbar. Below is the event loop to achieve this (not shown: the parallel loop containing the chart) :

 

 DeferUpdates.JPG

 

The event case is set to Mouse Enter on the Waveform Chart, with another case set for Mouse Leave (which sets the Defer Panel Updates back to false)

 

This means that no data is lost and you can scroll through the chart's history in peace! 

 

Hope this helped.

 

-CC 

 

 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 3 of 13
(4,459 Views)

A simple way what we generally do is keep a Pause/Play button near the chart and the boolean we will connect to a case structure and the Chart indicator will be kept inside the false case so whenever we press the Pause button the chart update will be stopped so that we can view the history data. Hope this helps.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 13
(4,457 Views)

P Anand - wouldn't that mean that any new data acquired during the 'pause' would be lost as the chart wouldn't be being updated?

 

You'd end up with jumps/gaps in the data at the points where you'd pressed the pause button and these gaps would be worse the longer you kept the chart paused.

 

-CC 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 5 of 13
(4,453 Views)

@ChrissyC87 wrote:

P Anand - wouldn't that mean that any new data acquired during the 'pause' would be lost as the chart wouldn't be being updated?

 


Yes. You will get gaps.

0 Kudos
Message 6 of 13
(4,448 Views)

Yep, I suspect that gaps in the data stream are not what the OP wants, especially as they're concerned with viewing the data in situ.   

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 7 of 13
(4,444 Views)
how do you say that it will create a gap? It will be just a sudden transition in data once the pause button is released also you will be able to see the current data which being updated to the chart so will that make any changes in the data logging? I never took the data from the chart for logging it will always be separate the transition will just disappear in seconds and the user will be known about that. And for the OP's concern he can view the history data without any problem once the pause button is pressed and will be restored once it is released. I guess this makes sense any comments?
-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 13
(4,428 Views)

I can see where you're coming from, but what I was trying to say was that some data won't be added to the chart even though it's being produced/measured by the program.

 

I agree that for logging all of the data can be saved, but the chart won't display all of the data - ie there will be gaps (perhaps 'jumps' are a better word to use) in the chart data after the case structure is set back to send data to the chart.

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 9 of 13
(4,425 Views)
Yes and for the display it doesn't matter if you don't want to loose any data means you have to log the data and analyse the data from that log.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 13
(4,416 Views)