按钮“单击鼠标”事件触发。
VBS程序:
Sub OnClick(Byval Item)
Dim fso
Dim txtfile
Set fso = CreateObject("scripting.filesystemobject")
If fso.FileExists("E:\Wincc_Proj\CAM_Data.txt") Then
Set txtfile = fso.OpenTextFile("E:\Wincc_Proj\CAM_Data.txt")
HMIRuntime.Tags("CAM_Value01").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value02").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value03").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value04").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value05").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value06").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value07").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value08").Write txtfile.ReadLine
HMIRuntime.Tags("CAM_Value09").Write txtfile.ReadLine
HMIRuntime.Tags("