petervn
asked on
how can i get data from com port ?
How can i get data from comport .What component do i have to use to get?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi again :-)
I was forgetting! ^_^
You can try with Windows APIs using COM ports as files.
It should be possible for example to write something like
this:
uses SysUtils;
var T : TextFile;
begin
AssignFile( T,'LPT1:' );
Rewrite( T );
write( T,'This is my printed text' );
CloseFile( T );
end.
It should work with other ports too.
Please bear in mind that is UNTESTED.
HTH,
Andrew
I was forgetting! ^_^
You can try with Windows APIs using COM ports as files.
It should be possible for example to write something like
this:
uses SysUtils;
var T : TextFile;
begin
AssignFile( T,'LPT1:' );
Rewrite( T );
write( T,'This is my printed text' );
CloseFile( T );
end.
It should work with other ports too.
Please bear in mind that is UNTESTED.
HTH,
Andrew
Why a C grade?
Another option is to use TComPort.
HTH,
Andrew