LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

chart data lost

Hello,

 

I have win7 pro on two PCs, and LabView 2012 Full, v12.0.1f5.

I use charts in two applications run on these PCs. I experiance that, seems random, sometime I get my chart data lost completly.

 

I set the chart history lenght to 10080 samples (i update the charts at every minute, so I have 7 days history). I know there is a nicer way to plot data at that big size, but I am satisfied with the in-built "decimation", so I can see the whole week data, or I can check only several hours for example.  I use property node to scale the time axis when the operator wants to see less data (or just manually changing the x-scale numbers). I used these charts in the last 2 years without any problem.

 

I do not know what is causing that, but I started to encounter at random times that, the chart somehow "clears" itself (and no one clears the data manually, I can be sure, and no internet connected to these PCs 🙂 ). For example: I have already full buffer, 1 week of data, and the next morning I see that, I have only 2 hours of data "left", the oldest data point is from 2 hours before. I have checked my code, and it simply adds values at every 1 minute, and I never do any history property node manipulation in it. So no idea whats going on?

 

The biggest problem is that, it looks like I cannot reproduce this error, it just seems to happen randomly...I do not know if it helps, but I attached the chart which I use. What can cause this? Labview update? This is not too serious problem, since I save all data to TDMS file, but annoying, and strange...

thanks for suggestions!

0 Kudos
Message 1 of 11
(3,593 Views)

Hi Blokk,

Is it possible the data-loss is associated with a screen-saver starting or computer going into sleep mode?

Are you absolutely sure you're not writing an empty array to chart History property.

For what it's worth, I've used LabVIEW extensively through LV2011 and don't remember this happening - so, maybe it's new to LV2012.

I opened your chart VI using 2013 - I like the chart format and duel-scales...

 

Cheers.

 

P.S. I know it's probably unreasonable, but seeing the source-code might help. Smiley Wink

0 Kudos
Message 2 of 11
(3,547 Views)

Are you running any other application in LabVIEW in the same PC? Are you de-allocating memory somewhere? Is it possible for you to attach the actual code which you use (atleast the chart update part) instead of the chart alone? If you still suspect something worng with your chart, can you try checking the History data size and break the code if the data gets cleared?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 11
(3,539 Views)

P@Anand wrote:

Are you running any other application in LabVIEW in the same PC? Are you de-allocating memory somewhere? Is it possible for you to attach the actual code which you use (atleast the chart update part) instead of the chart alone? If you still suspect something worng with your chart, can you try checking the History data size and break the code if the data gets cleared?


Hello,

 

1., No other application is running, only the main VI from this project. Very misterious thing how this happen 🙂 I think I may post the code later (i am not at the lab yet), but I will be ashamed, I wrote this code some time ago, and not really stylish 🙂 (master/slave with notifiers, Event loop in master, and I produce GPIB data in the event loop timeout case in every 0.5 sec Robot Mad ) But it is a working code at least, except this strange bug...

2., no memory de-allocation explicitly

3., code does not include history property node in the parallel loops (i think only at the beginning before the loops start to iterate)

4., I will make History size check, and log it if it drops or not constant, good idea! 🙂

 

Actually I have additional info for this problem: I have realized that, another chart got "cleared" at exactly at the same time when my main chart. This another chart is at another parallel loop, and also does not have Chart History property node used. I have sleep mode disabled on these PCs, only screen-saver. But the screen-saver comes after a few min idle mode, and I never saw it clearing the charts...really strange 🙂  I think it will be time to code some better data plotting using the TDMS files or arrays and Graphs 🙂

 

0 Kudos
Message 4 of 11
(3,526 Views)

Hello,

 

Please find my project attached in zip. And I warned you! 🙂 This is one of my "early work", I know I should refactor it, but I never find the time...and this code does its job since 2011...(look at the bad notifier usage, even time delay is used between send notifications to try to avoid race condition :)) )

 

Please do not comment on the bad style, and the "spagettiness", but specifically if you see any clue what could cause chart data loss? I think every chart can be effected by this bug(?) in this project, but only the "cal signal 2", "cal signal 3" and the "base-temp-diag" chart controls have large history length, so I experiance the problem with these...

thanks! 🙂

0 Kudos
Message 5 of 11
(3,508 Views)

Hi Blokk

 

Does your error still exist or do you have some more information and maybe an whole project folder for reproducing this behavior? Smiley Wink

 

Cheers!

0 Kudos
Message 6 of 11
(3,417 Views)

Your toplevel VI has ~14 charts. Which one?

 

Are you sure the data is really missing or could it just be a update problem for a chart on a tab that is not shown?

You seem to be redefining t0 at regular intervals. Why?

0 Kudos
Message 7 of 11
(3,412 Views)

@altenbach wrote:

Your toplevel VI has ~14 charts. Which one?


I think every chart can be effected by this bug(?) in this project, but only the "cal signal 2", "cal signal 3" and the "base-temp-diag" chart controls have large history length, so I experiance the problem with these...

 

So only these 3 charts have only large history length, so I can see this behaviour here only (the other charts have 1 hour data only).

 


Are you sure the data is really missing or could it just be a update problem for a chart on a tab that is not shown?

The data is really missing, I go to the chart, and I unset/set scale x-axis, and the data (1 week long) is not there, neither if I try to export it. And even if some data is not updated during another TAB is actively shown, I guess when I "tab-back", the data should be there...

Actually since the last appearence, I did not see the bug again, but the history buffer is not full yet, maybe the bug needs full buffer to appear??

 


You seem to be redefining t0 at regular intervals. Why?


I wrote that, this is one of my early work 🙂 I wanted to send data point by point to a waveform chart in a way, that every data point get a time stamp (in case of delay, or lost data points due to notifier usage). Redefining t0 all the time could cause such a "bug"?

Untitled_2d.png

 

Of course, in this case an XY Graph would be more sofisticated, but that time I just wanted to use the built-in history of the chart.

 

0 Kudos
Message 8 of 11
(3,402 Views)

@altenbach wrote:

You seem to be redefining t0 at regular intervals. Why?


also, have a look on this post:

http://forums.ni.com/t5/LabVIEW/How-can-I-update-the-x-axis-to-match-a-time-reading-in-a/m-p/160205#...

0 Kudos
Message 9 of 11
(3,377 Views)

Hi Blokk - any luck determining the problem?

 

In case the problem is still happeneing...

Does this application start automatically when the PC boots?

Might the PC be re-booting?

 

Cheers!

0 Kudos
Message 10 of 11
(3,184 Views)