OPC-UA CSV Import and Export

OPC UA supports importing and exporting inputs using CSV files. This allows you to quickly configure multiple inputs or share input configurations between projects.

Exporting Inputs to CSV

To export one or more OPC UA inputs as CSV:

  1. Navigate to the inputs list page for your OPC UA connection
  2. Select the inputs you want to export by checking the boxes next to them
  3. Click the Actions dropdown menu
  4. Select CSV Export

The exported CSV file will contain all the selected inputs in the format described below, making it easy to share, backup, or modify input configurations.

Importing Inputs from CSV

OPC UA supports importing inputs from a CSV file. Below the columns for different input types as well as the common columns are outlined. A single CSV file can include all types by including all columns and leaving columns empty for a given row if it does not apply.

Limitations

  • Template and Parameter settings

CSV Format

The CSV format supports all OPC UA input types including Tags, Branches, Collections, Events, and Methods. Each input is represented by one or more rows in the CSV file.

Basic Input Columns

Column Description
name The name of the input.
qualifier.type The type of OPC UA input. Valid types are Tag, Branch, Collection, Event, or Method. This controls the remaining qualifier columns.
version The project version number. This correlates with the project version.

Addressing Modes

OPC UA inputs support two addressing modes: NodeId and Path. The addressing mode is controlled by the qualifier.identifier.type field (or qualifier.collection.identifier.type for collections), which determines which additional fields are required.

NodeId Addressing

NodeId addressing directly references a node using its unique identifier. This is the most common addressing mode. When qualifier.identifier.type is set to “NodeId”, the following columns are used:

  • qualifier.identifier.namespaceIndex - The namespace index (ex. 2)
  • qualifier.identifier.identifierType - The type of identifier (String, Numeric, GUID, or Opaque)
  • qualifier.identifier.value - The actual identifier value

Path Addressing

Path addressing uses a relative path from a starting node to navigate the OPC UA hierarchy. This mode is useful when referencing nodes by their browse path. When qualifier.identifier.type is set to “Path”, the following columns are used:

  • qualifier.identifier.startNode.type - Must be “NodeId”
  • qualifier.identifier.startNode.namespaceIndex - The namespace index of the start node
  • qualifier.identifier.startNode.identifierType - The identifier type of the start node
  • qualifier.identifier.startNode.value - The identifier value of the start node
  • qualifier.identifier.relativePath.uri - The namespace URI for each segment of the path
  • qualifier.identifier.relativePath.name - The browse name for each segment of the path

When using Path addressing, each segment of the path is represented on a separate row with empty Basic Input Columns. The uri and name columns are filled for each segment in order.

Tag Columns

Tags reference a single OPC UA node for data collection. They support both NodeId and Path addressing.

NodeId Addressing

Column Description
qualifier.identifier.type Set to “NodeId” to use NodeId addressing. This controls which identifier fields are required.
qualifier.identifier.namespaceIndex The namespace index for the tag (ex. 2).
qualifier.identifier.identifierType The type of identifier for the tag. String, Numeric, GUID, and Opaque are supported.
qualifier.identifier.value The identifier for the tag.
qualifier.samplingInterval.duration (optional) Override the default sampling interval for the tag.
qualifier.samplingInterval.units (optional) Units for the duration.
qualifier.isComplex (optional) Enable to include meta data with the tag.

Path Addressing

Set qualifier.identifier.type to “Path” to use Path addressing. This requires the relative path columns (qualifier.identifier.startNode.* and qualifier.identifier.relativePath.*) as described in the Addressing Modes section instead of the standard NodeId identifier columns. The samplingInterval and isComplex columns work the same way as with NodeId addressing.

Collection Columns

Collections are expressed as multiple rows, where the first row includes the Basic Input Columns and the first tag in the collection. Subsequent rows leave the Basic Input Columns empty and fill in the collection columns with the remaining tags in the collection. Collections support both NodeId and Path addressing.

NodeId Addressing

Column Description
qualifier.collection.name The name of the tag in the collection.
qualifier.collection.identifier.type Set to “NodeId” to use NodeId addressing. This controls which identifier fields are required.
qualifier.collection.identifier.namespaceIndex The namespace index for the tag (ex. 2).
qualifier.collection.identifier.identifierType The type of identifier for the tag. String, Numeric, GUID, and Opaque are supported.
qualifier.collection.identifier.value The identifier for the tag.
qualifier.ignoreBadQuality (optional) Enable to ignore bad quality values.
qualifier.isComplex (optional) Enable to include meta data with each tag in the collection.
qualifier.samplingInterval.duration (optional) Override the default sampling interval for the collection.
qualifier.samplingInterval.units (optional) Units for the duration.

Path Addressing

Set qualifier.collection.identifier.type to “Path” to use Path addressing. This requires the relative path columns (qualifier.collection.identifier.startNode.* and qualifier.collection.identifier.relativePath.*) as described in the Addressing Modes section instead of the standard NodeId identifier columns. When using Path addressing with collections, each tag in the collection and each segment of its path is represented on a separate row. The qualifier.collection.name column should be filled for rows that represent a complete tag path.

Branch Columns

Branches reference an OPC UA node and automatically collect data from all descendant nodes according to configured browsing rules. Branches support both NodeId and Path addressing.

NodeId Addressing

Column Description
qualifier.identifier.type Set to “NodeId” to use NodeId addressing. This controls which identifier fields are required.
qualifier.identifier.namespaceIndex The namespace index for the branch root node (ex. 2).
qualifier.identifier.identifierType The type of identifier for the branch root node. String, Numeric, GUID, and Opaque are supported.
qualifier.identifier.value The identifier for the branch root node.
qualifier.cacheInterval.duration (optional) How often to refresh the browse hierarchy.
qualifier.cacheInterval.units (optional) The units for how often to refresh the browse hierarchy.
qualifier.maxDepth (optional) Max depth to browse and read. 0 means one level, 1 means two levels, etc.
qualifier.browseVariableNodes (optional) Disabled by default. Browses variable node types.
qualifier.ignoreBadQuality (optional) Enable to ignore bad quality values.
qualifier.isComplex (optional) Enable to include meta data with each tag in the branch.

Path Addressing

Set qualifier.identifier.type to “Path” to use Path addressing. This requires the relative path columns (qualifier.identifier.startNode.* and qualifier.identifier.relativePath.*) as described in the Addressing Modes section instead of the standard NodeId identifier columns. The cacheInterval, maxDepth, browseVariableNodes, ignoreBadQuality, and isComplex columns work the same way as with NodeId addressing.

Event Columns

Events allow you to subscribe to OPC UA event notifications from a specified node. Events use NodeId addressing only.

Column Description
qualifier.identifier.type Set to “NodeId” for events (Path addressing is not supported for events).
qualifier.identifier.namespaceIndex The namespace index for the event source node (ex. 2).
qualifier.identifier.identifierType The type of identifier for the event source node. String, Numeric, GUID, and Opaque are supported.
qualifier.identifier.value The identifier for the event source node.
qualifier.filter (optional) A filter string to apply to the events. Accepts any string value.

Events can span multiple rows if multiple filter values need to be specified. Subsequent rows should leave the Basic Input Columns empty and specify additional qualifier.filter values.

Method Columns

Methods allow you to invoke OPC UA methods with specified input arguments and capture output arguments. Methods use NodeId addressing only.

Column Description
qualifier.identifier.type Set to “NodeId” for the object node containing the method (Path addressing is not supported for methods).
qualifier.identifier.namespaceIndex The namespace index for the object node that contains the method (ex. 2).
qualifier.identifier.identifierType The type of identifier. String, Numeric, GUID, and Opaque are supported.
qualifier.identifier.value The identifier for the object node.
qualifier.method.identifier.type Set to “NodeId” for the method node.
qualifier.method.identifier.namespaceIndex The namespace index for the method node.
qualifier.method.identifier.identifierType The type of identifier for the method node.
qualifier.method.identifier.value The identifier for the method node.
qualifier.method.inputArguments.name The name of an input argument. This is an array field.
qualifier.method.inputArguments.description The description of an input argument. This is an array field.
qualifier.method.inputArguments.dataType The data type of an input argument. This is an array field.
qualifier.method.inputArguments.value The value of an input argument. This is an array field.
qualifier.method.outputArguments The output arguments to capture from the method. This is an array field.

For array fields (inputArguments and outputArguments), multiple values should be represented within the same cell or across multiple rows as supported by your CSV format.