do my port through which communication with the controller (ADAM 4000). several times per second the controller sends a request (WRITECOMM (nCommIzl, "$ 02" + "6" + chr (13))) I get a response from him
function BytesAtPort( nCommIzl )
local cBufIzl := Replicate(Chr(255),1024)
ReadComm( nCommIzl, @cBufIzl ) // <<<<---- program will lock here
cBufIzl:=StrTran(cBufIzl,Chr(255),'')
if mCont=.t.
LogFile( dF, {"Response controller: " + cBufIzl } )
endif
.
.
.
.
log file:
.
.
.
.
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
The problem is that communication stops at 23:59:59. Why?
Note that the controller does not have its clock!