HMI中的宏指令编程中的语句执行顺序是?
以威纶通里的例子为例:
4.
if结构语句
macro_command main()
int k[10], j
for j = 0 to 10
k[j] = j
next j
if k[0] == 0 then
SetData(k[1], “Device 1”, 4x, 0, 1)
end if
if k[0] == 0 then
SetData(k[1], “Device 1”, 4x, 0, 1)
else
SetData(k[2], “Device 1”, 4x, 0, 1)
end if
if k[0] == 0 then
SetData(k[1], “Device 1”, 4x, 1, 1)
else if k[2] == 1 then
SetData(k[3], “Device 1”, 4x, 2, 1)
end If
if k[0] == 0 then
SetData(k[1], “Device 1”, 4x, 3, 1)
else if k[2] == 2 then
SetData(k[3], “Device 1”, 4x, 4, 1)
else
SetData(k[4], “Device 1”, 4x, 5, 1)
end If
end macro_command
这么多IF语句,执行时是从上到下顺序扫描执行吗?
哪位对这个执行顺序了解的说说啊!
楼主最近还看过