Hi all, 
I want to use one serial port for writing to and reading from
two different devices. Therefore I wanted to open the port for reading
and then close it again.

I have tried the following for the reading part:

PROCEDURE lesen;
var ser: TBlockSerial;
begin
repeat
        ser:=TBlockSerial.Create;
        ser.ConvertLineEnd := true;
        ser.Connect(port1); 
        data := ser.Recvstring(1000);
        writeln(data);
        ser.free;
until keypressed;       
end;

(The variable "data" will be exported to the program later).
Unfortunately the variable "data" contains only the last 10 to 15
characters (data has the type string[25]). It seemst to be a timing
problem. I have put a delay(500) before/after or both the data :=
...-expression, but without any positive results. Where is the mistake?

Thank you! 
Richard
-- 
Richard Müller - Am Spring 9 - D-58802 Balve-Eisborn
Ökologische Station in der JH Sorpesee
www.oeko-sorpe.de - www.wasserreise.info


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to