【发布时间】:2012-11-30 13:33:45
【问题描述】:
我需要与工厂机械进行交互,并且在我们的每个工厂中,我们都使用 RSLinx 与该机械进行通信。根据this blog post 的说法,从 RSLinx 读取数据相对容易:
Dim OpcServer As New RsiOPCAuto.OPCServer
Dim OpcGroup As RsiOPCAuto.OPCGroup
Dim OpcItem As RsiOPCAuto.OPCItem
Dim vItem As String = ""
Try
OpcServer.Connect("RSLinx Remote OPC Server", "192.168.195.128")
' Add this group to the shared topic
OpcGroup = OpcServer.OPCGroups.Add("INDEC")
OpcGroup.IsSubscribed = False
OpcGroup.IsActive = False
OpcGroup.UpdateRate = 250
OpcGroup.OPCItems.DefaultAccessPath = "OPC_Test"
OpcGroup.OPCItems.AddItem("OPC_Bit001", 1)
OpcItem = OpcGroup.OPCItems.Item(1)
OpcItem.Read(2, vItem)
OpcItem = Nothing
OpcServer.OPCGroups.RemoveAll()
OpcGroup = Nothing
OpcServer.Disconnect()
OpcServer = Nothing
'Add and Error the list box
Catch ex As PlatformNotSupportedException
MsgBox("Error In Get Plc Data: " & ex.Message)
End Try
MsgBox(vItem)
但是...它说我需要添加对RsiOPCAuto.dll的引用,但我不知道:
- 在哪里可以找到它
- 它能做什么
- 关于许可的任何信息
不过,具体来说,我很好奇是否有人知道我在哪里可以找到该 DLL。
【问题讨论】:
-
你找到这个问题的答案了吗?
标签: .net integration dde