Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

OpcUaBrowseToJson

  • Last UpdatedOct 29, 2026
  • 2 minute read

OpcUaBrowseToJson is a built-in function that browses an OPC UA connection and creates a JSON output file.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

OpcUaBrowseToJson

File

Synchronous

No

Supported (Server Only, see "Notes")

Not supported

Supported

Not supported

Supported

Syntax

OpcUaBrowseToJson( "strOpcUaClientConnectionName", "strOutputJson", "strNodeIdFilter" )

strOpcUaClientConnectionName

This string parameter specifies the exact Connection Name of the OPC UA Connection that has already been configured. A static string value must be enclosed in quotes as shown in the syntax and the example. A string tag may be used; the tag name should not be enclosed in quotes.

strOutputJson

This string parameter specifies the complete path and filename of the output JSON file. A static string value must be enclosed in quotes as shown in the syntax and the example. The filename must have the correct JSON extension (example: c:\myApp\output.json). A string tag may be used; the tag name should not be enclosed in quotes.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

strNodeIdFilter

This string parameter contains the starting OPC UA node ID. A static string value must be enclosed in quotes as shown in the syntax and the example. A blank value ("") will set the starting node to the root node. A string tag may be used; the tag name should not be enclosed in quotes.

Returned value

This function returns no value.

Notes

This function can be executed only on the project server, where the Edge HMI development environment must be installed and running with at least a Runtime license. You can use the functions StartTask, EndTask, and IsTaskRunning with the parameter "Studio" to programmatically control the development environment.

Examples

Using tags:

OpcUaBrowseToJson(sOpc2Json, sOutJsonFile, sStartNode)

Not using tags, with the starting node unspecified (starting at the root node):

OpcUaBrowseToJson("studio", "c:\path\to\file.json", "")

Not using tags, with the starting node specified:

OpcUaBrowseToJson("studio", "c:\path\to\file.json", "ns=2;s=Studio.Tags.Application")

In This Topic
Related Links