Laporkan Masalah

Implementasi Protokol OPC pada OpenPLC Untuk Akuisisi Data

Fransisko Gilbert Sembiring, Enas Dhuhri Kusuma, S.T., M.Eng. , Ir. Addin Suwastono, S.T., M.Eng., IPM.

2025 | Skripsi | TEKNIK ELEKTRO

PLC adalah komponen penting dalam otomasi industri. PLC memegang peranan penting dalam pengendalian dan juga akuisisi data dari aktuator dan sensor yang ada pada lapangan. Terdapat banyak merek PLC di pasaran namun semuanya tidak bisa digunakan untuk berkomunikasi satu dengan yang lain jika berbeda vendor. OPC UA dapat mengatasi masalah tersebut. Kendala lain muncul dari segi harga jika kita ingin menggunakan PLC yang dapat digunakan dengan protokol OPC UA karena harga PLC yang memiliki fitur tersebut relatif mahal. Penelitian sebelumnya sudah mengembangkan bagaimana mengimplementasikan Raspberry Pi yang dipasang OpenPLC runtime sebagai PLC telah diuji kemampuannya terhadap tugas yang diberikan.

Pada penelitian ini dikembangkan service OPC UA yang dipasang pada Raspberry Pi dengan OpenPLC runtime dan OpenPLC hardware support. Prototipe shield digunak- an agar Raspberry Pi dapat bekerja seperti PLC dengan rating tegangan 24V. Prototipe terdiri atas modul input digital, modul output digital dan modul catu daya. Sistem yang dirancang dapat mengintegrasikan PLC dan perangkat industri non-OPC ke dalam sistem dengan protokol komunikasi OPC. Program berbasis python dibuat agar OpenPLC Raspberry Pi memiliki protokol komunikasi OPC UA. Pengujian fungsionalitas dilakukan untuk menilai apakah OPC UA dapat digunakan sebagai protokol komunikasi pada OpenPLC Raspberry Pi. Pengujian delay juga dilakukan untuk mengetahui berapa delay antara isyarat yang diterima oleh PLC M221 dan isyarat yang diterima kembali oleh PLC M221 dari client OPC UA.

Hasil penelitian ini menunjukkan bahwa prototipe shield yang dirancang berhasil membuat Raspberry Pi berfungsi seperti sebuah PLC dengan tegangan kerja 24V, lengkap dengan modul masukan dan keluaran digital. Server OPC UA yang diimplementasikan pada Raspberry Pi juga mampu mengakses data dari OpenPLC runtime dan menyajikan- nya sebagai variabel yang dapat dibaca oleh client OPC UA yang terhubung. OPC UA Client yang terhubung juga dapat disambungkan dengan HMI Weintek sebagai perwakil- an layer 2 dari otomasi industri. Pada pengujian delay untuk mengetahui delay antara OPC UA server, client, dan kembali ke server lagi, hasil yang didapatkan berkisar antara 200 ms-300ms. Dengan faktor pendukung seperti kemampuan interval tergantung pada suhu dan beban komputasi yang dilakukan Raspberry Pi.

Programmable Logic Controllers (PLCs) are essential components in industrial automation, playing a crucial role in both control operations and data acquisition from field-level actuators and sensors. Despite the variety of PLC brands available on the market, interoperability between different vendors remains a challenge. The OPC Unified Architecture (OPC UA) protocol offers a solution to this problem by enabling standardized, vendor-neutral communication. However, PLCs with built-in OPC UA support are typically expensive and not always accessible for small-scale applications.

This study presents the implementation of an OPC UA communication service on a Raspberry Pi running OpenPLC runtime, complemented by custom-designed hardware support. A shield prototype was developed to enable the Raspberry Pi to operate as a PLC with a 24V voltage rating. The hardware includes digital input and output modules, as well as a dedicated power supply module. The designed system allows the integration of standard PLCs and non-OPC industrial devices into an OPC UA-based communication network. A Python-based program was developed to enable OPC UA protocol support on the Raspberry Pi with OpenPLC.

Functional testing was conducted to verify the viability of using OPC UA as the main communication protocol on this platform. Delay testing was also performed by measuring the round-trip signal latency between a Schneider M221 PLC and the Raspberry Pi-based OPC UA server-client system. The results show that the system successfully operates as a 24V-rated PLC, and the OPC UA server can retrieve data from OpenPLC runtime and expose it to connected clients. Furthermore, the OPC UA client could be linked to a Weintek HMI, representing the second layer of industrial automation. Round-trip latency measurements between the server and client yielded results in the range of 200–300 ms, with performance influenced by factors such as system temperature and the computational load on the Raspberry Pi.

Kata Kunci : PLC, OpenPLC, Raspberry Pi, OPC UA, Otomasi Industri

  1. S1-2025-480344-abstract.pdf  
  2. S1-2025-480344-bibliography.pdf  
  3. S1-2025-480344-tableofcontent.pdf  
  4. S1-2025-480344-title.pdf