Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gmmastros on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial Port Communications

Status
Not open for further replies.

mgallot

MIS
Jan 22, 2001
93
0
0
US
I have an application that needs to send data via serial port with a maximum of a 2 second delay. The data is coming from a Windows NT application into a C++ 5.5 application. Is the >2 second delay possible?
 
Yes, it is possible. Go to and download commport and term zip files. These should show that how to make and use a ReadIntervalTimeout which you can use to set the delay. Mr. Howe has also co-authored a book Borland C++ Builder How-To: The Definitive C++ Builder Problem-Solver. This book also shows you how to set up the delay for a serial port. This isn't a trivial thing to do but once done you can use it in any programs that look at the serial port. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
I appreciate your quick response. I made a mistake in my question though, I meant a >2 millisecond delay. Is that possible?
 
The ReadIntervalTimer uses milliseconds. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
In my Opinion time delay of 2 ms is not possible although the intervaltimer uses ms. The Problem is the OS which does not support such small delays. To use this short delays you have to use hardware interruppts which means you have to use a special hardware with your own driver.
Even then it is possible to get trouble.

I tried such a task some years ago, and i gave up to use a Windows system, because these OS's are not designed for real time applications. From that experiences I can say: with Windows the trouble begins between 30 - 50 ms.
hnd
hasso55@yahoo.com

 
I believe Hnd is right if I remember correctly.
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top