Solved

COM access in Delphi 2

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now