代码写在ExcelVBA里 要求打开一个pdi,上面有一个Val1
Dim WithEvents valX As PBSymLib.Value
Dim pbkX As PBObjLib.Application
Private Sub valX_DataUpdate()
AppActivate "Microsoft Excel"
MsgBox 1
End Sub
Private Sub Workbook_Open()
Set pbkX = GetObject(, "piprocessbook.application")
Set valX = pbkX.ActiveDisplay.Symbols.Item("val1")
End Sub
只要pdi数据变化 Excel就msg 一个1 出来