找回密码
 加入
搜索
查看: 3185|回复: 8

[系统综合] 串口操作问题(已解决)

  [复制链接]
发表于 2012-4-5 02:30:59 | 显示全部楼层 |阅读模式
本帖最后由 lin0308 于 2012-4-6 17:38 编辑

如何使用au3进行收发数据.commg.au3无效.

可以了,64位系统的要用 运行脚本X86

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2012-4-5 08:17:21 | 显示全部楼层
是不是有关com口通讯?可看看http://www.autoitx.com/forum.php ... 2Bndyndy&page=1
发表于 2012-4-5 13:00:04 | 显示全部楼层
回复 1# lin0308
应该是"CommMG.au3" UDF,给你得了!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-4-5 18:42:31 | 显示全部楼层
回复 3# xms77


    谢谢, 省了几十块钱? 我喜欢!
发表于 2012-4-5 21:11:35 | 显示全部楼层
回复 4# user3000
不谢,举手之劳而已!
 楼主| 发表于 2012-4-5 22:52:43 | 显示全部楼层
回复 3# xms77


    不行.
发表于 2012-4-6 08:29:28 | 显示全部楼层
回复 6# lin0308
上代码看看撒?
 楼主| 发表于 2012-4-6 17:30:57 | 显示全部楼层
回复 7# xms77
#include 'CommMG.au3'
Global $light = 1
Global $sportSetError = ''
Global $CMPort = 2 ; Port
Global $CmBoBaud = 9600 ; Baud
Global $CmboDataBits = 8 ; Data Bits
Global $CmBoParity = "none" ; Parity
Global $CmBoStop = 1 ; Stop
Global $setflow = 2 ; Flow
_CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow)
$timer = TimerInit()
While 1
        If TimerDiff($timer) >= 750 Then
                _CommSendstring($light & "0" & @CR)
                If $light = 1 Then
                        $light = 2
                Else
                        $light = 1
                EndIf
                $timer = TimerInit()
        EndIf
        _CommSendstring($light & "0" & @CR)
        Sleep(50)
        _CommSendstring($light & "1" & @CR)
WEnd
win7 64位
发表于 2012-4-6 21:21:26 | 显示全部楼层
回复 8# lin0308
我的电脑上运行没有错误啊!xp sp3
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-30 15:20 , Processed in 0.089708 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表