OPC DA Collector
OPC Data Collectors
The OPC Collector collects data from any OPC 1.0 or OPC 2.0 compliant OPC Server (such as CIMPLICITY). The OPC Collector automatically determines the capability of the OPC Server to which it is connected and supports appropriate features based on this information.
Summary of OPC Collector Features
The following table outlines the features of the OPC Collector.
Feature | Capability |
---|---|
Browse Source For Tags | Yes (on OPC Servers that support browsing) |
Browse Source For Tag Attribute | Yes |
Polled Collection | Yes |
Minimum Poll Interval | 100 ms |
Unsolicited Collection | Yes (OPC 2.0 Only) If you are using an OPC Collector with unsolicited data collection and have collector compression disabled, all new values should produce an exception. When the OPC Collector is doing unsolicited collection, the deadband percentage is determined by the collector deadband percent. You can only configure the collector deadband percent by enabling compression. |
Timestamp Resolution | Yes |
Accept Device Timestamps | Yes |
Floating Point Data | Yes |
Integer Data | Yes |
String Data | Yes |
Binary Data | Yes |
Python Expression Tags | Yes |
OPC Data Collectors Tag Attributes Available in Browse
The following table outlines the tag attributes available when browsing.
Attribute | Capability |
---|---|
Tagname | Yes |
Source Address | Yes |
Engineering Unit Description | Yes, varies by OPC Server Vendor. |
Data Type | Yes |
Hi Engineering Units | Yes, varies by OPC Server Vendor. |
Lo Engineering Units | Yes, varies by OPC Server Vendor. |
Hi Scale | No |
Lo Scale | No |
Is Array Tag | Yes |
OPC Data Types
The following table lists the OPC data types recommended for use with Historian
OPC Data Type | Recommended Data Type in Historian |
---|---|
I1 - 16 bit signed integer | Single Integer |
I4 - 32 bit signed integer | Double Integer |
R4 - 32 bit float | Single Float |
R8 - 64 bit double float | Double Float |
UI2 - 16 bit unsigned single integer | Unsigned Single Integer |
UI4 - 32 bit unsigned double integer | Unsigned Double Integer |
UI8 - 64 bit unsigned quad integer | Unsigned Quad Integer |
I8 - 64 bit quad integer | Quad Integer |
BSTR | Variable String |
BOOL | Boolean |
I1 - 8 bit single integer | Byte |
The Configuration Section for OPC Collectors
To access the Configuration section for an OPC Collector, select an OPC Collector from the list on the left and select Configuration. The following figure appears.
OPC Collector Specific Configuration
The Configuration section displays the following information.
Field | Description |
---|---|
OPC Server Prog ID | The Program ID for the OPC Server that you want this collector to connect to. |
Read Mode | Cache or Device, indicating the type of OPC reads the collector should perform. To change the mode, select the other option from the drop-down menu. Refer to your OPC Server documentation for more information. |
First Browse Criteria | Top-level search criteria for browsing tags from the data source. Top-level and second-level criteria are ANDed together for the browse. The final browse criteria, therefore, consists of a combination of first-level and second-level criteria ANDed together |
Second Browse Criteria | Second-level search criteria for browsing tags from the data source. Top-level and second-level criteria are ANDed together for the browse. |
Threading Model |
The type of threading model selected for this collector. The model selected must match the threading model of the OPC Server. The default setting is multithreaded. Refer to your OPC Server documentation for more information. It is recommended that you configure your OPC Collector to use the default Multi threading model. Some OPC Servers do not work well with Multi threading. If you experience problems running your OPC Collector with Multi threading, change the threading model setting to the Apartment model. |
Configuration Changes |
Whether your OPC Collector configuration changes are processed in real time or after shutting down and restarting the collector. Select the Made On-Line option to process any configuration changes immediately (after 30 seconds) when you select the Update button. Select the Made After Collector Restart option to hold all configuration changes until you manually stop and restart the OPC Collector. NOTE: To allow configuration changes, you also must enable the On-Line Tag Configuration Changes option on the Advanced section of the Collector Maintenance page. To manually restart the OPC Collector, stop and start the collector through the Services window if you are running your OPC Collector as a service. For more information, refer to the Configuring an Historian Data Collector for Automatic Startup section of the Historian Data Collectors manual. If you are not running the collector as a service, open the OPC Collector's console window, type s, and press enter to shut down the collector. For more information, refer to Running Collectors as Console Applications section of the Historian Data Collectors manual. Starting and stopping the collector in the General section of the Collector Maintenance page does not constitute a manual restart. You must either start and stop the collector from the Services window or the Console application. Note: Certain OPC Servers cannot handle processing configuration changes online. If you experience any instability with changes made online, it is recommended that you set the Configuration Changes field on the Configuration section of the OPC Collector to Made After Collector Restart. |
Configuration of OPC Collector Specific Fields
Enter values for the OPC Collector-specific field parameters through the OPC Collector Maintenance Configuration section of Historian Administrator. The following table lists the descriptions of the collector-specific fields:
Field | Description |
---|---|
OPC Server Prog ID | OPC Prog ID of the locally installed OPC Server. |
Read Mode | Read Source (DEVICE or CACHE). See the OPC Specification on the OPC Foundation website. |
First Browse Criteria | A comma separated list of criteria used as Filter 1 in a browse for tags. |
Second Browse Criteria | A comma separated list of criteria used as Filter 2 in a browse for tags. Note that the Tag Filters in First Browse Criteria and Second Browse Criteria are used to filter the tags returned on a browse. You can add multiple strings to each filter, separated by commas. If a filter is supplied, a tag must have one of the identified strings in the tagname in order to be returned. Consider the tags within a filter to be OR'ed and Filters 1 and 2 to be AND'ed. For example, USGB014 in Filter 1 and F_CV, B_CUALM in Filter 2 translates to: Give me all the tags that contain USGB014 AND contain F_CV OR B_CUALM. |
Threading Model | Multithreaded or Apartment. Use apartment threaded for best compatibility. Use multithreaded for better performance if your server is also multithreaded |
Configuration Changes |
Certain OPC Servers cannot handle processing configuration changes online. This field allows you to select whether your OPC Collector configuration changes are processed in real time or after shutting down and restarting the collector. Select the Made On-Line option to process any configuration changes immediately when you select the Update button. Select the Made After Collector Restart option to hold all configuration changes until you manually stop and restart the OPC Collector. Starting and stopping the collector in the General section of the Collector Maintenance page does not constitute a manual restart. You must either start and stop the collector from the Services window or the Console window. For more information, refer to the Configuring the Data Collector for Automatic Startup and the Running Collectors as Console Applications sections of the Historian Data Collectors manual. Normally, changes are applied approximately 30 seconds after the last change. |
Browsing OPC Hierarchy
About this task
If your OPC server supports hierarchical organization of your tags in a tree structure, Historian will use the server's hierarchy when browsing an OPC collector in the Non-Web Administrator.
To browse for OPC tags in a hierarchy:
Procedure
OPC Group Creation
It is recommended that you limit the number of OPC groups created by the Historian system to increase performance. To limit the number of OPC groups created on the OPC Server, consider grouping Historian tags (collected by the OPC Collector) using the least amount of collection intervals possible.
Configuring GE Intelligent Platform Drivers and Deadbands for the OPC Collector
About this task
If you want to add items of different data types to Historian using the OPC Collector to a GE Intelligent Platform v7.x driver/OPC Server, and you are using deadbands, you must manually modify the Source Address for each item you add to specify the EGU range for that item.
To change the source address for a specified item:
Procedure
Example: Using Deadbands with the SI7 Driver
When you use the SI7 driver, it sets the global default values for engineering unit (EGU) limits used for deadband calculations to the following values
l Lo EGU = 0
l Hi EGU = 65535
l EGU Span = Hi EGU LO EGU = 65535 ???
You may want change the default values for this driver if the items that you add use data types other than Integers, such as Floats.
If you want all items to use the same data type, you could change the settings for the HiEGU
and LoEGU
for the driver in the Registry Editor under the following key: \\HKEY_LOCAL_MACHINE\SOFTWARE\In-tellution\Drivers\SI7\OPC\ItemDefaults
. These values apply to all items not specified by the Source Address after you restart the driver.
However, if all items do not use the same data type, as described previously in this section, you must manually modify the Source Address for each item you add in Historian Administrator so that it includes the |SIGNALCONDITIONING,LOWEGU,HIGHEGU,HARDWAREOPTIONS
options.
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
- 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
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. - Select Run from the Start Menu. The Run window appears.
- Type
Regedit
and press Enter. The Registry Editor appears. - Locate the
ComputerName_OPC1_CollectorName
key, whereComputerName
is the name of your computer,OPC1
is an assigned value, andCollectorName
is the name of your collector. You can find this key here:HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHistorian\Services\OPCCollector\ComputerName_OPC1_CollectorName4
- Add a new
DWORD
value. Enter the nameMinimumDiskFreeBufferSize
, 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. - Close the Windows Registry and restart your computer.
- 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 Historian Administrator. Then, you can readjust the buffer file size on the bottom of the collector's General section.
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
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.
Validating Items Before Adding to Polled Collection Group
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.
Delaying the Startup of the OPC Collector for the CIMPLICITY OPC Server
- Select Run from the Start Menu. The Run window appears.
- Type
Regedit
and press Enter. The Registry Editor appears. - Locate the
ComputerName_OPC1_CollectorName
key, whereComputerName
is the name of your computer,OPC1
is an assigned value, andCollectorName
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
- Add a new
DWORD
value. Enter the nameMachineUpTimeDelay
, 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. - Close the Windows Registry and restart your computer.
- 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 theMachineUpTimeDelay
value.
Considerations When Connecting OPC Collector to Redundancy Master with Primary and Secondary IGS Servers
Consider the following information when you connect an OPC Collector to a Kepware Redundancy Master with both primary and secondary servers using IGS (Industrial Gateway Server).
- If, after creating a tag in Historian, you modify the tag???s existing source address, Historian will consider this an invalid tag until the OPC Collector is restarted.
For example, suppose there is a tag in IGS Server called ???r;Tag1 with source address K0001 and the source address of Tag1 is modified from K0001 to R9998. Historian considers this an invalid tag. No data update occurs and no Bad Quality marker is set in Historian. The OPC Collector must be restarted to ensure that data is collected for this tag in Historian.
- Restart sequence is important, and needs to be done in order from the source.
When you need to restart after encountering an issue, restart the Redundancy Master Service before restarting the OPC Collector.
- If IGS OPC tags are added in Historian Server, then these tags cannot be deleted in IGS Server.
If you attempt to delete them in IGS Server, the error ???Rejecting attempt to delete reference object??? is displayed at the IGS Server end.
To avoid this error, first delete the tags in Historian which were associated with IGS Server and then delete the device in IGS Server.
- Failure to browse IGS Server Tags may require OPC Collector restart. Note: If the OPC Collector status shows as Running, but you are unable to browse IGS Server tags, restarting your OPC Collector may solve this issue.