I want to set 3 arrays of values to trend. Each array contains 25000 values.
[spoiler]
Code: Select all
main()
{
//values for set to trend
dyn_time tt;
dyn_float ff;
dyn_bit64 bb;
const int TR_COUNT = 25000; //dynlen values block
const int TR_COUNT2 = 24999;
const int TR_CIRCLE = 3; //number of cycles (blocks)
int frame = TR_COUNT;
time tStart = getCurrentTime();
tStart -= 10;
for (int blockNumber = 1; blockNumber = (frame-TR_COUNT2); i--)
{
dynAppend(tt, tStart-i);
dynAppend(ff, 10.2*sin(i));
dynAppend(bb, "1000001100000000000000000000000000000000001100000000000100000001");
}
DebugN("Set values to trend", "values block ?" +blockNumber, "dynlen values block:" + dynlen(ff));
//set data to trend
TREND1.curveValues("#1_1", ff, tt, bb);
frame += TR_COUNT;
TREND1.updatesEnabled(true);
}
time tEnd = tStart - 85000;
setValue("TREND1", "visibleTimeRange", 0, tEnd, tStart+3600);
//Get values from trend
dyn_float df;
dyn_time dt;
dyn_bit64 db;
getValue("TREND1","curveValues", "#1_1", df, dt, db);
DebugN("Get values from trend", "dynlen values:" + dynlen(df));
}
3 arrays of values are formed by clicking on the button (each array contains 25 000 values) and set on the trend widget with the function "curveValues".
The values of the first array are partially displayed on visible time range of trend.
The values of the second and third array of values are outside visible time range of trend.
After setValue() on the trend, the first array is truncated to 20,000 values, and the second and third arrays are set as one point.
Instead of 75000 points that set on the widget, 20002 points are displayed and 55000 points are lost.
Why are values lost when there are more than 20,000 values on a trend?