OPC-UA collector
Basic settings
These settings are used by the collector to successfully connect to the OPC-UA server.
UAEndpoint
Description: The location of the OPCUA server. Required: yes Example: opc.tcp://localhost:1234
This configures the ip address and the port on which the OPC-UA server is listening.
UASecurityMode
Description: Security Mode for the UA server. Required: no Default: None Options: None | Sign | SignAndEncrypt
None can only be selected if the UASecurityPolicy is None as well.
More information on the website of the OPC foundation.
UASecurityPolicy
Description: Security Policy for the UA server. Required: no Default: None Options: None | Basic128 | Basic128Rsa15 | Basic192 | Basic192Rsa15 | Basic256 | Basic256Rsa15 | Basic256Sha256
More information on the website of the OPC foundation.
UAUserName
Description: The username for basicauth. Required: no
UAPassword
Description: The password for basicauth. Required: no
OPC-UA certificates
When the security mode is set to Sign or SignAndEncrypt, the collector will require a certificate to communicate with the OPC-UA server.
Certificate files
The certificate files cert.pem and key.pem are saved under the collector certificates folder in the configured working directory. Note that if these files do not exist yet, the collector will automatically generate them once the UAEndpoint is correct and both the UASecurityMode and UASecurityPolicy are not None.
Linux /var/opt/factry/[collector_uuid]/certificates
Windows C:\\ProgramData\\factry\\[collector_uuid]\\certificates
Measurement settings
The measurement settings reflect the configuration possibilities for mapping a measurement to an OPC-UA tag.
NodeID
Description: The OPC-UA nodeID where this measurement should be collected. Required: Yes Example: ns=1;s=Saw_1
CollectionType
Description: The way this measurement should be collected from the OPC-UA server. Required: yes Default: polled Options: polled | monitored | events
Checkout the data collection methodsdata collection methods section for more information.
CollectionInterval
Description: The interval in milliseconds at which this measurement should be collected. Required: yes Default: 5000
CollectionOffset
Description: The offset in milliseconds, relative to the 0th second of a minute, at which this measurement should be collected. Only relevant for polled measurements. Required: yes Default: 0
GetValueAtIndex
Description: If true, the value of the array element at the specified index will be collected. If false, the entire array will be collected. Only relevant for array type nodes. Default: false
ArrayIndex
Description: The index of the array element to be collected. Only relevant for array type nodes. Default: 0
EventTypeFilter
Description: Only monitor events of the configured event type. Only relevant if CollectionType is ’event’. Example: ns=0;i=2041
EventFilterField
Description: The event field to filter on. Required: yes if CollectionType is ’event’ and EventTypeFilter is not empty. Example: Severity
EventFilterOperator
Description: The comparison operator to apply. Required: yes if CollectionType is ’event’ and EventTypeFilter is not empty. Options: Equal | GreaterThan | GreaterThanOrEqual | LessThan | LessThanOrEqual
EventFilterValue
Description: The value to compare against. Required: yes if CollectionType is ’event’ and EventTypeFilter is not empty.
Advanced settings
ReadTimeout
Description: The OPC-UA read request timeout in milliseconds. Required: no Default: 5000
HeartBeatTimeout
Description: The OPC-UA heartbeat timeout in milliseconds, minimum 5000. Required: no Default: 10000 Minimum: 5000
MaxNodesPerMonitor
Description: Maximum amount of nodes that can be sent in one monitor request. Required: no Default: 10000 Minimum: 1
MaxNodesPerRead
Description: Maximum nodes that can be read in one request. Required: no Default: 10000 Minimum: 1
MaxNodesPerRegister
Description: Maximum nodes that can be registered in one request, set to 0 to skip node registration. Required: no Default: 10000
MaxReadRequest
Description: Maximum amount of running OPC-UA read requests. Required: no Default: 5 Minimum: 1
Data collection methods
The OPC-UA collector has 3 methods to collect measurement data, which are referred to as the collection type of a measurement.
Polling
Polled measurements are read every x milliseconds (minimum of 1000ms), which is the collection interval. This data collection method should be used for measurements for which the value changes regularly over time. Configure the interval depending on how frequent you want to collect data points for this measurement.
Monitoring
Monitored measurements collect data on every change of the measurements value. This data collection method uses a subscription on the OPC-UA server that notifies the collector whenever a change occurs (Note that this depends on the scanning frequency of the OPC-UA device). Typically, monitored measurements are configured for boolean or string data types that indicate an equipments state, f.e. for a valve that opens and/or closes only a few times per hour.
Events
Event measurements collect all OPC-UA Alarms & Conditions events from the OPC-UA server. This data collection method uses a subscription on the OPC-UA server that notifies the collector of all events that occur under the configured node. Measurements of this collection method can set their datatype to raw. This will store the event fields as separate fields in the historian and some exceptions as tags. For other datatypes will all event fields be stored as tags and the ActiveState as the value.
Fields saved as tags for the raw datatype are:
- EventType
- SourceName
- ConditionName
Timestamps
In case of polled measurements, the source of the timestamp is taken from the system where the collector is running on. In case of monitored and event measurements, the timestamp is taken from the update message received from the OPC-UA server, in which case that is used. We cannot take the timestamp of insertion, as in the case of buffering that can be days later than the actual sampling.
Collector health
OPC-UA Specific collector health messages. See here for all generic collector health messages.
You can find the collector health and the collector history in the detail view on the right, when selecting a collector in the historian admin webpage.
Error initializing collector
An error occurred when initializing the OPC-UA collector. This indicates a collector setting hasn’t been configured correctly or the OPC-UA server isn’t reachable during initialization.
Error connecting to OPC-UA server
The OPC-UA server isn’t reachable for an initialized collector on a connection attempt.
Disconnected: timeout heartbeat
The collector lost connection to the OPC-UA server.
Common OPC-UA status codes
When reading points for a measurement from the OPC-UA server, the collector can receive status codes that indicate the quality of the data point. The collector uses these status codes to determine if the data point is valid or not. StatusOk(0x00) is the only status code that indicates a valid data point by default. However other status codes can be configured to be considered as valid data points in the collector’s advanced setting ‘StatusGood’advanced setting ‘StatusGood’.
A list of all OPC-UA status codes and their description can be found here.
In some cases we set custom status codes to indicate the quality of the data point. These custom status codes are:
Custom Status Code | Description |
|---|---|
BadFactryOPCUARegisterNodesFailed | The collector failed to register the nodes with the OPC-UA server. |
BadFactryOPCUATooManyOpenReadRequests | The collector has too many open read requests with the OPC-UA server. |
BadInvalidNodeID | The nodeID specified in the measurement settings is invalid. |
BadNoValueAtArrayIndex | The array index specified in the measurement settings is out of bounds. |
UnknownStatusCode_0xXXX | The status code received from the OPC-UA server is unknown. |
BadFactryMonitorError | The collector failed to monitor the nodes with the OPC-UA server. |
BadNoValueAtArrayIndex | The array received from the OPC-UA server has no value at the configured index. |