Article

From:
To:
Paul Breneman
Subject:
Re: Error with TApdWinsockPort
Newsgroup:
turbocontrol.apro.general

Re: Error with TApdWinsockPort

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.
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 28 Mar 2024 23:40:31 UTC
Copyright © 2009-2024
HREF Tools Corp.