|
if( wctime <= 10)
{
Chart1->Series[0]-> AddXY(wctime,y[1],"",clYellow);
Chart1->Series[1]-> AddXY(wctime,y[0],"",clBlue);
}
else
{
tmpX1 = Chart1->Series[0]->XValues->Value[(int)wctime] - Chart1->Series[0]->XValues->Value[(int)wctime-1];
tmpX2 = Chart1->Series[1]->XValues->Value[(int)wctime] - Chart1->Series[1]->XValues->Value[(int)wctime-1];
Chart1->Series[0]->Delete(0);
Chart1->Series[1]->Delete(0);
Chart1->Series[0]->AddXY(wctime+tmpX1, y[1], "", clYellow); // Chart1->Series[0]->XValues->Last()
Chart1->Series[1]->AddXY(wctime+tmpX2, y[0], "", clBlue); // Chart1->Series[0]->XValues->Last()
}
위의 코드는 제가 실험에 사용하고 있는 for문 안에서 실행되고 있고 여기에서 에러가 나타납니다. 그래프
는 잘그려지구요.,wctime = 샘플링하고 있는 현재 시간입니다. 물론 double형이구요.
그런데 어느 정도 시간이 되면 아래와 같은 error가 뜹니다. 도통 무슨 말인지 어디가 잘못되었는지 이해
가 가질 않는군요. 여기 Q&A에 TList error에 대해 있어서 봤지만 무슨 말인지 이해가 안갑니다. 어케 해결
을 해야 하는지 ...큰일임돠..급한데..고수님덜의 현명한 방법을 배우고자 합니다.
"Project FineProjcet.exe raised exception class TListError with message'List index out of bounds(521)'
521은 시간( 배열일 수 도있구요..)입니다. 이 값은 300에서 발생할 수도 있고 왔다갔다 합니다.
|