Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading com port continuously
Message
From
10/11/2005 18:20:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Reading com port continuously
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01067490
Message ID:
01067490
Views:
71
I use PORT.DLL for writing or reading some data to or from COM port from my VFP app. It works fine, but now I have to do some changes with reading.

Well, reading COM port was a procedure user starts with click on button, the program opens com port, reads some bytes in a loop until some condition stops the procedure - like stopbyte comes or just a timeout. Now I have to do a program that should be able to read com port continuously all the time and react diferently on received bytes. It sounds to be like a windows service running in a background, but that's not the point.

So - when I make my program to read com port in a loop, it works, but the CPU usage jumps to 100% and there is a constant hourglass on, so it's not what I want. I looked some communication software like HyperTerminal, and it worked more calm, so it's possible, but how?

Is there any idea how to push the com port reading in a background of my VFP app?

Thank's, Zlatko.
Next
Reply
Map
View

Click here to load this message in the networking platform