Development and implementation of IEC 61131-3 virtual machine

Virtual machine described in the paper is a runtime program for controllers in small distributed systems. The machine executes intermediate universal code similar to an assembler, compiled in CPDev engineering environment from source programs written in control languages of IEC 61131-3 standard. The machine is implemented as a C program, so it can run on different target platforms. Data formats and commands of the machine code are presented, together with the machine's Petri-net model, C implementation involving universal and platform-dependent modules, target hardware interface, input/output programming mechanisms, and practical applications.