Author Topic: RSLinx Remote OPC Server, opcnetapi.dll dcom error  (Read 4761 times)

Noobula

  • Newbie
  • *
  • Posts: 3
    • View Profile
RSLinx Remote OPC Server, opcnetapi.dll dcom error
« on: June 26, 2014, 06:39:21 PM »
When trying to connect to RSLinx Remote OPC Server, the vb2010 debugger points to dll.connect and gives this error message

CoCreateInstanceEx: Access is denied.

Source:  opcnetapi.dll         Err code: -2147467259
I think the err code translate to 0x80004005 = Unspecified error

This is what I entered for the opcDACom.vb:
where OPCServer = RSLinx Remote OPC Server


 Private Sub CreateDLLInstance()
        If DLL Is Nothing Then
            DLL = New Opc.Da.Server(fact, Nothing)
            DLL.Url = New Opc.URL("opcda://192.168.0.1/" & m_OPCServer)
            'DLL.Connect(DLL.Url, New Opc.ConnectData(New System.Net.NetworkCredential()))
            DLL.Connect()

            '* Give time to startup
            Threading.Thread.Sleep(2000)
        End If
  End Sub


When using Rockwell's RSLinx OPC Tester, I am able to connect to the remote opc server at 192.168.0.1 and read the items that I want. Is this because the OPC Tester have the correct DCOM permission and the Debug version of the Advanced HMI exe does not?

Is this entirely a DCOM permission problem, and if so how do I troubleshoot?

Regards,
Noob

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5283
    • View Profile
    • AdvancedHMI
Re: RSLinx Remote OPC Server, opcnetapi.dll dcom error
« Reply #1 on: December 22, 2014, 08:09:52 PM »
- Right Click the AdvancedHMI project in the Solution Explorer and select properties
- Change Target CPU to x86