I can't help you, it works for me.
EMG
Local cDataRead:=Space( 10 ) //length of data to read
Local cDCB
Local nComm
//Setup COM port
if ! BuildCommDcb( "COM1":9600,n,8,1", @cDcb )
MsgInfo("BuildComm Error")
endif
if ! SetCommState( nComm, cDcb )
MsgInfo("SetComm Error")
endif
if FlushComm( nComm, 1 ) != 0
MsgInfo("FlushComm Error")
endif
//Read the COM port
ReadComm( nComm, @cDataRead )
Jeff Barnes wrote:
- Code: Select all Expand view
if ! BuildCommDcb( "COM1":9600,n,8,1", @cDcb )
if ! BuildCommDcb( "COM1:9600,n,8,1", @cDcb )
Jeff Barnes wrote:This is what I use to read data from a medical device:
Jeff Barnes wrote:Thanks Enrico .... a slip of the finger
Robert ... What is ASTM ?
Jeff Barnes wrote:if ! SetCommState( nComm, cDcb )
MsgInfo("SetComm Error")
endif
favory wrote: if ! SetCommState( cDcb )
MsgStop( "Error SETCOMM!" )
return .f.
endif
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 97 guests