Solved

COM access in Delphi 2

Posted on 1997-05-31
1
185 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

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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