Italo_grossi me da la impresion que has ido cogiendo y pegando codigo de varios sitios sin comprender bien bien que hace...
mira, vamos a hacer que se te pongan los valores muestreados en la memo 'numero', sin que de momento lo pase al tchart, y me dices q te sale
en vez de ... (ComportRxChar)
Código Delphi
[-]
var
Str,z,b,g: String;
dato, conv : real;
s,i:integer;
nume:double;
begin
ComPort.ReadStr(Str, count);
memo.Lines.Add(Str);
f:=f+1;
if (((memo.Lines[0]='x')or(memo.Lines[1]='x')or(memo.Lines[2]='x'))and(memo.Lines[3]<>'x')) then begin memo.Lines.Clear; f:=0; end;
if (f=4) then
begin
h:=h+1;
gran:=gran+1;
if (h=200) then begin series1.Clear; h:=0; end;
if (gran=2500) then begin series2.Clear; gran:=0; end;
z:=memo.Lines[0]+memo.Lines[1]+memo.Lines[2];
val(z,nume,s);
numero.Lines.Add(floattostr(nume));
series1.Add(nume*(strtofloat(edit1.Text))/255);
series2.Add(nume*(strtofloat(edit1.Text))/255);
f:=0;
memo.Clear;
end;
end;
pon
Código Delphi
[-]
var
s : string;
begin
ComPort.ReadStr(s,count);
while (s = 'x') or (s='y')do
begin
ComPort.ReadStr(s, count);
Application.ProcessMessages;
end;
numero.Add(s);
end;
esto en teoria te tiene que ir llenando la memo 'numero' de los numeros muestreados, sin las x ni las y...que por cierto, desde el fichero 7.c ... para q son las 'x' y las 'y's? no te iria mejor cambiarlo a printf("%lu",s) sin poner el printf("x") delante y el printf("y") detras?
venga, espero tu respuesta