发布于 2008-06-24 10:11:59
0楼
找到些许资料,共享~~~不知那位高人还有更多相关资料?
可以使用 WINCC提供的SIMATIC DMC ActiveX控件存取WINCC过程数据,简单例程如下:
Dim tagVal as Variant
Dim myState as Long
Dim myDmc as Object
' Write the WinCC tag value named "NewTag"
'tagVal is the value which will be written in WinCC
Private Sub Command1_Click()
Dmc1.Connect myDmc
Dmc1.Write "NewTag",100,tagVal
Dmc1.Disconnect
End Sub
' Read the WinCC tag value named "NewTag"
' tagVal will get the tag value from WinCC
Private Sub Command1_Click()
Dmc1.Connect myDmc
Dmc1.Read "NewTag",100,tagVal,myState
Dmc1.Disconnect
End Sub
不以物喜,不以己悲;
达则兼济天下,穷则独善其身。