OPC UA, standardized as IEC 62541, is normally the preferred PLC-to-MES interface because it reduces separate host-application and PLC-specific integrations by moving interoperability into a common service and information-model layer [S1][S2].
The choice depends on controller support, protocol documentation, cybersecurity, semantics, maintenance ownership, and plant topology; a programmable logic controller with a native OPC UA server generally offers lower integration effort than a bespoke PLC driver.
Decision criteria and architecture choice
OPC UA is a platform-independent framework formalized as IEC 62541. It supports communication across Windows, Linux, Android, iOS, and embedded microcontrollers, while a configurable server can use TCP port 4840 and X.509 certificate authentication [S1][S3].
A native PLC driver performs four identifiable functions: session management, message formatting, address translation, and response parsing with error mapping. For example, a host may translate `DB111.DBD0`, `N7:0`, `D100`, `%MW100`, or `40001` into the register references of S7, MELSEC, FINS, or Modbus implementations [S2].
Choose native OPC UA when the PLC includes an OPC UA server, the MES client supports IEC 62541, and the required tags can be exposed through a defined namespace and information model. Choose a custom driver when no supported server exists, the device has no documented protocol messages, or a required signal cannot be represented by the available OPC UA model [S2][S4].
OPC UA against custom PLC drivers
OPC UA reduces the native integration burden from an M × N model, where M applications each implement N PLC protocols, to M + N: N PLC-side drivers or servers and M OPC UA clients. The same M + N structure can also be achieved through a gateway, while a gateway architecture presents one southbound protocol and one northbound interface [S2].
OPC UA is stronger on interoperability and semantics; a custom driver can win when the target device is unsupported, undocumented, or requires behavior outside the available server products. OPC UA is not appropriate where the MES cannot consume IEC 62541, and a custom driver is not appropriate where supported standard connectivity already satisfies the data model and security requirements [S2][S4].
Security and information-model requirements

OPC UA places security and data context in the interface rather than treating a tag as an unexplained number.
Security design must still be explicit. OPC UA supports X.509 client and server certificates and encrypted transport, but certificate issuance, trust lists, application-instance identification, user authentication, and authorization remain plant responsibilities [S1][S3]. A certificate-backed endpoint does not replace network segmentation or least-privilege control of write access.
For MES transactions, distinguish live process values from business events. Batch records, material genealogy, and operator actions may require ISA-88-oriented process and equipment models rather than a flat collection of controller variables. The related ISA-88 batch-control structures explain why operational hierarchy and production-unit context matter downstream.
Brownfield use cases and gateway placement
Brownfield PLCs that lack OPC UA normally communicate through vendor-native protocols such as Modbus TCP, EtherNet/IP, S7, MELSEC, or FINS. A gateway can centralize those southbound drivers and publish one OPC UA endpoint northbound, reducing client-side variation without forcing a controller replacement [S2].
It adds an engineering layer, so the gateway becomes an availability dependency and must be monitored for CPU use, communication loss, certificate expiry, time synchronization, and upstream session capacity [S2].
Custom OPC connectivity becomes rational when protocol documentation is available but no off-the-shelf driver covers the device. A custom driver can support OPC UA connectivity for secure and reliable integration of edge devices with upstream systems such as HMI, SCADA, MES, and historians. This avoids a converter-specific northbound interface and concentrates device knowledge in the server configuration [S4].
Implementation limits and failure modes

OPC UA does not make every PLC integration plug-and-play. The client and server must agree on namespaces, node identifiers, data types, engineering units, arrays, structures, methods, and event semantics. Misaligned models can move the interoperability failure from transport into application mapping, even though the connection itself remains healthy [S1][S3].
Custom-developed driver solutions can be cost prohibitive and raise concerns about ongoing maintenance. Protocol converters also add a communications layer and another potential failure point, which is why gateway placement should be justified by device coverage rather than used as a default [S2][S4].
OPC UA performance limits must be checked with the selected server and client rather than inferred from the standard. The practical question is how many clients, subscriptions, nodes, and update rates the controller can sustain; IEC 62541 part selection helps determine which specification parts and services the project must implement.
Specification and acceptance checklist
Specify the interface in the functional design: IEC 62541 for OPC UA, exact controller and CPU models, protocol version, OPC UA server or client role, TCP 4840 where applicable, X.509 certificate policy, authentication mode, node namespace, data type, unit, timestamp treatment, quality mapping, read/write direction, and expected update interval [S1][S2][S3].
For a custom driver, attach the PLC communication manual, register or address map, supported data types, byte order, exception behavior, scaling rules, and firmware limits. The acceptance test should cover valid reads, invalid addresses, malformed responses, reconnects, stale values, quality flags, write permissions, and timestamp accuracy rather than validating only a live tag demonstration.
Verify the industrial PC or edge gateway resource envelope under production load, including client count, subscription count, CPU load, memory, network utilization, and failover behavior. Confirm whether the safety PLC architecture permits ordinary MES read access or requires a separate interface boundary, because general-purpose communications must not alter certified safety functions.
Before rollout, record the decisive evidence: PLC firmware and OPC UA capability, MES client conformance, namespace coverage, certificate lifecycle, benchmark results at the required update rate, and a maintenance owner for every custom protocol element. If all four evidence groups pass, OPC UA is the default; if the supported interface fails one, retain a custom driver or gateway only for the justified exception.