威纶通官方论坛

请看看这个程序有什么错

[复制链接]
发表于 2014-11-16 15:28:15 | 显示全部楼层 |阅读模式
macro_command main()
char  a,b=12,c=13
bool off=0
GetData(a, "Local HMI", LW, 10, 1)
if a==’yh’ then
SetData(b, "Local HMI", LW, 0, 1)
else if a==’YH ‘then
SetData(c, "Local HMI", LW, 0, 1)
end if
SetData(off, "Local HMI", LB, 0, 1)
end macro_command
发表于 2014-11-20 06:33:32 | 显示全部楼层
if a==’y' and 'h’ then
SetData(b, "Local HMI", LW, 0, 1)
else if a==’Y' and 'H ‘ then
SetData(c, "Local HMI", LW, 0, 1)
end if
SetData(off, "Local HMI", LB, 0, 1)
试过可用。
但不明白,a=='yh' 或a=="yh"都不行。求解答!
您需要登录后才可以发帖 登录 | 注册

本版积分规则

回复帖子

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

GMT+8, 2024-6-2 10:52

Powered by Discuz! X3.4

© 2001-2023 Comsenz Inc.

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