2-12
'----------------------------------------
'Reading received data.
'----------------------------------------
If PDQComm1.InBufferCount > 0 Then
InString$ = InString$ +PDQComm1.Input
If InStr(1, InString$,vbCr,
vbBinaryCompare) <> 0 Then Exit Do
End If
Loop
CommRead = InString$
End Function
Using sample
Private Sub mnuCh1_Click()
' Uses port 1 and sets the baud rate to 19200.
CommOpen 1,”19200,N,8,1”
' Receives moving count number from the controller.
ReadBuf$ = CommRead
' Closes the used port.
CommClose
End Sub
Fig. 2-9 Program on the Personal Computer Side
Comments to this Manuals