发表于:2005/6/3 23:25:00
#0楼
附件:
[本地下载]Private Sub Command1_Click()
MSComm1.RTSEnable = True
Dim OutString As String
MSComm1.OutBufferCount = 0
MSComm1.InBufferCount = 0
OutString = Chr(&H2) + "7" + "0008" + Chr(&H3) + "02"
MSComm1.Output = OutString
Label5.Caption = "串口开,发送完成"
Dim Savetime As Single
Savetime = Timer '记下开始的时间
While Timer < Savetime + 1 '循环等待
DoEvents '转让控制权,以便让操作系统处理其它的事件。
Wend
Dim OutString1 As String
MSComm1.OutBufferCount = 0
MSComm1.InBufferCount = 0
OutString1 = Chr(&H2) + "8" + "0008" + Chr(&H3) + "03"
MSComm1.Output = OutString1
Label5.Caption = "串口开,发送完成2"
End Sub
时时勤拂拭,莫使染尘埃。没有六祖的顿悟,只求神秀的力学慎思。
心镜(nyfuj)
心镜(nyfuj)