编号步骤1在图形编辑器中,打开带有 i/o 域的 wincc 画面。2打开 vba 编辑器。3将下列脚本复制到编辑器中,并执行此脚本。
sub changetrigger()
dim colsearchresults, objmember, iresult
set colsearchresults = activedocument.hmiobjects.find(objectname:=”*”, objecttype:=”hmiiofield”)
iresult = colsearchresults.count
msgbox “objects:” & cstr(iresult) & vbcrlf
for each objmember in colsearchresults
objmember.properties(“outputvalue”).dynamic.cycletype = hmivariablecycletype_uponchange
objmember.selected = true
next objmember
msgbox “done”
end sub
所有 i/o 对象的输出值被更改为“update upon change”。
注意事项:
对于有关改变其它图形对象的更多信息,可以在 wincc 信息系统中的
“wincc information system > working with wincc > vba for automated configuration”下面找到。
关键字:
vba,脚本,编程