Towards automatic state machine reconstruction from legacy PLC using data collection Today, more and more industries are considering moving towards being Industry 4.0 compliant. But this transition is not straightforward due to many reasons: in particular, transfer to new system can lead to significant production downtime and could result in delays and cost overruns. The best way is systematic seamless transition to newer and advanced technologies that Industry 4.0 offers. This paper proposes an automated synthesis framework that learns the behavior of existing legacy and often blackbox programmable logic controllers and generates state machines that can be incorporated into IEC 61499 function blocks. The paper presents the toolchain architecture and exemplifies it on a laboratory scale Festo didactic mechatronic system.

Implementation of state transition models in IEC 61499 and its use for recognition and selection of sequences of events and objects Efficient application of modelbased software design methodologies in industrial automation requires methods and tools for automatic code generation. Formal models can be especially useful to avoid ambiguity, to verify and evaluate performance, which ultimately will improve the quality and reliability of the project and lead to lower design costs. This paper proposes methods for implementing statetransition formal models, such as finite state and pushdown automata, as well as extended Petri nets (Anets) by means of IEC 61499 function blocks. These implementation approaches can be used in the design of industrial cyberphysical systems for monitoring, diagnostics, conformance checking, detection and selection of specified sequences of events and parameterized objects from an input stream. One of the proposed applications is illustrated using an example of an assembly process with LEGO blocks.