Configuring an OPC Client connection to an OPC Server

The OPC Client task/worksheet is used to communicate with any system that implements the OPC Server protocol.

This task implements the OPC standard as described in the OLE for Process Control Data Access Standard Version 1.0A document, which is available at the OPC Foundation web site.

Note: Before using the OPC Client task/worksheet in your project, you must make sure the OPC server software is properly installed and configured on the system to which you want to connect.

To configure a new connection, insert a new OPC Client worksheet on the Comm tab of the Project Explorer.

Figure 1. Sample OPC Client worksheet

Use the following parameters in the configuration table for OPC:

To run the OPC Client runtime task, you can choose to run it automatically on start up, or run the task manually by clicking Tasks (either local or remote) on the Home tab of the ribbon. After running this program, a small icon displays in your system tray.

To close the OPC Client runtime task, right-click the icon in the system tray, and click Exit.

Note: IWS and CEView also provide an OPC Server communication task named Studio.Scada.OPC. This task starts automatically when any OPC Client (local or remote) attempts to connect to the Studio.Scada.OPC server. An OPC Client can exchange data with the tags database (Project Tags, System Tags, and Shared tags) using the OPC interface.

In addition, you can start the OPC Server task automatically when you run the project. Select the OPC Server task in the Execution Tasks dialog (Tasks on the Home tab of the ribbon), click the Startup button, and specify Automatic.

Tip: You can also use the OPC interface to exchange data between remote stations running InduSoft Web Studio or CEView. You must configure the OPC Client in one station and you must execute the OPC Server in the other station.

OPC Troubleshooting

When you are using OPC and have problems establishing communication, you should first verify the messages in the LogWin.

If you are running the project on a Windows Embedded target system, there are two ways to check the log:
  1. Remote LogWin
  2. Local Log

For information about using these logs, please refer to Using the LogWin task.

If you find error messages in the log, look them up in this manual/help system, and follow the documented steps for solving the problems. (Use <CTRL> + F to find them in the manual; use the Index to find them in the context sensitive help system.)

If you feel that you need to contact your distributor for technical support, make sure that you provide them with the following information:
  1. Log file
  2. Software vendor and product name of the OPC Server/Client that you are using
  3. If possible, a copy or an evaluation version of the OPC Server for testing purposes
  4. The contact information for your OPC Server/Client technical support

Three possible errors and their resolutions are listed below…

Security

Error Code: 0x80070005 or -2147024891

Reason for error: When the OPC Client tries to connect to the OPC Server, the DCOM layer usually requires authentication. The computer that is running the OPC Server needs to recognize the user logged on to the OPC Client computer, and such a user needs to have privileges to access the OPC Server.

Solution: The first step is to create a single user in both computers that has Administrator privileges and the same password. Log on with this user to both ends, and then try to establish the connection.

If you cannot use the same user in both computers because of some specific requirement of your project, or if the problem persists even after you have logged on as the same user, please read the documents below. They will help you solve the security issues:

Name Resolution

Error: Couldn't create connection with advise sink, error: -2147022986 (0x80070776)

Reason for error: There is a problem resolving the computer name.

Solution: This problem can be solved by specifying the IP address of the server instead of specifying the computer name.

Proxy for Windows CE

Error: OPCServer: IIndCP::Advise - Could not query callback interface: 0x80040155

Reason for error: Your Windows Embedded device is missing the OPCCOMN_PS.dll.

Solution: You should download the .dll to the device and register it. The .dll should be available with your IWS distribution, most probably in […]\InduSoft Web Studio v7.0\Redist\Wince x.x\processor\

If you do not find the .dll in the folder for your processor, contact your IWS distributor.

Дорого закупаем подшипники оптом купить sf2v.ru.