威纶通Case 语句不支持范围的啊,比如1到9,就显示2(语句编译无问题,就是实现不了)
macro_command main()
short a,b
GetData(a, "Local HMI", RW, 0, 1)
select case a
case 0
b=0
break
case 1..9//1到9
b=2
break
case else
b=3
break
end select
正确写法
macro_command main()
short a,b
GetData(a, "Local HMI", RW, 0, 1)
select case a
case 0
b=0
break
case 1
case 2
case 3
case 4
case 5
case 6
case 7
case 8
case 9
b=2
break
case else
b=3
break
end select