OPC-DA COM connection for AB RSLinx

Hi,
I am trying to configure an OPC-DA COM connection for AB RSLinx OPC. Already downloaded and installed the OPCCom module. Can anyone give me some guidance on this (parameters settings).

Thanks

UPDATE: I managed to figured out how to do a connection to RSLinx locally in a XP box. Now Im trying to do it remotely from a Win7 box but I get this error:
[size=85]
com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040155; REGDB_E_IIDNOTREG (Interface not registered)
com.jniwrapper.win32.com.ComException.checkResult(SourceFile:172)
com.jniwrapper.win32.com.ComFunctions.coCreateInstanceEx(SourceFile:229)
com.inductiveautomation.opccom.COMServerImpl$ConnectServerJob.internalRun(COMServerImpl.java:719)
com.inductiveautomation.opccom.wrapper.OleJob.run(OleJob.java:47)
com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:566)
com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:508)[/size]

Any idea?

It sounds like perhaps the OPC Core Components are installed properly on one of the machines. Trying downloading them from the OPC Foundation (or here) and installing them first on the Win 7 machine, then on the other machine if necessary.

One more thing I’ll mention, since it sometimes trips people up, RSLinx only allows remote connections with Gateway edition. That’s not the problem you’re running into there- you would get a “NOT LICENSED” error in that case, but just wanted to let you know.

Regards,

Thanks! I installed the OPC Core package on the Win 7 box and now the Gateway gets connected to the OPC, but after a few seconds disconnects and then connects again and keeps doing that in a loop. Something that Im missing!

Hi,

I would bet that the connection is failing to establish a “subscription callback” from the server, due to DCOM settings.

If you post the “wrapper.log” file from the install directory we can confirm this. I would be that’s the problem, though, as it happens to most people who try to set up remote connections.

Everyone thinks about the client connecting out to the server. However, what they don’t normally know is in order to get values, the server must connect back into the client. Thus the DCOM security settings must be configured on both sides.

Regards,

Attached is the wrapper.log file. BTW thanks for the support!
wrapper.log (342 KB)

Ok, easy enough (from a diagnostics point of view): The log file is full of ACCESS DENIED responses from the server.

So now you’ve entered the treacherous waters of DCOM security configuration. There are lots posts on here talking about DCOM configuration, and lots of information to be found about OPC and DCOM in general on the web, so I’ll have to point you in that direction. In particular, the OPC Training Institute has a number of whitepapers and tutorials, such as this one.

Of course, I hate to just send you off with nothing, so I’ll quickly run through the “open-it-all-up-just-make-it-work” settings:

  1. Run [tt]dcomcnfg[/tt]
  2. Browse to Component Services>Computers>My Computer (might be different based on windows version), right click, select “properties”.
  3. Click “COM Security” tab.
  4. Under all four buttons add “Everyone” and “Anonymous Logon”, and make sure all of the “allow” boxes are checked.
  5. Make sure that the Windows firewall is turned off, or at least allows TCP port 135.

Do this on both machines. A restart afterwards may be required. Doing all of this usually resolves the security problems, by basically removing security. If security is at all a concern (these systems are on the internet at all, for example), you really should look at using an OPC tunneler instead, which can let you keep DCOM closed down and use secure TCP/IP communication.

Regards,

Thanks! For now its OK to run the application without all the DCOM security. Im just preparing a Demo for possible clients! :smiley:

Now it is Up and Running! :thumb_right: