How to use OPC Analyzer

From QuickOPC Knowledge Base
Jump to: navigation, search

For troubleshooting issues related to OPC, it is sometimes necessary to collect and analyze details of the communication between the OPC Client and the OPC Server. A tool called “OPC Analyzer” (from OPC Foundation) provides means for this kind of troubleshooting.

The OPC Analyzer is intended for OPC Data Access 2.0 and 3.0 specifications only. It acts as a middle piece between your client application (written with QuickOPC), and the target OPC Server. The OPC Analyzer is both an OPC Client (that connects to the original server), and an OPC Server (to which you will connect instead of connecting to the original server). It provide a pass-through for the OPC communication, while allowing it be monitored, logged and analyzed.

OPC Labs will provide you with a link to download the OPC Analyzer.

After installing, run the OPC Analyzer, and enter any necessary information in the Category Filter and Remote Machine Name fields, and press the Refresh button. Then, select your target OPC server from the Server drop-down, and make sure the trace is started (if TRACE STOPPED is displayed, press the start trace button).

You then need to modify your application (or change the settings in the demo app) to connect to the OPC Analyzer instead of your real target OPC server; the OPC Analyzer acts as an intermediate logger. The ProgID of the OPC Analyzer is "OpcTestLab.OpcAnalyzer.1". You can then run your application, and you should see the trace being collected in the OPC analyzer. It might be helpful to make hand-notes of times of any relevant events, such as the time when you have started the application, when the PLC was power-cycled, and when the exception occurred. After you are finished, select File -> Save Trace in the OPC Analyzer, save the .TRA file, and send it to OPC Labs - ideally, attach it to your reply in the Online Forums (unless it contains something confidential).


Note: Zip the file if it is big. For very large files, ask OPC Labs to provide you with alternative means of delivering the file for analysis.

The OPC Analyzer is supposed to be side-effect free, but there is no absolute guarantee. In addition, there are two things to consider with it:

  • Your application needs to be changed to connect to OPC Analyzer's ProgID (and the OPC Analyzer configured to connect to the actual target OPC Server).
  • When run for long time, it generates a large amount of data (beware of disk space).

The OPC Analyzer tool is available to OPC corporate members only (such as OPC Labs are), and you can only use it for the purpose of troubleshooting the particular problem for which it has been provided to you, and in the way as instructed by OPC Labs. If you do not consent to these conditions, you must not use the OPC Analyzer tool.


Warning: Normally, after configuring the OPC Analyzer but before connecting an OPC client to it, you can either close its window, or leave it running. When an OPC client connects to it, it will use a running OPC Analyzer instance when available, or start it otherwise. There are, however, situations in which the client can start a second instance of the OPC Analyzer, even if one is already running. Sometimes the window of this second instance may be hidden behind the window of the first instance, resulting in an impression that no trace entries have been collected - because the actual traces are collected in the second, covered window. Be careful to recognize this situation and switch to the right OPC Analyzer window. You may also close the OPC Analyzer before connecting the OPC client to it. When in doubts, use the Task Manager (its Processes tab) to check the number of OPC Analyzer processes running, and press the "Show processes from all users" button. The name of the process is OpcAnalyzer.exe.