Top | Previous | Next |
Connecting to OPC Classic (COM) |
Important Classic OPC is based on COM, which is a technology in Microsoft Windows. Therefore, the information in this section only applies to Ignition gateways installed on Windows. For other operating systems, OPC-UA must be used.
Introduction The OPC-COM module provides the ability to connect to OPC servers that only communicate using the older COM based OPC-DA standard. If you have an OPC server that is not capable of accepting OPC-UA connections and you need to talk to a PLC for which Ignition has no supported driver, then you'll have to use the OPC-COM module to make your device data available in Ignition. Connections to OPC servers will be held open while the Ignition gateway is running. All subscriptions to the server will use the same connection.
This section provides a brief walk-through of how to set-up a new Local or Remote OPC-DA server connection using the COM module. Due to the complications that Windows DCOM security settings can cause, this set-up guide is followed by the Troubleshooting OPC-COM Connections section that deals with an overview of how to deal with a faulted server connection due to DCOM security settings as well as other possibilities.
Necessary Preliminary Steps - Install OPC Core Components The OPC-COM module relies on a .dll package provided by the OPC Foundation (www.opcfoundation.org) called the OPC Core Components. You can download the OPC Core Components Redistributable from the OPC Foundation's website under the downloads section. Registration with the OPC Foundation is required before you can download the package, but the registration process is free and painless.
There are two packages to choose from, the 32-bit (x86) and the 64-bit (x64) so make sure you get the correct one for the version of Java and Ignition you are running. 64-bit Java and Ignition needs the 64-bit Core Components package and likewise 32-bit installations need the 32-bit package. It should also be noted that if you are going to be connecting to an OPC server on a remote machine then you must also install the appropriate version of the Core Components on that server as well. The version type, 64-bit or 32-bit, does not need to be the same across the two servers. Just be sure to install the version that is appropriate for the OPC Server and Windows architecture.
Once you have the correct package downloaded you can extract the contents of the .zip file and then run the installer. With the core components installed you can now proceed to setting up your OPC-DA server connection in Ignition.
Recap -
Creating an OPC-DA Connection With the OPC Core Components now installed the next step is creating/configuring a new OPC-DA server connection. Follow these steps:
Remote - For a remote connection you will first have to specify the host name or IP address of the machine the the OPC server resides on and then (as of Ignition 7.4) you will be redirected to the available servers list.
Unique Remote Connection Settings: Remote connections have a few unique settings that you can specify. You can get to these settings by selecting the “Show advanced properties” check box. As of Ignition 7.4 these should all be set for you (except for the CLSID which should no longer be necessary but is still available for you to set if you wish).
Remote Server Specifies that the server is remote and that a DCOM connection will be used Host Machine The computer name or IP address of the machine on which the remote server is running CLSID This is no longer required as of Ignition 7.4, but it is still made available for you. It can be used in place of the ProgId because the ProgId is really just used to lookup the CLSID in the registry. This id can be found in the registry of the machine hosting the server under: HKEY_CLASSES_ROOT\OPCServerName\CLSID
Connection is Faulted In the case where your connection status is reporting Faulted, the troubleshooting process begins. As previously stated, configuring the DCOM settings on your machine can be a headache. The Troubleshooting OPC-COM Connection section is an attempt to ease the process of determining why your connection is faulted and how to go about fixing the issue. If after exhausting the options presented to you there you are still having issues getting you server connection up, give our Inductive Automation tech support line a call and one of our representatives will be happy to assist you.
Creating an OPC-HDA Connection The process of connecting to an OPC-HDA server is similar to that of a DA server. Instead of going to the "OPC Connections" section, however, you define the server as a Tag History Provider.
Example - Adding OPC-HDA data to a chart
A similar procedure can be used anywhere Tag History can be bound or used.
|