Solved

COM access in Delphi 2

Posted on 1997-05-31
1
186 Views
Last Modified: 2010-04-06
Hi there! Need a SIMPLE and RELIABLE way to access the COM port in Delphi 2. I do know, how to open and close port, and how to set it up. I am looking for the best way how to read and write data. I am communicating with the special piece of hardware and it has its own protocol.
Any ideas? Thanx a lot. Bocian....
0
Comment
Question by:Bocian
1 Comment
 
LVL 2

Accepted Solution

by:
alona041797 earned 50 total points
ID: 1336701
Access it as a text file if it uses text interface or as a bianry file if it uses binary interface:

var comport:textfile;
    s:string;

begin
  assignfile(comport,'com1:');
  rewrite(comport);
  writeln(comport,'your data here');
  {...}
  readln(comport,s);
  closefile(comport);
end;
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question