威纶通官方论坛

帮我看看有没有问题

[复制链接]
发表于 2013-9-12 19:49:21 | 显示全部楼层 |阅读模式
macro_command main()
short a[4]
short b[16],return_value
FILL(a[0], 0, 4)
FILL(b[0], 0, 16)
a[0]=0A
a[1]=0D
a[2]=01
a[3]=0D
OUTPORT(a[0], "Free Protocol", 4)
INPORT(b[0], "Free Protocol", 16, return_value)
if return_value > 0 then

      SetData(b[0], "Local HMI", LW, 0, 16)

end if
end macro_command
为什么在屏上没有数据,谢谢
发表于 2013-9-23 09:05:57 | 显示全部楼层
你可以先试图用串口调试工具去给你的设备发送这些代码看看有没有返回
您需要登录后才可以发帖 登录 | 注册

本版积分规则

回复帖子

Archiver|小黑屋|威纶通官网 ( 粤ICP备06054553号 )

GMT+8, 2024-5-17 03:59

Powered by Discuz! X3.4

© 2001-2023 Comsenz Inc.

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