Solved

Serial Port Timer

Posted on 1997-11-30
2
230 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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 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

10 Experts available now in Live!

Get 1:1 Help Now