Connecting Devices Using OPC Standard
This article describes how to configure communication with devices using OPC standard. OPC is designed to provide a common bridge for the software and process control devices from different manufacturers (see Wikipedia). Rapid SCADA supports the following OPC specifications:
- OPC DA (Data Access) to read and write current device data.
- OPC AE (Alarms & Events) to receive event notifications.
Note. The updated version of the article is available here.
Rapid SCADA implementation of OPC is provided by SCADA-Communicator application, to be exact, by KpOpc.dll device library. To learn about the details of SCADA-Communicator configuring for using OPC is the goal of this article.
The general configuration sequence:
- Download and install OPC Core Components. These components can be found at OPC Foundation website and here.
- Create an object, a communication line and devices in the configuration database using SCADA-Administrator.
- Configure communication between SCADA-Communicator and OPC servers as described in this article.
- Create input channels in the configuration database according to the tags of the devices. Create output channels according to the commands.
- Create views to display data in SCADA-Web. Specify the views using SCADA-Web Configurator.
The details of the 2nd, the 4th and the 5th steps are described in Rapid SCADA Administrator’s Guide. Device 21 “OPC demo” of the default Rapid SCADA configuration is an example of using OPC. Find “OPC demo” view in SCADA-Web to examine the received data. This example requires MatrikonOPC Explorer which includes an OPC simulation server.
Create a separate communication line for each OPC server that is used. It is the most efficient approach because it allows communicating with the OPC servers in parallel. Add devices to the communication lines. Set Undefined communication channel type for the created communication lines in SCADA-Communicator.
Open device configuration form to select which OPC tags to receive from OPC server. Click Properties button located in device popup menu or in the bottom right corner of Request Sequence page to open the form that is shown in Figure 1.
OPC servers installed on the local computer are available to SCADA-Communicator. If data from an OPC server installed on another computer within a network are required, deploy an extra instance of SCADA-Communicator on that computer and properly configure it to connect SCADA-Server.
There are two ways how to bind OPC tags to input channels of the configuration database:
- Using Signal field of device tags and input channels to identify tags.
- Setting input channel numbers directly in the configuration form shown in Figure 1.
Select the way that is more suitable in a particular configuration of an automated system.
When the configuration is completed, restart SCADA-Server and SCADA-Communicator services. Check OPC communication state and received data using SCADA-Communicator logs (see Figure 2). If the data in SCADA-Communicator seem to be true, open a browser and look for the same data in SCADA-Web.
Known issue of OPC using: unable to receive data from OPC server while OPC tag properties are available in the device configuration form, no error messages are raised.
Possible reason is that SCADA-Communicator service operates as system user but OPS server forbids interacting with system user.
Solution 1. Specify a user account that is used to run OPC server. To open DCOM configuration (see Figure 3) follow the path Control Panel\System and Security\Administrative Tools\Component Services or just run comexp.msc
Solution 2. Specify a user account that is used to run SCADA-Communicator service. Go to Control Panel\System and Security\Administrative Tools\Services or run services.msc, find ScadaCommService and open the service properties. Then enter user account and password on Log On page as shown in Figure 4. The specified user must be a computer administrator.