Paul Breneman wrote:
> Andreas, > >> procedure MySendData(Address: Longint); > >> See above. I think, I'm doing it the correct way!? > > I don't see any problems with the code you showed. My only question > would be how did the application come to the point of calling > MySendData? Did you initiate this from a timer event or a button > click?
MySendData is called through a Timer thread in a very difficult way and is protected with critical sections but not over synchronize. In fact the timer thread does not call MySendData directly, it calls a timing control which decides if the MySendData is to be called (for example every 10 seconds). The received data is hold in a global buffer, which is processed later within the main thread. The software runs on several computers flawlessly in continuous operation (24/7) over months. In fact the most time the software has to be restarted after an electrical power outage. This is allways with serial communication. With Winsock, some customers are reporting missing data sooner or later. Thats why i am on that problem now. Thank God, I could reproduce the failure on my machine.
Andreas
> > Per your earlier log file your initial communication worked, but it > was just when you send these separate commands that transmission was > delayed for two seconds.