avatar  

Log out

Recently viewed tickets

OPC UA collector



The Collectors (array of objects, mandatory ) list elements contains the following fields:

  • CollectorName (string, mandatory ) which is unique name (within this confguration file) of a device to collect data from. (This is the name used in the agent configuration). Follows the normal rules for names.
  • CollectorDesription (string, optional) description of this collector.
  • CollectorIPAddr (string, optional) provides a default IP address (or DNS name) for the device to be polled. The agent Target IP address will take precedence over this.
  • CollectorPortno (integer > 0 and < 65535, optional) provides the default port number for the device to be polled. The agent Target Port number will take precedence over this. If neither CollectorPortno , nor agent Target Port Number is specified, the appropriate port will be used, depending on the Protocol parameter value.
  • Alias (string, optional). This is the CollectorName of another collector, from which, all the parameters (expect CollectorName , CollectorDescription , CollectorIPAddr and CollectorPortno ) are copied from. An alias cannot refer to another alias.
  • Protocol (string-enum, mandatory ) the protocol used to collected data. Currently 3 possible values exists: "OPC-UA/TCP", "Modbus/TCP", "Http/GET" and "Simulator".
  • ConnectRetryMin (integer > 0, mandatory ) Minimum number of seconds before trying to reestablish a connection to the device being sampled. An exponential backoff algorithm is used to retry connection establishment, starting after ConnectRetryMin and increasing to ConnectRetryMax .
  • ConnectRetryMax (integer > 0, mandatory ) Maxumin number of seconds before trying to reestablish a connection to the device being sampled.
  • OPCUAAccess (Object, optional) collection of parameters needed to access a given OPC-UA/TCP server.
  • SamplePoints (Array of objects, mandatory ) List of samples to be collected, possibly aggregated and stored in the Store'n'Forward database.

Partial example1:

{
"CollectorName" : "Test2OPCUA",
"CollectorDescription" : "Testing with Prosys OPC-UA Simulation Server",
"Protocol" : "OPC-UA\/TCP",
"ConnectRetryMin" : 2,
"ConnectRetryMax" : 240,
"OPCUAAccess" : {



OPC UA collector items

The OPCUAAccess object contains the following elements:

  • OPCUASecurityPolicy (string-enum, mandatory ). The security policy for the communication channel between DCM (OPC-UA client) and the OPC-UA server. Currently 1 possible values exists: "none".
  • OPCUAUserTokenType (string-enum, mandatory ) The user authentication methods used when collecting data. Currently 1 possible value exists: "anonymous"
  • OPCUAPath (string, optional) additional path component to the URL used for conecting to the OPC-UA server.
  • OPCUATimeStampPolicy (string-enum, mandatory ). The timestamp to mark collected data with. Currently 3 possible values exists: "source", "server" or "dcm". If the polled OPC-UA server doesn't support the requested timestamp, DCM will fall back from Source->Server->DCM. This field also serves as the default value for the optional field OPCUATimeStampPolicy in sample OPCUAObject .
  • OPCUATimeout (integer > 0, optional). Timeout (in millisecs) for this OPC-UA query requests. If not present the value 500 is used.

Partial example:

"OPCUAAccess" : {
"OPCUASecurityPolicy" : "none",
"OPCUAUserTokenType" : "anonynmous",
"OPCUATimeStampPolicy" : "dcm"

},





Samplepoint items

The SamplePoints objects contains the following elements:

  • SampleName (string, mandatory ) Name of this sampled value (sometimes called a tagname). Follows the normal rules for names.
  • SampleDescription (string, optional) is a text description of this sample value.
  • SampleUnit (string, optional) is a description of the unit of messurement for this sample.
  • SampleGroup (string, optional) designates (in some datasrvs) that all samplepoints in that group should be handled (displayed) together. The DCM system itself places no meaning on this group affiliation.
  • ' SamplesSaved (integer > 0, mandatory) is the number of values collected that is saved in the Store'n'Forward database.
  • OnlySaveOnChanged (bool, optional) control is new sample values should only be saved to the store-and-forward database if the values have changed since last sample. If not set, it is false.
  • SampleDataType (string-enum, mandatory ) is the type of data collected. The possible values are: "bool" (1 bit), "sbyte" (8 bit signed), "byte" (8 bit unsigned), "int16" (16 bit signed), "uint16" (16 bit unsigned), "int32" (32 signed), "uint32" (32 bit unsigned), "int64" (64 bit signed), "uint64" (64 bit unsigned), "float" (32 bit), "double" (64 bit), "string" (variable text up to 24575 bytes. Includes terminating NUL), "data" (variable variable data up to 24575 bytes).
  • SampleLowerLimit (integer/double, optional) Is the lower limit for the collected data. If the collected data value is less than SampleLowerLimit it is discarded.
  • SampleUpperLimit (integer/double, optional) Is the upper limit for the collected data. If the collected data value is more than SampleUpperLimit it is discarded.
  • SampleLimitDiscard (bool, maybe-optional). Controls if a sample limit violation results in the sample value being discarded. Mandatory if either SampleLowerLimit or SampleUpperLimit is present.
  • SampleLimitAlarm (bool, maybe-optional). Controls if a sample limit violation generates an alarm. Mandatory if either SampleLowerLimit or SampleUpperLimit is present.
  • OPCUAObject (Object, maybe-optional) is a description of how to address a specific OPC-UA object, when collecting values from it. Mandatory if the protocol type is "OPC-UA/TCP".
  • Aggregation (object, optional) is a description of how to create a new sample value by performing an aggregation function of other sample values, either physically sample values or other aggregation created sample values.


OPC UA samplepoint

The OPCUAObject object contains the following fields:

  • NodeIdNameSpaceIndex (integer >= 0 and < 65535, mandatory ). This is the OPC-UA namespace index.
  • NodeIdType (string-enum, mandatory ). This is the OPC-UA NodeID type. The possible values are: "numeric", "string", "guid" or "bytestring".
  • NodeIdNumeric (integer, maybe-optional). This is OPC-UA NodeID numeric value. Only mandatory if the value of NodeIdType is "numeric".
  • NodeIdString (string, maybe-optional). This is OPC-UA NodeID string value. Only mandatory if the value of NodeIdType is "string".
  • NodeIdGuid (string, maybe-optional). This is OPC-UA NodeID GUID value. Only mandatory if the value of NodeIdType is "guid". The format is hex-digits with hyphens enclosed in curly brackets: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} (38 characters).
  • NodeIdByteString (string, maybe-optional). This is OPC-UA NodeID byte string value. Only mandatory if the value of NodeIdType is "bytestring". The format is hex-digitis. Must not be an empty string and must contain a even number of hex digits.
  • OPCUASampleInterval (integer >= 0, mandatory ). The number of seconds between each sample of this OPC-UA object. If the interval is 0, only eventdriven polling is used.
  • OPCUATimeStampPolicy' (string-enum, optional). The timestamp to mark this sample data with. Currently 3 possible values exists: "source", "server" or "dcm". If this field is not present the OPCUATimeStampPolicy filed from the OPCUAAccess object, this sample belongs to, will be used instead.

Examples:

{
"CollectorName": "OmronOPCUA",
"CollectorDescription": "Example Omron NX1 with OPC-UA Server",
"Protocol": "OPC-UA/TCP",
"ConnectRetryMin": 2,
"ConnectRetryMax": 240,
"OPCUAAccess": {
"OPCUASecurityPolicy": "none",
"OPCUAUserTokenType": "anonynmous",
"OPCUATimeStampPolicy": "dcm"
},
"SamplePoints": [
{
"SampleName": "Temp1",
"SampleDescription": "B1 Potmeter",
"SamplesSaved": 1000,
"SampleDataType": "int16",
"SampleLimitDiscard": true,
"SampleUpperLimit": 8100,
"SampleLowerLimit": 0,
"SampleLimitAlarm": false,
"OPCUAObject": {
"NodeIdNameSpaceIndex": 4,
"NodeIdType": "string",
"NodeIdString": "Analog1",
"OPCUASampleInterval": 4
}
}
]
}

 {
"CollectorDescription": "Example with Siemens PLC w/OPC-UA Server",
"CollectorName": "Test2OPCUA",
"ConnectRetryMax": 240,
"ConnectRetryMin": 10,
"OPCUAAccess": {
"OPCUASecurityPolicy": "none",
"OPCUATimeStampPolicy": "dcm",
"OPCUAUserTokenType": "anonynmous"
},
"Protocol": "OPC-UA/TCP",
"SamplePoints": [
{
"OPCUAObject": {
"NodeIdNameSpaceIndex": 3,
"NodeIdString": "\"DB_MRUSim\".\"Out\"",
"NodeIdType": "string",
"OPCUASampleInterval": 1
},
"SampleDataType": "double",
"SampleDescription": "AHC curve",
"SampleName": "AHC",
"SamplesSaved": 10
}
]
}


Creation date: 11/12/2019 14:08 (skr@secomea.com)      Updated: 18/03/2020 08:27 (tvo@secomea.com)