Main Content

Troubleshooting OPC Issues

If you are unable to establish a connection to an OPC server, the following sections might help you to identify and solve problems with installation and configuration that could be preventing you from successfully querying and connecting to OPC servers.

Most problems with connecting to an OPC server relate to the DCOM settings on either the host or the client machine. For information on configuring DCOM, see Configure DCOM.

Unable to Find an OPC Server

First, check that you are able to communicate with the host from your client. You can test this by attempting to run a Command Prompt and using the 'ping' command on the host. Alternatively, try to browse to the host using the Network Neighborhood.

If you are able to communicate with the host, but you are unable to find an OPC server (using the opcserverinfo command) on that host, then the OPC Foundation Core Components may have to be reinstalled on your workstation. You can run the opcregister function to repair your OPC Foundation Core Components installation. For more information see Install the OPC Foundation Core Components.

“Class not registered” Error

If you get this error while attempting to query a server using opcserverinfo, or when attempting to add a host in the OPC Data Access Explorer app, the OPC Foundation Core Components have not been installed correctly. Install the OPC Foundation Core Components, as described in Install the OPC Foundation Core Components.

Unable to Query the Server

If you are unable to query the server using opcserverinfo, the most common cause is incorrectly configured local DCOM security settings. Review the section on Configure DCOM.

Unable to Connect to Server

An inability to connect to the OPC server usually indicates that the security model on the server is not allowing you to make an initial connection. Check the DCOM configuration on the server, and review the section on Configure DCOM.

Unable to Create a Group

If you are able to connect to the server but cannot create a group, the most common cause is incorrectly configured local DCOM security settings. Review the section on Configure DCOM.

Error While Querying Interface

If you get this error while attempting to add a group to a connected client object,

Error occurred while querying interface: IID_IOPCDataCallback

your local DCOM security settings are not permitting the OPC server to connect to the Industrial Communication Toolbox™ OPC client on the local machine. Review the section on Configure DCOM.