An approach to the development of logical control systems for technological equipment in the concept of Industry 4.0

In the post-industrial society, the means of collecting, processing and transmitting information have changed. These changes were reflected in industrial technologies, in which there was a transition from a concept aimed at automating individual machines and processes to a concept that provides a digital representation of all physical assets, followed by integration into a digital global system, built together with partners involved in the value chain. The new concept is based on a multilevel, complex, global technological and organizational system, which implies the integration of physical operations and their accompanying processes into a single information space. The effect of its implementation is possible if the process of receiving, analyzing and exchanging data between technological equipment and various levels of the production system as a whole is structured.


Introduction
At enterprises, there is a transition from the classic model of industrial systems to "smart" or intelligent production (smart manufacturing), provides for the unification of production into a single digital ecosystem. The developed ideas of smart manufacturing represent the concept of digital tools, which assumes the presence of interconnected software and hardware. At the same time, at this workshop level, the change uses mechanisms of interaction with the digital production ecosystem. The term "logical control systems" is understood as a set of system control (programmable logic controllers -PLCs, controllers, safety management systems and motion control) that solve control problems in technological systems. Specified systems to the type of program control [1,2].
In an industrial environment, it became necessary to use the technology for analyzing large amounts of data ("Big data"), which involves the use of a large number of sensors installed on key nodes of control objects, while the collection and preprocessing of data from sensors is performed by logical control systems [3]. Analysis of the information obtained in this way provides objective and accurate data on the operation of specific equipment and the enterprise as a whole [4]. The use of a large number of sensors is used to obtain a digital image of a specific physical product during its operation, which is the basis Considering the above factors, the problem of constructing logical control devices that ensure the coordinated operation of mechanisms and assemblies is one of the most important in solving problems of automating production processes in various industries, primarily in mechanical engineering and machine tool construction ( Fig.1). At most enterprises in the Russian Federation, at the moment, classical PLCs are used as the main automation link, also called externally implemented controllers, which have shown their reliability and a wide range of applications. At the same time, a number of trends in the development of PLCs have emerged in the global industrial automation market, among which the following can be distinguished: the use of high-speed communication protocols based on Ethernet technology for interacting with control systems and actuators within the digital ecosystem of an enterprise [6,7].

Development of a functional model of the logical equipment system
In order to respond to these challenges and taking into account the development trend of modern industrial enterprises aimed at the implementation of a single digital ecosystem with the support of concepts: digital twins and platforms, working with "Big Data", energy conservation, etc., a rethinking of the logical management task is required. A new concept of building logical control systems is needed, which should be based on models that take into account: the use of high-speed communication protocols, the implementation of distributed control based on multi-rank networks, the use of real-time operating systems as system software, the use of a single interaction interface based on OPC UA technology, intellectualization of peripheral modules, etc., which determines the relevance of the work.
According to research by the journal Control Engineering and the agency Reed Research (Fig. 2), most respondents use logic control to control the electrical automation of machine tools and technological processes [8]. However, there are a number of areas in which the number of logic control systems used is growing every year, including: motion control systems, diagnostics systems, safety systems, etc. When designing the architecture of complex systems, they are divided into modules, which are presented in the form of a complete block with the implementation of a certain functionality [9]. Each module is an autonomous solution within the system, which ultimately determines the overall level of flexibility and configurability. The modular organization of logic control systems should be considered both at the application level and at the hardware and system software level. Within the framework of the logical control system, the principle of modular organization of the hardware must be preserved and, depending on the requirements of the control object, the configuration must be selected. At the level of applied solutions, the control system is divided into modules according to functional characteristics [10]. The approach to the modular structure of logical control systems proposed in the work will allow to single out individual modules that will have: structural uniformity, a common mechanism of inter-module connections; the control system as a whole will take on a structured form.
This approach will allow: • organize the management process both within a single computing platform and on several platforms by dividing a group of modules according to a single functional feature; • complete the control system depending on the task being implemented; • use components from different manufacturers, including combining them with each other.
A functional model of the logical control system of technological equipment in the IDEF 0 notation (Fig. 3) has been developed, in which the system is presented as a set of functions interconnected by links.
In modeling, three groups of functions are distinguished: functions for the development of logic control programs (without isolation); functions of the executive system (core) of logical control (highlighted in gray); functions of external systems (shaded). The functional model made it possible to single out the main functions of the logical control system and link them to the components of the control system for subsequent implementation. The logic control system architecture consists of two subsystems: programming and logic control. The programming subsystem solves the problem of designing and developing a logic control program. The logical control subsystem solves the problem of executing the logical control program [11].
The task of developing a logic control program is divided into two components: software implementation of the control system operation algorithm, configuration of hardware inputs/outputs [12,13].  The programming subsystem is connected to the logical control subsystem through a communication channel. The central module of the logical control subsystem is the "module for implementing the logical control cycle", which implements the following periodically performed sequence of actions: system testing, polling the inputs, executing the logical control program and recording the outputs [14]. The hardware I/O modules are linked to the logic control subsystem using one of the high-speed communication protocols. Hardware I/O modules are connected by physical communication lines directly with sensors and actuators. The architectural model of the control system made it possible to: determine the modular structure of the system; to simulate the relationship of modules with each other and the external environment; determine possible ways of scaling the system.

Distributed model of a logical control system taking into account remote interaction according to the concept of Industry 4.0
The following basic requirements for the developed tools were identified: hardware and platform independence, no paid license, openness of the mechanism for the end user, ease of operation, standard programming language, the possibility of expanding functionality and modernization due to the openness of the code, the ability to use for educational purposes. When developing the toolkit, the CoDeSys, LabView, ISaGRAF environments were taken as a prototype due to their completeness of implementation and scale of application. The choice of Functional Block Diagram (FBD) as the basic development language was due to the fact that the program in the FBD language resembles an electrical circuit, and most of the projects for the implementation of logic control systems involves the development of electrical circuit diagrams for connecting electrical units [15].  Based on the models presented above, a module for configuring hardware inputs / outputs for logic control systems was developed, which allows you to map the variables of a PLC project to hardware inputs / outputs. The direct control of the actuators is carried out via the hardware I/O modules, which are passive devices (Fig.4). The complete hardware I / O configuration has a branched, multi-level structure. Configuration and selection of parameters of I/O modules for their integration into the logical control system is carried out using the shared memory mechanism [16]. Each slot is mapped to a shared memory area and occupies a certain size and position, depending on its type. The state of the inputs is projected from the internal memory of the device into the shared memory of the control system, and in the opposite direction, control actions are transmitted to the output channels of peripheral modules [17]. The finished configuration is packed into a special structure and transferred to the execution kernel. The main tasks of the kernel are: polling input signals from hardware inputs; execution of control algorithms; preparation and generation of control signals to hardware outputs; saving processing results; transferring the results to the programming subsystem for debugging; system control for the absence of errors. The kernel was implemented using a cross-platform approach [18,19].

Practical aspects of using the developed models
A logic control system for electroautomatics of the «Hydrojet Cutting Unit» (water jet cutter) experimental complex for waterjet cutting was developed by company "SMZ", MSUT "STANKIN" and company "NIAT" in common. The waterjet cutting complex has six controlled axes: X and Z -linear, Y and V -gantry, A and C -circular, which allows you to machine parts of complex shape. The logical control problem was developed as an integral part of the software and mathematical support of the CNC system [20].
According to the methodology for constructing logical control systems, a network structure of the control system was developed (Fig. 5), which includes: a core with an embedded software-implemented controller, an operator terminal, hardware input / output modules, a control system for an autonomous high-pressure station, controllers of feed drives (for 6 axes, including gantry kinematics) and machine control panel.  The logical task of the CNC is solved by means of a distributed control system, which consists of a software-implemented controller and hardware I/O modules. Interaction of stand-alone I/O modules moves are organized according to the "master-slave" principle with the formation of a multi-rank network. When controlling the UGSR, a combination of approaches was used: programming algorithms for controlling the formation of a jet and controlling a high-pressure station is implemented directly on the controllers, and algorithms for safety control, power management, pneumatic system and panel control are based on a software controller built into the control system [21]. The use of the «Hydrojet Cutting Unit» logic control system together with a specialized processing technology made it possible to significantly save the consumption of abrasive material (25 to 30% in comparison with installations of a similar class).

Conclusion
The modular principle of constructing logical control systems makes it possible to implement both autonomous solutions used to control individual technological units or processes, and solutions that are part of a complex of control systems (for example, within a CNC system). This approach allows the use of various modules, for example, communication with data collection or analysis servers. The developed functional model allows adding new modules, for example, for communication with devices using OPC UA or MTConnect technologies. This will allow the transfer of data from logic control systems to the upper levels of enterprise management to optimize shop floor production and find bottlenecks in the technological process. The next stages in the development of the work is to connect the developed system to the data collection server for analysis.