用Visual Basic 5.0开发无线通讯数据采集应用程序
ReDim Preserve BinDataarr(6) As Byte
本文链接地址:http://www.oyaya.net/fanwen/view/140616.html
BinData = frmTerminal.MSComm1.Input
BinDataarr = BinData
UserDataLenth = BinDataarr(5) '用户数据的长度
Wait1:
If BinDataarr(5) > frmTerminal.MSComm1.InBufferCount Then '未接受完数据
delay 6 '延时6s
GoTo Wait1
End If
frmTerminal.MSComm1.InputLen = UserDataLenth
BinData = frmTerminal.MSComm1.Input
ReDim Preserve BinDataarr(UserDataLenth)
BinDataarr = BinData