Design and operation of a compiler and virtual machine, being the essential components of a multiplatform control programming environment, are presented. The compiler translates source programs written in Structured Text language of the IEC 61131-3 standard into executable code in a dedicated intermediate language. The virtual machine, i.e. a specially designed processor implemented in software, is a runtime part of the environment executing the code in real time. Due to memory-to-memory operation principle the machine is able to process various data types defined in the standard. The focus is given on overloading and extensibility of the functions, as well as on uniform invocations of Program Organization Units. By selection of addressing mode, the environment can be deployed on multiple hardware platforms, beginning from 8-bit microcontrollers up to 32/64-bit industrial PCs. Industrial applications are indicated.
Norma IEC 61131-3 definiuje pięć języków programowania sterowników przemysłowych. Norma ta jest powszechnie stosowana, wiele środowisk inżynierskich jest z nią całkowicie, bądź częściowo zgodnych. W literaturze opisano kilka...
W artykule przedstawiono badania wydajności wykonywania przez mikrokontrolery STM32 kodu dla maszyny wirtualnej (tzw. kodu pośredniego) dedykowanej dla systemów sterowania. Architektura ARM zastosowana w tych układach odznacza się ograniczeniami...
The article presents the results of research on the handling of data types from the PN-EN 61131-3 standard in systems with ARM architecture. The tests were carried out on several different hardware platforms with the Cortex-M and Cortex-A series as CPUs. The research was carried out on the basis of the CPDev environment for creating and running control software. Due to the limitations of the ARM architecture, three methods of access to memory have been developed, and the results allow to determine the most effective. The article also presents the proposed virtual machine extension with new instructions to make data operations in ARM solutions more efficient.
The concept, semantic model, and prototype implementation of a dual-core programmable controller have been presented. The controller’s design concept involves parallel processing of two execution programs through a virtual machine, utilizing a shared memory area for global variables. The presented model provides a formal description of the execution of portable binary programs created based on the languages of the IEC 61131-3 standard in the CPDev programming environment. The architecture described outlines the operation of the virtual machine using abstract algebraic objects. The solution has been implemented in C/C++ on a dual-core microcontroller platform.