比如我要比较外部变量A和B,如果A大于B,C=1,如果A不大于B,C=0。我该怎么做?谢谢!
最佳答案
c比较麻烦,还要根据数据的类型选择不同的函数,直接用VBS吧:
dimtag(2)
tag(0)=HMIRUNtime.tags("A").Read
tag(1)=HMIRuntime.tags("B").read
iftag(0)>tag(1)then
hmiruntime.tags("C").write1
else
hmiruntime.tags("C").write0
endif
提问者对于答案的评价:
谢谢
专家置评
已阅,最佳答案正确。