OPC-UA Reference
Free reference guide: OPC-UA Reference
About OPC-UA Reference
The OPC UA Reference is a comprehensive quick-lookup guide for the OPC Unified Architecture protocol, the platform-independent industrial communication standard for machine-to-machine, machine-to-cloud, and IT/OT convergence. It covers the complete OPC UA information model including the eight NodeClasses (Object, Variable, Method, ObjectType, VariableType, ReferenceType, DataType, View), four NodeId formats (numeric, string, GUID, opaque), 25 built-in data types, and the hierarchical/non-hierarchical reference system (HasComponent, HasProperty, Organizes, HasTypeDefinition) that connects nodes in the address space.
The reference is organized into five categories: Information Model (Node, NodeId with namespace indexing, NodeClass types, Variable nodes with AccessLevel/Historizing/ValueRank, Object nodes as containers, Method nodes for RPC, References defining relationships, AttributeId list, built-in DataTypes), Session/Security (4-step session establishment: OpenSecureChannel, GetEndpoints, CreateSession, ActivateSession; three authentication methods: Anonymous, Username/Password, X.509 Certificate; security policies from None to Aes256_Sha256_RsaPss; PKI certificate directory structure), Services (Read with MaxAge/TimestampsToReturn, Write with IndexRange, Browse with direction/ReferenceType filters, Call for method invocation, StatusCode error reference, HistoryRead for time-series data, TranslateBrowsePathsToNodeIds), Subscriptions (CreateSubscription with PublishingInterval/LifetimeCount, MonitoredItem with SamplingInterval/QueueSize/DeadbandFilter, Publish/Notification loop, EventFilter with SelectClauses and WhereClause severity filtering), and Extensions (Alarm/Condition hierarchy with LimitAlarmType, PubSub via MQTT/UADP-UDP, Companion Specifications for Robotics/PackML/ISA-95/MachineTool, LDS/GDS discovery, redundancy modes Cold/Warm/Hot/Transparent).
This reference serves automation engineers, SCADA/MES developers, and IIoT architects who need fast access to OPC UA concepts, service request/response structures, and configuration patterns. Whether you are implementing a client that browses an address space, setting up data change subscriptions with deadband filtering, configuring certificate-based security, or designing a Pub/Sub architecture with MQTT transport, every entry includes the exact field names, data structures, and practical configuration values.
Key Features
- Complete information model reference: 8 NodeClasses, 4 NodeId formats (ns=0;i=85 numeric, ns=2;s=MyVar string, GUID, opaque), and hierarchical/non-hierarchical reference types
- Variable node detail: DataType, AccessLevel (CurrentRead/CurrentWrite), Historizing flag, MinimumSamplingInterval, ValueRank for scalar vs. array, ArrayDimensions
- Session establishment walkthrough: OpenSecureChannel, GetEndpoints, CreateSession (SessionTimeout), ActivateSession with Anonymous/Username/X.509 UserIdentityToken
- Security policy comparison from None through Basic256Sha256 to Aes256_Sha256_RsaPss, with MessageSecurityMode options (None, Sign, SignAndEncrypt)
- Read/Write/Browse/Call service request/response structures with all key fields: MaxAge, TimestampsToReturn, AttributeId, IndexRange, BrowseDirection, ReferenceTypeId
- Subscription configuration: PublishingInterval, LifetimeCount, MaxKeepAliveCount, MonitoredItem SamplingInterval, QueueSize, DataChangeFilter with Absolute/Percent deadband
- Alarm hierarchy: BaseConditionType through AlarmConditionType to ExclusiveLimitAlarmType with HighHigh/High/Low/LowLow levels and state transitions (Inactive-Active-Acknowledged-Confirmed)
- PubSub architecture with MQTT broker and UADP-UDP multicast transport modes, PublishedDataSet, WriterGroup, and JSON/UADP message mapping options
Frequently Asked Questions
What is OPC UA and how does it differ from OPC Classic?
OPC UA (Unified Architecture) is a platform-independent, service-oriented industrial communication standard that replaces the Windows-only, DCOM-based OPC Classic (DA, HDA, A&E). OPC UA runs on any OS (Windows, Linux, embedded), supports multiple transport protocols (TCP binary, HTTPS, WebSocket), provides built-in security (encryption, authentication, certificates), and uses a unified information model where data, methods, events, and historical access are all accessed through a single protocol.
How does the OPC UA address space work?
The address space is a hierarchical tree of Nodes connected by References. The root starts at Objects (NodeId i=85), which contains the Server node (i=2253) and user-defined nodes like DeviceSet. Each node has a NodeClass (Object, Variable, Method, etc.), is identified by a NodeId (namespace + identifier), and is connected to other nodes via typed References (HasComponent for parent-child, Organizes for logical grouping, HasTypeDefinition linking instances to types).
What are the four NodeId formats?
NodeId consists of a namespace index (ns) and an identifier. The four identifier types are: Numeric (ns=0;i=85 for standard nodes), String (ns=2;s=MyVar, most common for user variables), GUID (ns=1;g=550e8400..., universally unique), and Opaque/ByteString (ns=3;b=AQID, raw bytes). Namespace 0 is reserved for OPC UA standard definitions, ns=1 for server-specific, and ns=2+ for vendor/user namespaces.
How do I establish a secure OPC UA session?
Session establishment follows 4 steps: 1) OpenSecureChannel with a SecurityPolicy (e.g., Basic256Sha256) and MessageSecurityMode (SignAndEncrypt), 2) GetEndpoints to discover available server endpoints, 3) CreateSession with SessionTimeout (e.g., 120000ms) and MaxResponseMessageSize, 4) ActivateSession with a UserIdentityToken (Anonymous, Username/Password, or X.509 Certificate). The security policy determines the encryption and signing algorithms used for the channel.
How do subscriptions and monitored items work?
CreateSubscription sets the server-side publishing parameters: PublishingInterval (how often the server checks for changes, e.g., 1000ms), LifetimeCount (how many intervals without a Publish request before the subscription expires), and MaxKeepAliveCount. Then CreateMonitoredItems adds specific nodes to watch, each with a SamplingInterval (how often the node value is read), QueueSize (how many changes to buffer), and an optional DataChangeFilter with deadband (Absolute or Percent) to suppress insignificant changes.
What security policies should I use in production?
For production, use Basic256Sha256 or newer (Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss) with MessageSecurityMode SignAndEncrypt. Never use None or Basic128Rsa15 (deprecated, vulnerable). For authentication, use Username/Password or X.509 Certificates rather than Anonymous. Manage certificates using the standard PKI directory structure: /pki/own/ for the server certificate, /pki/trusted/ for accepted client certificates, and /pki/rejected/ for pending certificates.
What is OPC UA Pub/Sub and when should I use it?
Pub/Sub enables one-to-many or many-to-many data distribution without client-server sessions. Publishers define a PublishedDataSet (e.g., Temperature, Pressure, Flow variables) and a WriterGroup with transport (MQTT broker at mqtt://broker:1883 or UADP-UDP multicast at 239.0.0.1:4840). Messages can be JSON or UADP binary format. Use Pub/Sub for high-frequency sensor data broadcast, edge-to-cloud telemetry, and scenarios where multiple consumers need the same data without individual subscriptions.
What are Companion Specifications?
Companion Specifications are standardized OPC UA information models for specific industries. Key specs include: OPC 40001-1 Machinery (general machine data), OPC 40010 Robotics, OPC 40084 PackML (packaging machines), OPC 30000 ISA-95 (MES/ERP integration), OPC 40502 MachineTool (CNC machines), OPC 40501 MachineVision, and OPC 40600 PADIM (process automation). They define standardized node structures so that any compliant device exposes data in the same way, enabling plug-and-play interoperability.