• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

COM access in Delphi 2

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
Bocian
Asked:
Bocian
1 Solution
 
alona041797Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now