OPC UA: Call Node

The OPC UA: Call Node allows you to call a method on an object within your OPC UA Server and connected programmable logic controller (PLC). This node is only available in Edge Workflows.

OPC UA Call Node

Node Properties

There are five main parts of the properties for this node …

Connection Configuration

OPC UA Call Node Configuration

Connection Configuration contains:

  • OPC UA URI (Required): A string template for the OPC UA server URI.
  • Username (Optional): A string template for login username.
  • Password (Optional): A string template for login password.

Security Settings

You can optionally select a SSL/TLS “Security Policy” for the connection to the OPC UA server through the dropdown selector. Security Policy options include:

  • None
  • Basic-128
  • Basic-128 RSA-15
  • Basic-192
  • Basic-192 RSA-15
  • Basic-256
  • Basic-256 SHA-256

OPC UA Call Node SSL/TLS Security

If a Security Policy is selected, you will have the option to select between “Sign” or “Sign and Encrypt” security modes. You’ll then be required to provide a valid SSL/TLS client certificate and private key.

Call Instructions

OPC UA Call Instructions

Call Instructions can be specified in one of two ways. At least one is required, but both can’t be specified at the same time.

  • Template Strings: For the Call Instruction, fill out the following input configuration fields, all of which can utilize templates:

    • Object Namespace Index (ns) (Required): A string template or positive integer.
    • Object Identifier (Required): A string template or string for the node identifier. The identifier string should begin with one of the following types:
    • i=: for unsigned integer (UINT).
    • s=: for string.
    • g=: for global unique identifier (GUID).
    • b=: for byte string.
    • Method Namespace Index (ns) (Required): A string template or positive integer.
    • Method Identifier (Required): A string template or string for the node identifier. The identifier string should begin with one of the following types:
    • i=: for unsigned integer (UINT).
    • s=: for string.
    • g=: for global unique identifier (GUID).
    • b=: for byte string.
  • Payload Path: (edge version 1.18.0 and above) Enter a payload path that resolves to an array of Read Instructions to be run on this node. The following are the object properties that each object in the array should contain for successful attempts:

    • nameSpace: (Required) A string or positive integer.
    • identifier: (Required) A string for the node identifier. The identifier string should begin with one of the following types:
    • i=: for unsigned integer (UINT).
    • s=: for string.
    • g=: for global unique identifier (GUID).
    • b=: for byte string.
    • methodNs (Required): A string or positive integer.
    • methodId (Required): A string for the node identifier. The identifier string should begin with one of the following types:
    • i=: for unsigned integer (UINT).
    • s=: for string.
    • g=: for global unique identifier (GUID).
    • b=: for byte string.
    • methodArguments (Required): Array of optional method argument objects with the following fields:
    • dateType (Optional): The associated OPC UA data type.
    • arrayType (Optional): The associated OPC UA array type.

      • Scalar for single value or no array.
      • Array for one dimensional array.
      • Matrix for multi-dimensional array.
    • value (Optional): The method argument value string or number.

The following is an example of an array that you could pass in:

{
  "nameSpace": 1,
  "identifier": "s=MyObject",
  "methodNs": 2,
  "methodId": "s=MyMethod",
  "methodArguments": [
    {
      "dataType": "1",
      "arrayType": "scalar",
      "value": "pi"
    }
  ]
}

Method Arguments

OPC UA Call Method Instructions

Optionally you may define multiple method arguments for the OPC UA: Call Node. The method arguments each have the following fields:

  • Data Type (Optional): The associated OPC UA data type.
  • Array Type (Optional): The associated OPC UA array type.

    • Scalar for single value or no array.
    • Array for one dimensional array.
    • Matrix for multi-dimensional array.
  • Value Source Type (Optional): A string template (or string) or payload path for the argument value.
  • Value (Optional): The method argument value.

Destination Path

OPC UA Call Node Result

The result of the method detailed in the call instructions will be placed in an object at the Destination Path (a payload path) within the result key array.

If the result key is not present in the Destination Path of the payload, it means the call failed, and there will be a list of errors at the Destination Path under the key errors.

Node Example

The following is an example of a successful call, and the Destination Path is OPCUA_PLC:

{
  "OPCUA_PLC": {
    "result": [3.14159]
  }
}

Node Errors

The following is an example of a failure to call, and the destination path is OPCUA_PLC:

{
  "OPCUA_PLC": {
    "errors": [
      {
        "type": "OPC-UA_CALL_ERROR",
        "message": "Something useful to help you fix the issue."
      }
    ]
  }
}

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.