請幫我分析下這個VB程序,下位機(jī)使用的是TEST程序,使用DEBUG372程序調(diào)試是成功的,但我自已做的上位機(jī)運(yùn)行到CH375ReadData()函數(shù)時返回值mLength為0,不知道哪兒出問題了? If (Not IsOpen) Then IsOpen = mOpenDevice() If (Not IsOpen) Then Exit Sub End If End If statustxt.Text = "Running..." On Error Resume Next mTotal = Len(sendtxt.Text) If mTotal = 0 Then statustxt.Text = "Error:發(fā)送的內(nèi)容為空!" MsgBox "發(fā)送的內(nèi)容不能為空,請?jiān)诎l(fā)送區(qū)輸入要發(fā)送的內(nèi)容!", vbOKOnly + vbInformation, "提示信息!" Else For i = 0 To mTotal - 1 mBuffer.mBuff(i) = Mid(sendtxt.Text, i + 1, 1) Next i If (CH375Writedata(0, mBuffer, mTotal)) Then mLength = 5 If (CH375ReadData(0, mReadBuf, mLength)) Then If (mLength <> mTotal Or mLength = 0) Then mErrCnt = mErrCnt + 1 statustxt.Text = "error count:" & mErrCnt Else st = st & mReadBuf.mBuff(0) End If Else MsgBox "CH375讀取數(shù)據(jù)錯誤", vbOKOnly + vbInformation, "提示信息!" End If Else MsgBox "CH375寫數(shù)據(jù)錯誤", vbOKOnly + vbInformation, "提示信息!" End If If receiveflag = True Then receivetxt.Text = st Else End If End If Call Wait End Sub