Solved

Serial Port Timer

Posted on 1997-11-30
2
235 Views
Last Modified: 2010-04-04
I need to test for closure between two pins on Com2 and set a timer between the 'clicks'.  The timer is easy enough, but I don't know how to test for input from the serial port. I am currently using an old DOS program to do this with pins 2 and 5.
0
Comment
Question by:emcdaniel
2 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352436
Input from commport or only from pin 2 and 5?

Like always, a lot of compenents are already on the net for input from a commport. And a lot are good ones. The one I use and I find it very good, calls TCommPortDriver. You can find it on Torry's delphi pages. It's freeware.

Have fun,
c.u. ZifNab;
0
 
LVL 3

Accepted Solution

by:
altena earned 100 total points
ID: 1352437
Look up the "WaitCommEvent" functio in the Win32 API.

You should span 1 thread to monitor the Comm port.
Waitcommevent will allow you to time anything you want to time.

Good Luck.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

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