Troubleshooting an OPC Collector that Fails to Start

If an OPC Collector fails to start when you restart your computer, it could be because:

  • There is not enough free space for the collector to create its buffer files on startup.
  • Historian is trying to run the OPC Collector before the OPC Server fully starts.

To isolate the cause of the restart issue, review the OPC Collector log file in the C:\Historian Data\LogFiles folder, or the most recent log messages in the Windows Event Viewer. Once you determine what may be causing the issue, you can attempt to fix it by adding a new DWORD setting, MinimumDiskFreeBufferSize, in the Windows Registry for the OPC Collector.

Tips for Reviewing the OPC Collector Log Messages

When reviewing the OPC Collector log file, or the log messages from the Event Viewer, keep in mind:

  • If you notice a message that states that Historian could not create the buffer files, then the issue is most likely that you do not have enough free space available for the buffer files.
  • If you notice the OPC Collector connection attempt, a COM initialization attempt, and then a shutdown, the cause of the error is most likely that the OPC Collector is trying to start before the OPC Server fully starts.
  • If you look at the log files and you do not see anything special, aside from a startup attempt and a shutdown message, then begin by assuming the OPC Server is not fully starting. If the workaround for that issue does not appear to work, try adjusting the buffer size.

If there is not enough free space for buffer files

If it appears that there is not enough free space for the buffer files, either free up disk space, or change the buffer size in the Windows Registry by adding a new DWORD value, MinimumDiskFreeBufferSize, for the OPC Collector. As a recommendation, try using 10 or 20 MB as your buffer size value. If the problem still exists and then try slightly decreasing the value until you find one that works.

  1. Select Run from the Start Menu. The Run dialog box appears.
  2. Type Regedit and press Enter. The Registry Editor appears.
  3. Locate the ComputerName_OPC1_CollectorName key, where ComputerName is the name of your computer, OPC1 is an assigned value, and CollectorName is the name of your collector. You can find this key here:
    HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHistorian\Services\OPCCollector\ComputerName_OPC1_CollectorName4
  4. Add a new DWORD value. Enter the name MinimumDiskFreeBufferSize, select the decimal option, and set the value to a small number such as 10 or 20. The value that you enter represents the number of MB.
  5. Close the Windows Registry and restart your computer.
  6. If the Collector does not connect to the Historian Server, check the log file in the Logfiles folder on the collector computer again.

    If the log still states that Historian ?could not create buffer files ?, then repeat steps 1-6, this time using a smaller number.

Once the OPC Collector connects to the Historian Server, the collector should also appear in the Historian Administrator. Then, you can readjust the buffer file size on the bottom of the collector's General tab.

The OPC Collector Tries to Start Before the OPC Server Fully Starts

If it appears that the OPC Collector is starting before the OPC Server starts, you need to specify a time delay for the OPC Collector startup. To specify this time delay, you add a new DWORD value, MachineUpTimeDelay, in the Windows Registry for the OPC Collector. You can set the value of this DWORD to the number of seconds that you want the OPC Collector to delay it's startup. As a recommendation, try 120 seconds first. If the problem still exists and then try slightly increasing the value until you find one that works.

The OPC Collector Hangs on First Polled Read

If polled reads take more than a few seconds to start when the OPC collector is polling from your OPC server, you may need to change the First Read Mode used by the OPC collector. Specify the mode by using REGEDIT to create the DWORD value OPCFirstReadMode under the OPC collector. An exact REG file cannot be provided, since it is different for different OPC servers but here is an example for Windows Registry Editor Version 5.00 :
HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHistorian\Services\OPCCollector\T20_OPC_Matrikon_OPC_Simulation] "OPCFirstReadMode"=dword:00000001

Valid values are 1 and 2, with 2 being the default.

Use 1 to cause the collector to do a faster OPC_DS_CACHE read on first poll instead of the slower OPC_ DS_DEVICE read.

Note: Creating or changing the value requires a collector restart.

Validating Items Before Adding to Polled Collection Group

To validate the items before adding them to the polled collection groups from the OPC collector, you may need to use OPCValidateBeforeAdd. Specify the mode by using REGEDIT to create the DWORD value OPCValidateBeforeAdd under the OPC collector. An exact REG file cannot be provided, since it is different for different OPC servers but here is an example:
[HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHistorian\Services\OPCCollector\MYPC_OPC_Matrikon_OPC_Simulation
"OPCValidateBeforeAdd"=dword:00000001

Set the value to 1 if you want the OPC collector to validate the items before adding them to the polled collection.

Example: Delaying the Startup of the OPC Collector for the CIMPLICITY OPC Server

To add a startup delay for the OPC Collector for the CIMPLICITY OPC Server, follow these steps:

  1. Select Run from the Start Menu. The Run dialog box appears.
  2. Type Regedit and press Enter. The Registry Editor appears.
  3. Locate the ComputerName_OPC1_CollectorName key, where ComputerName is the name of your computer, OPC1 is an assigned value, and CollectorName is the name of your CIMPLICITY collector. You can find this key here:
    HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHistorian\Services\OPCCollector\ComputerName_OPC1_CollectorName
  4. Add a new DWORD value. Enter the name MachineUpTimeDelay, select the decimal option, and set the value to a small number such as 120. The value that you enter represents the number of seconds.
  5. Close the Windows Registry and restart your computer.
  6. If the OPC Collector still does not appear to start, check the log file in the Logfiles folder on the collector computer again. If the log states the same messages, then repeat steps 1-5 again, but this time increase the MachineUpTimeDelay value.