Operating Systems

Query OPC UA Industrial Systems with cnspec

Query Linux-based industrial systems via OPC UA with cnspec

Rely on cnspec to query Linux-based industrial control systems through the OPC UA (Open Platform Communications Unified Architecture) protocol. This provider is designed for industrial automation systems such as Phoenix Contact PLCnext controllers that run Linux-based operating systems.

Prerequisites

To analyze and explore your industrial systems with cnspec, you must have:

Connect to an industrial system

To query a Linux-based industrial system via OPC UA, provide the endpoint URL:

cnspec shell opcua --endpoint opc.tcp://HOST:PORT
For...Substitute...
HOSTThe industrial system hostname or IP address
PORTThe OPC UA server port (typically 4840)

For example, to connect to a PLCnext controller:

cnspec shell opcua --endpoint opc.tcp://192.168.1.50:4840

Example queries

Retrieve OPC UA server information

cnspec> opcua.server
opcua.server: {
  ...
}

Retrieve all namespaces

cnspec> opcua.namespaces
opcua.namespaces: [
  0: opcua.namespace name="http://opcfoundation.org/UA/"
  ...
]

Retrieve the root node

cnspec> opcua.root
opcua.root: opcua.node id="i=84" name="Root"

List all nodes

cnspec> opcua.nodes
opcua.nodes: [
  0: opcua.node id="i=84" name="Root"
  1: opcua.node id="i=85" name="Objects"
  ...
]

Learn more

On this page