Ver Mensaje Individual
  #3  
Antiguo 01-04-2008
JoseFco JoseFco is offline
Baneado
 
Registrado: dic 2007
Posts: 1.861
Reputación: 0
JoseFco cantidad desconocida en este momento
El problema radica aqui.

Código Delphi [-]
  5: begin // Comando para escribir el chip(06 04 00 00 10 00)
         ComPort.WriteStr(#6#4#0#0#16#0);
            sleep(100);
            Count := 0;   //Agregar esta variable Integer
            LineaMemo := Memo1.Lines[Count]; //Agregar esta variable String (LineaMemo)
              ComPort.WriteStr(Char(strtoint('$'+Copy(LineaMemo,1,2))));             
 Delete(LineaMemo,1,3);           
Contador := 2;     
end;
     end;
     end
         else if Str = #2 then begin
         end
           else if Str = #83 then begin
             ComPort.WriteStr(Char(strtoint('$'+Copy(LineaMemo,1,2))));
              Delete(LineaMemo,1,3);
                if LineaMemo = '' then begin
                  LineaMemo := Memo1.Lines[Count+1];
                   end;
              Inc(Contador);

     end;

Que esta mal? No tengo idea. Pero el programa rueda bien hasta que llega aqui y el CPU se pone enfadado con lo que se le manda a hacer.

Un Saludo.
Responder Con Cita