首页 公司简介 荣誉 推广活动 技术论坛 产品信息
  首 页 :: 总经理致辞 :: 资质证书 ::

 

注册用户,可享有更多通行权利及信息

新用户注册

☆ 如有技术问题,请在线 或Mail至:fa@lggz.com,我们将尽快回覆您!
: 您好: 首先,非常感谢您能如此快的给我回音!!!我衷心的感谢你们对我的热情帮助!! 希望您能抽空批阅一下我的程序:(E5EN设置:9600,e,7,2设备号为1;另一台设备号为2) Private Sub Form_Load()初始化 mscomm1.settings="9600,e,7,2" mscomm1.commport=2 End Sub Private Sub Cmdsend_Click()发送 Dim command As String StrIn = "000000503" & Chr(3) //命令 temp = Asc(Left$(StrIn, 1)) For ii = 2 To Len(StrIn) temp = Asc(Mid(StrIn, ii, 1)) Xor temp Next ii BccResult = Chr(temp)//CHR(53) Print temp //是53 If MSComm1.PortOpen = False Then Exit Sub MSComm1.Output = Chr(2) & StrIn & BccResult 发送命令帧 command = Chr(2) & StrIn & BccResult txtsend.Text = command Label1.Caption = "延迟1500毫秒" \\延迟 timeDelay 1500 Label2.Caption = "1500毫秒延迟结束" If MSComm1.PortOpen = False Then Exit Sub txtreceive.Text = MSComm1.Input \\显示输入缓冲区的内容,结果为空,why??? Label3.Caption = MSComm1.InBufferCount\\结果为0,WHY? Exit Sub End Sub
ALAN : 你现在的命令帧是发给0号温控器的,设备号为1或2 的E5EN肯定不会响应。


发表见解:
用户名:
密 码:
显示名称:

地址:广州市体育东路33号天盛大厦南梯707室
电话:020-85267788(20条线)  传真:020-85267077
网  址:http://www.zxlo.com
Mail:fa@lggz.com