请教各位
如果接收数据包长度是3个字节,用触发OnComm 事件或轮询法时,该如何设置
InBufferCount 
InputLen 
RThreshold 谢谢.

解决方案 »

  1.   

    MSComm1.CommPort = 4
       ' 9600 波特,无奇偶校验,8 位数据,一个停止位。
       MSComm1.Settings = "115200,N,8,1"
       ' 当输入占用时,
       ' 告诉控件读入整个缓冲区。
       MSComm1.InputLen = 0
       ' 打开端口。
       
       ' 将 attention 命令送到调制解调器。
      
        MSComm1.InBufferCount = 0
        MSComm1.OutBufferCount = 0
        MSComm1.InputMode = comInputModeText
        MSComm1.Handshaking = comRTSXOnXOff
        
        
        MSComm1.RThreshold = 1
        'MSComm1.SThreshold = 1
        MSComm1.DTREnable = True
        
        MSComm1.PortOpen = True