发表于:2004-07-16 16:22:00
3楼
给你个简单的,VB的Referrence里要引用OPCAUTO.dll
Dim Server As OPCServer
Dim WithEvents Group As OPCGroup
Dim Item As OPCItem
Private Sub Form_Load()
Set Server = New OPCServer
Server.Connect "OPCServer.WinCC"
Set Group= Server.OPCGroups.Add("cc")
Debug.Print Group.Name
Set Item= Group.OPCItems.AddItem("变量名", 1)
Item.Read 1
Debug.Print Item.Value
End Sub