This section provides you with a list of common OPC-COM connection problems with their possible solutions. It would be impossible to give an exhaustive list of everything that can go wrong but this should give you a good start on the troubleshooting process. If you do not see your problem listed and your connection status is faulted, try following the steps outlined in the Ignition Server DCOM Settings and OPC Server DCOM Settings sections.
There are some cases in which an OPC Server that is installed will not show up in the generated list. This list is generated by the OPC Server Enumerator which is part of the OPC Core Components, so when a server you have installed on the machine does not appear in this list it is likely due to the OPC Core Components not being installed correctly.
Try reinstalling the Core Components and going through the process of creating a new server connection in Ignition again. If the server still does not appear and you have the ProgId (or the CLSID for a remote connection) for the OPC server, you can just select the Other Server option and then click Next. In this situation you will have to enter the ProgId manually on the New OPC-DA Server page.
With all the correct information about the OPC server we can sometimes still make a valid connection to the OPC Server even when it is not detected automatically. This however is rare. Most of the time when the server is not detected, any connection attempts Ignition makes will fail.
Usually this occurs when the DCOM settings for the machine on which Ignition is running are not correctly configured. DCOM connections go in both directions. Ignition must be able to send requests to the OPC server and the OPC server must also be able to callback to Ignition. If the DCOM settings on the Ignition server are not configured correctly those callbacks will fail and the server connection that initially had a status of “Connected” will either fault or all the tags that you have configured will come back with bad quality.
This is a problem that can affect both local and remote server connections.
Follow the steps outlined in the “Ignition Server DCOM Settings” section to ensure that you have correctly configured the DCOM security settings on the Ignition server machine.
It is important to note that Ignition runs as a service under the Windows System account. This can cause some issues with OPC servers that are meant to run interactively, meaning they run under the user account that is currently logged on. When Ignition attempts to make a connection to the OPC server, it will attempt to find an instance running under the same account and if it doesn't find one it will launch its own instance under the System account. Even if there are other instances running, Ignition will choose the one that was launched under the System account for its connection.
Many OPC servers maintain an instance running under the interactive user account that has been configured by the user and maintains all of the device connection information. When Ignition launches a new instance, this configuration information is lacking and none of the desired data can be seen or accessed. To get around this problem, you must specify in the DCOM settings for the OPC server that it always identify itself with the interactive user. Essentially this will force Ignition to use the currently running instance of the OPC server.
- The DCOM settings are found in the Component Services manager. Right-click the entry for your OPC server under the DCOM Config folder and select properties from the popup menu.
- Select the Identity tab. Select the option that reads The interactive user, and click OK.
- Close out of component services and kill any extra instances of the OPC server you see running in the Task Manager.
- Go edit and save the OPC server connection in the Ignition Gateway.
Faulted Status with E_CLASSNOTREG Error Reported on OPC Connections Status Page
This is almost always caused by the OPC Core Components not being installed correctly. Download and install the correct version(s) for your system(s) from the OPC Foundation (www.opcfoundation.org). Remember, if you are making a remote connection you must install these components on both the Ignition server as well as the machine on which the OPC server is running.
Follow these steps to open up the DCOM security settings on the machine that is running Ignition:
- Open the Windows Component Services, located in the Administrative Tools section of the Control Panel.
- Browse down through the Component Services tree until you see My Computer, right-click and select Properties.
- We want to focus on the COM Security tab. There are two sections, Access Permissions and Launch and Activation Permissions. Each section has an Edit Limits... and Edit Defaults... button. You must add the ANONYMOUS and Everyone accounts under each of the four areas making sure that the Allow option is checked for each of the permission settings. If you skip adding both of these to either the limits or defaults areas under either of the two sections there is a good chance your connection will not be successful.
- You can also try setting the Default Authentication Level to None and the Default Impersonation Level to Identify on the Default Properties tab. This isn't always necessary but it can sometimes help.
Follow these steps to open up the DCOM security settings on the machine that is running the OPC server:
- Open up Windows Component Services, located in the Administrative Tools section of the Control Panel.
- Browse down through the Component Services tree until get to the DCOM Config folder.
- Locate the entry for your OPC server that you wish to make a connection to, right-click and select properties.
- Click the Security tab and you will see three sections, Launch and Activation Permissions, Access Permissions, and Configuration Permissions. There are two options to choose from for each section. If you already added the ANONYMOUS and Everyone accounts to the COM Security section from the Ignition Server DCOM Settings section then you can go ahead and just select the Use Default option for each of the three areas. The second option is to edit each of the groups that have Customize selected. You will have to add both the ANONYMOUS and Everyone accounts with all privileges.
- Now select the Identity tab. You will notice that you can choose which account you want to run the OPC server under. Select the Interactive User option. This ensures that if Ignition launches an instance of the OPC server, it will run under whichever user is currently logged into the system.