Problem with reading a complete string on a serial port Dear all. I have a problem with a reading a string on a serial port. I can send string, send character, read character but I can't solve reading of complete string. I have two similar functions in a unit for reading from a serial port: function TPLC_Comm.ReadStr(var S: String) : Boolean; var TempArray : array[1..255] of Byte; Count, RX_Count : DWord; begin S := ''; ReadFile(Com, TempArray, 255, RX_Count, nil); for Count := 1 to RX_Count do S := S + Chr(TempArray[Count]); Form_Glavna.Edit_ToPrint.Text := S; if length(S) > 3 then Result := True; end; function TPLC_Comm.ReadChr(var C: Char) : Boolean; var RX_Count: DWord; begin ReadFile(Com, C, 4, RX_Count, nil); Result := (RX_Count=1); end; So in Execute for reading a character I do something like this: Repeat If ReadChr(Ch) then Begin IF (Ch=$#06) then ...( do something); If (Ch=$#15) then ...(do something2); End; Until (Ch in [$#06, $#15]; This work...