
BillZ (Customer) asked a question.
Trend Chart Stops Scrolling / Overflow Display on X-Axis
After running for some length of time (far exceeding that of the number of displayed samples) we've seen the chart simply stop updating. Also, in some cases, regardless of scrolling or not, the X-axis displays overflow. Is there a way to fix this or a way to periodically clear the buffer? It seems like a bug because the chart should simply maintain it's own circular buffer without ever becoming too full.
Hey Bill, we had to submit this to CODESYS and the following is their reply:
"I looked on our end and it looks like there is an integer overflow problem. If the precision is set to ms then the 32-bit integer that measures the time overflows every 29 days. If set to us, then it happens roughly every 1:11h. We have an open improvement (VIS-912) to make it a 64-bit variable instead.
The Trace is generally more intended for short term debugging. Maybe the customer can try Trend instead of Trace?
Trend offers similar functionality, just at lower data rates but designed for longer time. since the customer only seems to log every 4s, I think Trend should work for them."
Let me know your thoughts on this. Regards
That's good to know. Thank you for the detailed response!
I was unaware that there was a different type of chart, but I'll look to modify my charts to use Trend.
Yeh i wasn't aware of the different applications either so good for us too!
That freeze is usually just the array growing forever. Most chart libs don’t do a real circular buffer. Easiest fix: cap it yourself.
Keeps memory in check and stops x-axis overload.