FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem with communication at midnight
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM

problem with communication at midnight

Posted: Sat Jul 21, 2012 03:58 AM

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!

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]

Continue the discussion