Realizacja bloków funkcjonalnych IEC 61131-3 za pomocą maszyn stanowych PIO

pol Article in Polish DOI: 10.14313/PAR_259/29

send Marcin Hubacz , Bartosz Trybus , Bartosz Pawłowicz Politechnika Rzeszowska, Wydział Elektrotechniki i Informatyki, ul. Wincentego Pola 2, 35-959 Rzeszów

Download Article

Streszczenie

W pracy zaproponowano hybrydową architekturę oprogramowania sterownika, w której główny algorytm sterowania jest realizowany w językach IEC 61131-3 przez maszynę wirtualną, ale ze wsparciem bloków natywnych wykorzystujących maszyny stanowe PIO (Programmable Input/Output) dostępnych w układach RP2040. Analizowano różne implementacje bloków RS, SR i CTD z użyciem PIO, porównując czas ich realizacji z implementacją w języku ST. Wykazano, że bloki natywne PIO są wielokrotnie szybsze niż te wykonywane przez maszynę wirtualną. Mimo pewnych ograniczeń, takich jak konieczność wcześniejszego zaprogramowania bloków w firmware czy ograniczona liczba instrukcji w blokach PIO, rozwiązanie
to oferuje istotne korzyści w aplikacjach, gdzie czas wykonywania operacji jest kluczowy.

Słowa kluczowe

blok funkcjonalny, IEC 61131-3, PIO State Machine, plc

Implementation of IEC 61131-3 Functional Blocks Using PIO State Machines

Abstract

The paper proposes a hybrid controller architecture where the main control algorithm is executed in IEC 61131-3 languages via a virtual machine, but with support from native blocks using PIO (Programmable Input/Output) state machines available in systems such as the RP2040 is proposed. Various implementations of RS, SR, and CTD blocks using PIO were analyzed, comparing their execution time with that of an implementation in the ST language. It was demonstrated that native PIO blocks are significantly faster than those executed by the virtual machine. Despite some limitations, such as the need to pre-program blocks in firmware or the limited number of instructions in PIO blocks, this solution offers significant benefits in applications where the execution time of operations is critical.

Keywords

function block, IEC 61131-3, PIO State Machine, PLC controller

Bibliography

  1. Wu X., Xie L., Performance evaluation of industrial Ethernet protocols for networked control application, “Control Engineering Practice”, Vol. 84, 2018, 208–217, DOI: 10.1016/j.conengprac.2018.11.022.
  2. Wu X., Xie L., Lim F., Network delay analysis of EtherCAT and PROFINET IRT protocols, IECON 2014 the 40th Annual Conference of the IEEE Industrial Electronics Society, 2014. DOI: 10.1109/iecon.2014.7048872.
  3. John K.H., Tiegelkamp M., IEC 61131-3: Programming Industrial Automation Systems, 2010, DOI: 10.1007/978-3-642-12015-2.
  4. Becker M., Sandström K., Behnam M., Nolte T., A Many-Core Based Execution Framework for IEC 61131-3, Proceedings of the IECON 2015 – 41st Annual Conference of the IEEE Industrial Electronics Society, Yokohama, Japan, 9–12 November 2015, DOI: 10.1109/IECON.2015.7392805.
  5. Hubacz M., Trybus B., Dual-Core PLC for Cooperating Projects with Software Implementation, “Electronics”, Vol. 12, No. 23, 2023, DOI: 10.3390/electronics12234730.
  6. Sadolewski J., Trybus B., Compiler and virtual machine of a multiplatform control environment, “Bulletin of the Polish Academy of Sciences Technical Sciences”, Vol. 70, No. 2, 2022, DOI: 10.24425/bpasts.2022.140554.
  7. Hajduk Z., Sadolewski J., Trybus B., Multiple tasks in FPGA-based programmable controller, “e-Informatica Software Engineering Journal”, Vol. 5, Nr 1, 2011, 77–85, DOI: 10.2478/v10233-011-0032-2.
  8. Hubacz M., Trybus B., Data Alignment on Embedded CPUs for Programmable Control Devices, “Electronics”, Vol. 11, No. 14, 2022, DOI: 10.3390/electronics11142174.