用Visual Basic 5.0开发无线通讯数据采集应用程序
GetStringFromComm = BinTotext(UserDataLenth, 0)
本文链接地址:http://www.oyaya.net/fanwen/view/140616.html
frmTerminal.MSComm1.InBufferCount = 0 '清空接受缓冲区
End Function
2 从串口向电台发送数据程序SendStringToComm()
Public Sub SendStringToComm(ByVal TransCommand As Integer, ByVal TransString As String)
ReDim BinDataarr(5)
frmTerminal.MSComm1.OutBufferCount = 0 '//清空发送缓冲区
'TransString = makestring(Val(mc.txtdesstation.Text), 4) + TransString
'//设置标志码
(略)
Select Case TransCommand
Case 0:transmit text
ReDim Preserve BinDataarr(6 + Len(TransString))