OPC-UA collector
Basic settings
These settings are used by the collector to successfully connect to the OPC-UA server.
UAEndpoint
Description: The discovery endpoint of the OPC-UA server. A path is allowed, for example opc.tcp://host:4840/discovery. To connect to a different URL than the one the server advertises, see UAConnectEndpoint under the advanced settings. 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 | event
Checkout the data 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: no Example: Severity
EventFilterOperator
Description: The comparison operator to apply. Required: no Default: Equals Options: Equals | GreaterThan | GreaterThanOrEqual | LessThan | LessThanOrEqual
EventFilterValue
Description: The value to compare against. Required: no
The field, operator and value filter is applied only when both EventFilterField and EventFilterValue are set. With EventTypeFilter set and these left empty, events are filtered on the event type alone.
CollectionGroup
Available from OPC-UA collector version 2.5.0 and later.
Description: Measurements that fall due on the same tick and share the same collection group are polled in the same OPC-UA read request. The tick a measurement falls on follows from its collection interval and collection offset, so measurements with different collection intervals can still coincide on the same tick and be polled together. Use this to isolate measurements that are known to cause timeouts, so they do not block or time out the read requests of other measurements. Only relevant for polled measurements. Required: no Default: empty (all measurements without a collection group are polled together as one default group)
A group is not always a single request: its measurements are split into chunks of MaxNodesPerRead nodes, and each chunk is one read request.
From OPC-UA collector version 2.5.0 and later, the MaxReadRequests advanced setting is applied per collection group, so each group has its own limit on concurrent read requests.
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
MaxReadRequests
Description: Maximum amount of running OPC-UA read requests. From OPC-UA collector version 2.5.0 and later, this limit is applied to each collection group separately, and when a group reaches the limit its measurements receive the BadFactryOPCUATooManyOpenReadRequests status code for that poll. Required: no Default: 10 Minimum: 1
FailedReadRequestsLimit
Description: The number of consecutive failed read requests after which the collector sets its health to Unstable. The health returns to Collecting once reads succeed again. Set to 0 to disable. Required: no Default: 10 Minimum: 0
ConnectTimeout
Description: The timeout in milliseconds for endpoint discovery and for each connection attempt. Raise this for slow or NAT'ed servers. Required: no Default: 15000
Lifetime
Description: The requested secure channel lifetime in minutes. The server may cap the value it grants. Required: no Default: 60 Minimum: 1
MonitorRetryTimeout
Description: The delay in minutes after which monitored measurements that failed to be monitored are retried. Required: no Default: 10 Minimum: 5
UAConnectEndpoint
Description: Overrides the URL used for the session connection. Set this when the server advertises an endpoint URL the collector cannot reach, for example behind NAT or with an internal hostname. When empty the connection URL is derived from UAEndpoint and the selected endpoint. Required: no
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 the boolean, number and string datatypes the value is the ActiveState, and only EventType, SourceName, ConditionName, Message and Severity are stored as tags. Time becomes the point timestamp and Quality becomes the point status; the remaining event fields are dropped.
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 herehere 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.
Unstable
The collector reached FailedReadRequestsLimit consecutive failed read requests. It keeps running and returns to Collecting once reads succeed again.
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. A status code of 0x00 is the only one that indicates a valid data point by default; the collector writes an empty status on such a point. StatusOk is not a value the collector ever produces, so do not put it in StatusGood. However other status codes can be configured to be considered as valid data points in the collector’s 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 | GetValueAtIndex is enabled, but the value received from the OPC-UA server has no value at the configured ArrayIndex. Either the index is out of bounds, or the node did not return an array. |
UnknownOPCStatusCode_0xXXX | The status code received from the OPC-UA server is unknown. The suffix is the code in uppercase hexadecimal, without zero padding. |
BadFactryMonitorError | The collector failed to monitor the nodes with the OPC-UA server. |