OPC server
Download
What is the OPC server good for?
OPC is a technology for process data exchange. It was created in cooperation of many world hardware and software producers. The OPC standard is based on Microsoft’s OLE/COM/DCOM technology. A more recent standard, Unified Architecture, uses web services for data transfer and does not require the DCOM technology.
All mark… process stations communicate using the SSCP protocol. To connect them to any common SCADA software, an OPC server can be used, which represents an interface between the SSCP protocol and the unified OPC platform. The Mervis OPC Server is a program which connects to one or more runtime(s) at the „bottom“, while providing process variables at the OPC server interface on the „upper“ end.
To read and write values, many client programs exist. A client connects to an OPC server and provides a platform to read/write values and diagnose OPC communication. Some of them are freeware, others have limited functionality in the demo mode. Proven programs are e.g. OPC Quick Client (Kepware), and Matrikon OPC Explorer. An OPC client program is often used for setup and commissioning; it makes possible to check if the OPC server works correctly and provides valid data. This should be checked prior to the configuration of the client SCADA part.
The machine which the OPC server will run at must have OPC support installed: OPC Core Components Redistributable. It can be dowloaded from the Microsoft support web. If those components are not installed the OPC will not work - and this is one of the main reasons for it.
Server installation
After the installer is launched, select the server version to be installed - standard (DCOM) or UA (Unified Architecture) according to what is supported by the OPC client. If we do not know, select both. It is no problem when both standards run at the same time.
Another setting is the folder where the OPC definitions will be stored. This folder must be writable by the applications. Select a folder which will be accessible for the OPC server. If the OPC server will be installed on another computer than Mervis IDE is, the files must be copied manually after export.
If the OPC UA server is used, the service name and port number can be changed. Usually it is not necessary to do so.
Click “Next” and “Install” to start installation. After the installation process has finished, run Mervis IDE.
Variables selection in Mervis IDE
It makes sense not to include all variables in the OPC server. To mark the variables which should be integrated, set them as True in the Is writable in OPC export property.
1. Open the project to be integrated in OPC in Mervis IDE.
2. Select the variables to be visible in the OPC serveru as Is writable in OPC Export. More variables can be selected at a time (Ctrl + click, Shift + arrow) and the attribute can be set for all of them at the same time.
3. Save the project.
4. Right click to System opens a context menu, select Export to OPC.
5. Select a folder to export the OPC definition files.
7. Click OK to export. Successful export is indicated in the Results window and in the status bar.
OPC server configuration
Run the OPC Server Configurator.
If necessary, change the folder with the exported definition from Mervis IDE in Settings - Definition folder change. If the folder has been entered correctly during the installation, it is not necessary to change it.
Open the project in File - Open.
Edit the PLC connection parameters if necessary. The connection parameters must be changed if the OPC server is operated in another network than the PLCs are installed. Save the edited configuration using the Save button.
Other items in the File menu:
- Open: opens a definition file from the predefined folder
- Import: opens a definition file from another folder and its - or edited - configuration can be saved into the predefined folder
- Update: updates all variables from the source file (any definition file) in the selected configuration file (in the predefined folder). This option is used when the program in Mervis IDE was edited, and the variables in the OPC list must be updated with no other changes in connection definition etc.
The Refresh button reads the vales from a file again (i.e. throws away all changes which were not saved).
Restart the OPC server in Settings - Tools - Services - (server name) - Start, or Restart.
After the service has been started, it should be possible to connect from an OPC client, find the integrated variables, and read or write their values: