Option Explicit
Function action
Set MyAlarm = HMIRuntime.Alarms(1000)
MyAlarm.State = 5
MyAlarm.Comment = ""
MyAlarm.UserName = HMIRuntime.Tags("@local::@CurrentUser").Read
MyAlarm.ProcessValues(1) = Tagsname
MyAlarm.ProcessValues(4) = "PCSManualOpen"
MyAlarm.Create "MyApplication"
End Function
CCHMIRUNTIME.HMIRuntime HMI = new CCHMIRUNTIME.HMIRuntime();
IHMIAlarm alarm = HMI.Alarms[1000];
alarm.State = HMIAlarmState.hmiAlarmStateCome;
alarm.Create();
报错。。。