Implementasi Perangkat Keras dan Pengukuran Unjuk Kerja OpenPLC pada Raspberry Pi dan STM32
NIFWAN ARBI NUGROHO, Enas Dhuhri Kusuma, S.T., M.Eng.;Ir. Addin Suwastono, S.T., M.Eng., IPM.
2024 | Skripsi | TEKNIK ELEKTRO
PLC merupakan perangkat kendali yang sangat penting khususnya pada sektor industri. PLC berfungsi untuk mengatur kerja suatu mesin. Terdapat banyak merek PLC yang tersedia di pasaran. Bahasa pemrograman di semua PLC mengikuti standar IEC 61131-3 namun program antar PLC yang berbeda merek umumnya tidak bisa saling digunakan. Kendala lain yang muncul pada PLC konvensional ada dari segi harga yang relatif mahal jika dibandingkan dengan mikrokontroler walaupun memiliki fungsi yang sama. Dengan berkembangnya teknologi mikrokontroler, sudah ada penelitian yang memodifikasi mikrokontroler agar dapat berperan seperti PLC. Untuk membandingkan performa antara mikrokontroler dan PLC diperlukan suatu pengujian. Pembuatan dan pengujian prototipe pada penelitian ini bertujuan untuk memberikan solusi alternatif dan bahan pertimbangan kepada calon pengguna OpenPLC.
Prototipe dibuat dalam bentuk shield yang berisi modul input, output, dan catu daya. Terdapat beberapa program yang digunakan untuk menguji performa dari semua PLC. Pengujian kecepatan bertujuan untuk mengetahui pengaruh beban task terhadap periode scan PLC. Kecepatan maksimal diperoleh dengan cara mengatur PLC ke mode freewheeling. Pengujian ketepatan eksekusi program dilakukan untuk membandingkan keluaran OpenPLC dengan PLC konvensional saat diberikan input yang sama. Pengujian long run bertujuan untuk menguji PLC ketika beroperasi selama lebih dari 24 jam tanpa henti.
Hasil penelitian ini menunjukkan bahwa prototipe yang dibuat mampu melakukan scan lebih cepat dari PLC konvensional. Kecepatan STM32 akan berkurang ketika task PLC bertambah. Raspberry Pi lebih tahan terhadap penambahan task namun lebih lambat dari STM32. PLC Schneider M221 dapat mempertahankan kecepatan saat diberi task tambahan namun kecepatannya terbatas di 1 ms. Pada uji ketepatan terdapat perbedaan antara OpenPLC dengan Schneider yang diakibatkan oleh perbedaan metode error handling pada masing-masing PLC. Pada uji long run semua PLC berhasil bekerja normal tanpa ada masalah. Hasil penelitian ini menyimpulkan bahwa prototipe OpenPLC yang dibuat dapat digunakan untuk meniru mekanisme dasar PLC pada umumnya namun performanya tidak identik dengan PLC yang tersedia di pasaran.
PLC is an essential control device that mainly used in industry. PLC is used to control the behavior of an industrial machinery. There are many PLC brands available in the market. All PLCs programming language complies to the IEC 61131-3 international standard but programs that are meant to operate one PLC brand cannot be transferred to another PLC of a different brand. Another problem that emerges on conventional PLC comes from their relatively high cost compared to other control device such as microcontrollers even though they served similar purpose. With the advancement of microcontroller technology some studies had modify their microcontrollers to act like a PLC. A set of test is required to compare the performance between PLC and microcontroller. The aim for making and testing a prototype in this research is to provide an alternative solution and consideration for future OpenPLC users.
The prototype contains input, output, and power supply module. The performance of all PLCs are tested by running a couple of Programs. The speed test was conducted to find how additional task affects PLC scan time. The maximum scan time is obtained by setting the PLC task cycle to freewheeling mode. The program execution test was conducted to determine whether OpenPLC gives the same output as commercial PLCs or not. The long run test was conducted to see if all PLCs are able to work properly when operated continuously for more than 24 hours.
The results of this research show that OpenPLC devices have faster scan time but additional task will increase their scan time. STM32 has the fastest scan time but are very susceptible to additional task. Raspberry Pi is slower than STM32 but are not significantly affected by additional task. Schneider M221 is not susceptible to additional task but the fastest scan cycle that can be set is 1 ms. In program execution test OpenPLC devices and Schneider M221 PLC had a slightly different output because of different error handling method. In long run test all PLC devices are able to work properly without any visible problem. This research concludes that the created prototypes are able to emulate PLCs basic mechanism but their performances are not identical to commercially available PLCs.
Kata Kunci : PLC, OpenPLC, Raspberry Pi, STM32, performa PLC