
help - how do I implement XonXoff Handshaking with MSComm
Hi all,
I am writing a program to interface with a unit that requires Xon
Xoff handshaking. I know I can set the properties with MSComm but do I need
to do some checking of the Xon signals to prevent sending data to the unit
when it is not ready to accept. If so , how do I do this.
I have set up a 2nd PC to be the unit. I can send the string to the 2nd
PC but when I try to return a message from the 2nd PC to the 1st PC upon
receipt of the string, I get a randomly truncated reply. Any tips as to what
I am doing wrong.?
Thanks in advance
Paul Flynn
The code is:
Private Sub MSComm1_OnComm()
Dim InBuff As String
Select Case MSComm1.CommEvent
'No errors generated
' Events
Case comEvCD ' Change in the CD line.
Case comEvCTS ' Change in the CTS line.
Case comEvDSR ' Change in the DSR line.
Case comEvRing ' Change in the Ring Indicator.
Case comEvReceive ' Received RThreshold # of
' chars.
InBuff = MSComm1.Input
Call HandleInput(InBuff)
Case comEvSend .
Case comEvEOF
End Select
End Sub
Sub HandleInput(InBuff As String)
Text3.text = InBuff
End Sub