My system: SLC503 => 1747 PIC => PC
PC : RSLinx + SCADA VB2005
I have a problem when using RSlinx OPC in VB2005
=========================
Public Class frmMain
'Khai bao OPC
Public MyRsLinxOPCServer As RsiOPCAutPCServer
Public WithEvents MyRSLinxOPCGroup As RsiOPCAutPCGroup
Public LinxItem1 As RsiOPCAutPCItem
Public LinxItem2 As RsiOPCAutPCItem
Private Sub initialOPC()
'Dim TransID As Int64
'Dim CancelID As Int64
'Dim i As Integer
'Create Server
MyRsLinxOPCServer = New RsiOPCAutPCServer
'Connect to Server
MyRsLinxOPCServer.Connect("RSLinx OPC Server")
'Add Group to Server, Group name can be anything you want it to be
MyRSLinxOPCGroup = MyRsLinxOPCServer.OPCGroups.Add("TEST")
'Set Group Active for Data Updates and Events
MyRSLinxOPCGroup.IsActive = True
'Group Update Rate
MyRSLinxOPCGroup.UpdateRate = 10
MyRSLinxOPCGroup.IsSubscribed = True
''''''''''
'Add Items to Group, the specifier on the end Needs to be Unique for each Tag
LinxItem1 = MyRSLinxOPCGroup.OPCItems.AddItem("[MM4inchs]F17:0", 1)
LinxItem2 = MyRSLinxOPCGroup.OPCItems.AddItem("[MM4inchs]F17:4", 2)
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Base.Load
initialOPC()
End Sub
End Class
................................
Help me !!!! Thanks verry much
PC : RSLinx + SCADA VB2005
I have a problem when using RSlinx OPC in VB2005
=========================
Public Class frmMain
'Khai bao OPC
Public MyRsLinxOPCServer As RsiOPCAutPCServer
Public WithEvents MyRSLinxOPCGroup As RsiOPCAutPCGroup
Public LinxItem1 As RsiOPCAutPCItem
Public LinxItem2 As RsiOPCAutPCItem
Private Sub initialOPC()
'Dim TransID As Int64
'Dim CancelID As Int64
'Dim i As Integer
'Create Server
MyRsLinxOPCServer = New RsiOPCAutPCServer
'Connect to Server
MyRsLinxOPCServer.Connect("RSLinx OPC Server")
'Add Group to Server, Group name can be anything you want it to be
MyRSLinxOPCGroup = MyRsLinxOPCServer.OPCGroups.Add("TEST")
'Set Group Active for Data Updates and Events
MyRSLinxOPCGroup.IsActive = True
'Group Update Rate
MyRSLinxOPCGroup.UpdateRate = 10
MyRSLinxOPCGroup.IsSubscribed = True
''''''''''
'Add Items to Group, the specifier on the end Needs to be Unique for each Tag
LinxItem1 = MyRSLinxOPCGroup.OPCItems.AddItem("[MM4inchs]F17:0", 1)
LinxItem2 = MyRSLinxOPCGroup.OPCItems.AddItem("[MM4inchs]F17:4", 2)
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Base.Load
initialOPC()
End Sub
End Class
................................
Help me !!!! Thanks verry much
Last edited: