# OPC-UA Agent for Legacy Programmable Logic Controllers +
## 2 Background
### Related Works
A simulation study has been conducted for using OPC-UA pub-sub and TSN for field-level hard real-time communication [30], and TSN traffic shaping has been proposed for OPC-UA field devices [31]. Efforts have been made to utilize OPC-UA in legacy devices and various environments [6, 9, 10, 11, 16, 32, 33]. Wrappers and proxies are an approach for migration from OPC Classic to modern OPC-UA systems [10]. An OPC-UA wrapper is a UA server with a Classic client interface which allows UA clients to access a Classic server, whereas an OPC-UA proxy is a UA client with a Classic server interface that allows a Classic client to access a UA server. Some studies have proposed a standalone OPC-UA wrapper to minimize the impact on existing servers and have analyzed the effect of parameters such as number of items, publish interval, and sampling interval on performance [5]. For the integration of legacy devices, an approach using the OPC-UA companion model for ISA95 has been proposed [9]. A new layer based on OPC-UA was designed to map field device data to an ISA95-based information model and ensure the interoperability of an industrial CPS. The implementation of an OPC-UA interface for legacy PLC-based automation systems using a cloud computing service has also been studied [11]. In practice, for application in a specific field, the creation of an OPC-UA companion specification requires a cross-domain collaborative modeling process, which often results in the creation of an inconsistent set of nodes. Studies have shown that model-based development using the Eclipse modeling framework is effective in resolving inconsistencies [33]. In an industrial CPS, model interoperability is crucial to manufacturing intelligence. A recent study proposed an OPC-UA compatible interface to ensure the interoperability of data analytics across heterogeneous devices [6]. The interface is designed to enable the exchange of predictive model markup language (PMML), a domain-independent standard for representing XML-based data analytics models via OPC-UA. Some works carried out performance evaluation of OPC-UA. The impact of OPC-UA parameters was analyzed for read and subscription services [15], and the assessment of different OPC-UA implementations has been performed in industrial IoT-based measurement applications [32]. Recently, the performance of OPC-UA has been evaluated and compared with MQTT (Message Queuing Telemetry Transport) and CoAP (Constrained Application Protocol) in a study on the performance analysis of IoT protocols [34]. There have been studies to enable OPC-UA in PLCs [11, 35]. However, there have been little work done to support OPC-UA in legacy PLCs that lack the functional support or computational resources required for OPC-UA. This study is the first, in our knowledge, to propose an agent architecture that enables the use of OPC-UA client API based on the IEC 61131-3 standard in PLCs that do not support strings or complex user-defined structures [36]. In our work, we present the details of agent design and the results of experimental evaluation using prototype implementations. We believe that this work provides useful insights into agent-based approaches for integrating legacy PLCs into the OPC-UA framework.