Solved

Serial Port Timer

Posted on 1997-11-30
2
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

719 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