02-09-2012 10:10 AM
02-09-2012 01:58 PM
Sorry Guillaume, there's no straightforward way to do that. You'd have to remember the last point you plotted, taking into account the gain and offset of the axis.
Luis
02-10-2012 05:40 AM
02-10-2012 10:10 AM
02-10-2012 10:40 AM
02-10-2012 12:11 PM
To answer your previous question, there is no limit to the number of axis items that you add, but there's also nothing in the chart to automatically purge items that are not in view (since the axis max/min can change, or the chart can be scrolled back and forth, in which case you'd want the axis items to still be there). Therefore, I definitely recommend that you explicitly remove them when you think it's safe to do so, otherwise memory use will increase over time.
I don't completely understand the difference that you're talking about with sweep and block modes (you forgot to attach the screenshot, by the way, maybe that would have made it clearer).
In sweep and block modes, the chart advances one "page" at a time, instead of advancing only the amount that is necessary to acommodate the new data. However, the new data is plotted in accordance with the numeric values in the x-axis and the axis item is placed in the location that corresponds to its numeric value in the axis. So, I don't understand what you mean when you say that the "axis items are added to the right".
You also mentioned that counting the calls to PlotStripChart doesn't work in sweep mode. But let's take a look at a simple example:
Assuming, for the sake of simplicity, that your gain is 0, your offset is 1, your pps is 100, and you always plot 1 point at a time...
After 110 plotting calls, your last x-value is 109, regardless of whether you're using continuous or sweep modes. The only difference is the pixel location of this data point on the chart: in continuous mode, it's all the way on the right side of the chart (the x-axis range is 10-109), whereas in sweep and block modes, it's close to the left side of the chart (the x-axis range is 100-199). But this is still the x=110 value, in all cases. And if you have a label string that corresponds to 110, that's also where that label string appears, in all cases.
What am I missing?
Luis
02-13-2012 05:10 AM
02-13-2012 10:13 AM
Hello Guillaume, may you be running into this problem?
02-13-2012 02:03 PM
I'm not sure I follow what you are having trouble with either. The screenshot you posted looks like the correct behavior for sweep mode. Is it correc that you are suggesting there is a difference in behavior between the chart on Windows and Linux? Could you post the equivalent Linux screenshot?
Are you still trying to get the last value plotted? Could you not maintain this in a variable rather than pulling the information from the chart? By that I mean, each time you plot data, grab the last value in the data setting you are adding and save it in a global variable.
02-13-2012 03:24 PM
I apologize, I misunderstood what you had in the screenshot. Roberto is correct that we did patch this for 2010 and the latest version of the CVI 2010 Run-Time Engine can be downloaded by following the link Roberto provided or here. The reason the strip chart looks correct in Linux is because we caught the problem before releasing the Linux module.