Digital Modelling of Production Engineering for Metalworking Machine Shops

. This article presents a modular approach that reduces the labor costs for the technological preparation of small-scale metalworking production. Its idea is to formalize the technological processes, allowing generating them and their documentation from pre-prepared parameterized templates stored in the special database. Details to be processed are represented as the structures of their basic geometric components. For the template of machining operations for each component, symbolic parameters are fixed, defining the workpiece used, cutting tools options, machining modes, etc. The result of formalization is an automatically generated technological route in the form of an MSC diagram encoding it as a sequence of macro-operations for the machinery. This symbolic model is adapted to a specific instance of the detail being manufactured by replacing the symbolic variables with specific values set by the technologist. The MSC diagram is supplemented with the results of time and cost calculations of technological routes, which allows selection of the most efficient one. The correctness of the technological routes is ensured in the process of symbolic verification by checking the permissible ranges of parameters of the MSC diagram, as well as checking the correctness of order and compatibility of operations in the sequence. The results of the whole process obtained from the MSC diagram are the set of technological documentation of preproduction, which, in particular, includes a set of operating cards, and the fine-tuned schedule of production after its digital modeling with the real resources of the workshop taken into account. According to technologists, by applying the described automation, the time to prepare documentation for details of medium complexity is reduced from several weeks to 1-2 days.


Introduction
Comprehensive automation of technological processes based on information technologies provides:  reduction of the time of pre-production;  optimization of labor costs and funds for the manufacturing of products;  operational implementation of changes in the process under the external conditions (replacement of technological equipment, material, cutting tools, etc.) with automatic recalculation of the process characteristics. Technological preparation of production (TPP) includes the following activities:  setting of technological problems;  selection of the workpiece based on its parameters;  development of technological processing routes; development of technological processes. The tasks of operational planning and automated production management are carried out by the manufacturing execution systems (MES) [1]. They occupy an intermediate place in the hierarchy of enterprise management systems between the level of information collection from equipment in workshops done by supervisory control and data acquisition (SCADA) systems [2] and the level of operations over a large amount of administrative, financial and accounting information done by enterprise resource planning (ERP) [1] systems. The key processes for MES are as follows [3]. 1) Based on the external demand for production (which, in turn, is based on customer orders, sales plans, etc.), as well as previous production programs, taking into account all sorts of nuances and specifics of production at a particular enterprise, a detailed optimized production schedule of works and operations for machine tools, equipment, personnel is produced. In addition, automatic generation of all the documentation necessary for the work: production programs, outfits, limit maps, tables and equipment loading diagrams, etc. is also done. 2) In the course of the direct implementation of production programs, full dispatching of all operations and their results (both positive and negative -rejects, delays, etc.) is carried out. 3) If deviations from the planned programs are identified due to the external reasons, or when new demand (orders, etc.) appears, real-time re-planning is performed with all components corrected accordingly. It should be noted that there exists an imbalance between production time and preparation time in single or small-scale productions in case of re-scheduling of the work of a production site, because it should be performed for the small batch of the details and not for the whole series of them. Nowadays on the Russian market there are three most popular largest solutions, the products of many years of work of three scientific centers for developing systems of this class: PHOBOS system, YSB.Enterprise.Mes system and PolyPlan system. PHOBOS is traditionally used in large and medium-sized machine-building enterprises. YSB.Enterprise.Mes originated from the woodworking industry and focuses on the sector of medium and small enterprises. The PolyPlan system has a smaller set of MES functions, but is positioned as an operational scheduling system for automated and flexible manufacturing in engineering [3]. However, with all the attractiveness of such systems, due to the extensive set of functions provided and deep integration into the production processes in the enterprise at all stages, their practical implementation is a whole complex and expensive project in itself that not all enterprises, especially small-scale and individual productions, can afford. In addition to this, in order to work effectively with MES, high qualification of its operator is required. The automated workplace of the technologist given in this article is designed to solve a narrower class of problems -to simplify the TPP for small-scale machine-building production, it does not require interactions with other systems, and the results in the form of the required schedule of work distribution and a set of operating cards can be obtained in a couple of days of work of a technologist.

Formalization of the technological process
Let's look through the features of formalization based on an illustration of a specific example of work with the developed system of an automated workplace for a technologist. The main input information for the technologist is the detail drawing. It can be done in any graphical design program, for example, in KOMPAS-3D [4]. The example of the drawing is demonstrated in the fig. 1.

Fig. 1. Input detail drawing
To manufacture a part technologist chooses a workpiece for it. Several such workpieces may be selected; to determine the best fitting of them, all calculations of time and cost of production must be made for each selected one and compared to each other. The next action of the technologist is the splitting of a given drawing into a set of sketches of elementary surfaces (ES), the parts of the detail. This step sets the way for the modular approach to the production technology [5]. Each of the surfaces is characterized by geometrical parameters and the number of stages required to process it. The processing stage is the smallest atomic operation, for example, turning, drilling or milling. The parameters of the processing stage are the types of machines on which it can be performed, the cutting tools to do so and the selected workpiece in the very beginning. The form for setting information about the processing stages manually is shown in the fig.2. The description of fields and tables of the form is as follows, from left to right and from up to down:  the type of the elementary surface encoded by two digits;  the unique number of the elementary surface used to distinguish between the surfaces of the same type;  the geometrical parameters of the elementary surface, here the diameter and length are listed;  the amount of the processing stages to be performed;  the processing stages, divided into the following columns: the number of the stage, the name of it (here: turning), the codes of the applicable machinery for it, the codes of the applicable cutting tools for it (which are described in the table under this one), the amount of the allowance (here: determined by the chosen workpiece) and the name of the selected workpiece (here: the first one);  the cutting modes, divided into the following columns: the code of the cutting tool, the type of it (here: cutter), the three technical characteristics of each cutting tool with maximum and minimum values and the minimum and maximum durability of the cutting tool. To translate it into a digital form, a developed solution is used, the set of user interface screens of which forms an automated workplace for the technologist (fig.3). The fields and tables on the right are essentially the same; the left side shows the sorted list of the already loaded surfaces by types: inner surfaces of revolution, outer surfaces of revolution, mounting holes and flat contour. There is also a place for the sketch of the surface in the middle. Each cutting tool added by the technologist is characterized by its cutting modes. The parameters of cutting modes affect the running time and its cost. Usually, data for the cutting tool is taken from reference catalogs in *.pdf format [6]. The user interface allows the technologist to simplify entering data from catalogs through the use of hotkeys: after selecting data in the document and pressing the CTRL + SHIFT + C key combination, the data is copied directly into the table. This approach reduces the labor intensity of the manual data transfer and helps to avoid the human factor such as errors or typos.
To determine the order of processing of elementary surfaces, further formation of blocks of elementary surfaces from them takes place. Each block is characterized by its own positioning data on the machine. The window for creating blocks of surfaces is shown in fig.4. The left side of it shows the list of the blocks with the button "Create new block" at the very bottom of it, the rows on the right side consist of the surfaces corresponding to each block. The next step of the formalization of technological process is the formation of groups of elementary surfaces inside blocks of elementary surfaces. Such group is a part of the block that can be processed in one operation without reinstalling the workpiece into the machine. Thus, the nesting hierarchy is created ( fig.5).
The operation on a group of surfaces made up from initial operations on each surface is called a machining step, each one of them has its own physical meaning, for example, turning the outer surface of revolution, drilling through hole or boring the hole. All cutting tools for all elementary surfaces within a group must be the same. The window for creating groups is shown in the fig.6. The three tabs on the left are created for each block; they hold lists of groups of surfaces within the block. The right side shows the elementary surfaces of each selected group with their parameters. In addition to the windows for filling in the information, the user interface has a menu containing "Help" section. There is a reference catalogs searching tool which works in conjunction with a system application for viewing files in *.pdf format and is capable of two types of searches:  The window for keyword search in catalogs is shown in Fig.7. After entering keywords in the top field and selecting catalogs for search in the list, by pressing the leftmost button a search is performed on the selected documents. For each catalog, the following sequence of actions is carried out.
1) One page of document is read from disk.
2) Search for keywords is performed on this page.
3) If at least one of the keywords is detected, the page is copied into the resulting PDF document.

4)
If the keywords are not found, proceed to the next page.
As soon as all pages of all catalogs are processed, a resulting document with search results is written to disk and opened in the standard PDF document viewer in the system. The right button cancels the search, the bottom one allows technologist to add a catalog to the list.
 Search by image, in contrast to search by keywords, is possible only for catalogs formatted in advance. Its interface is shown in Fig.8. After selecting a PDF catalog from the drop-down list, if the necessary markup information exists for it, images, for example, of surfaces to be processed, are shown. By clicking on them a document containing information related only to the selected images is formed and, alike to the search by keywords, is opened in a standard PDF documents viewer. The button on the right allows technologist to add a catalog to the list.
The usage of these searching tools, especially in conjunction with copying data into tables with hotkeys, achieves a significant reduction in the complexity of data entry for elementary surfaces. A special database based on PostgreSQL database management system [7] is used to store information entered by the technologist in the user interface [8]. The fig. 9 shows a fragment of its tables, where:  «public.tb_methods» table stores information for calculating the time and cost of processing methods for elementary surfaces;  «public.tb_app_machines» is dedicated to applicable machines for processing methods;  «public.tb_processing_steps» stores the parameters of the processing methods;  «public.tb_app_tools» holds information about the applicable cutting tools and cutting modes;  the four lowest tables are used for linkage between other tables.

Fig. 9. Database fragment
To formulate the resulting technological route for the processing of the whole detail technologist must determine all the groups of elementary surfaces that can be processed together. There can be several routes constructed this way, the choice of the one is made based on which machinery and which tools are available and should be used. In the approach presented here we use the MSC language [9] for the encoding of the route. MSC is a standardized language for describing behaviors using message exchange diagrams between parallel-functioning objects (machines, robots). The main unit of the diagram is a line starting with a name of a processing stage of elementary surface followed by its parameters. To construct such line, only the index parameters of the stage are used, insofar as all other necessary data can be obtained from the database based on them. Such index parameters include:  the number of the processing stage;  the code of the type of the elementary surface, in two digits;  the number of the elementary surface within the same type;  the codes of the applicable machinery for the processing stage;  the codes of the applicable tools for the processing stage; Turning(stageNumber, surfaceType1, surfaceType2, surfaceNumber, [machine1, machine2, machine3, machine4, machine5], [cuttingTool_1_1, cuttingTool_1_2, cuttingTool_1_3], workpieceParams.code, blockParams.number, numberInBlock, groupNumber, numberInGroup); The diagram comprises a set of these lines in order set by technologist earlier. The correctness of the technological routes is ensured in the process of symbolic verification, which checks the acceptable ranges of parameters of the diagram, as well as the correctness of order of the whole sequence [10]. The actual data is taken from the database and substituted instead of parameters.

The usage of the formalized technological process
The MSC diagram of the route is supplemented with the results of calculating the time and cost of each processing stage. The calculations use formulas stored in the database, they are partially shown in Table 1 and Table 2. The individual results for each processing stage of the route are summarized, which gives an estimate of the total time and cost of the technological route. By changing the route parameters and recalculating the measurements, technologist can choose the most effective one. The selected technological route thus meets the criteria for the time and cost but yet does not take into account the conditions and resources of the workshop in which it will be implemented. For this, it is necessary to use simulation modeling of its performance on the equipment in the workshop. To use the developed simulation algorithm, technologist inputs three files describing following specifications.


The composition of workshop resources (CNC machines, robots, maintenance personnel, etc.). The types of operations for each machine that it can perform are defined.  The planned technological routes. The number of manufactured parts and the sequence of operations with the amounts of time of their execution are determined for each route.  The priorities of the routes and resources used, as well as the initial state of the workshop equipment. The result of the simulation is a timing diagram of the distribution of operations by each machine in the form of a Gantt chart, a fragment of it is shown in the fig.10. Modeling allows technologist to take into account equipment downtime, the additional cost of transporting parts and machine changeover. As a result, the estimation of the time and cost of the technological route becomes more realistic. By changing the priorities of the technological routes technologist obtain several options for implementing the technological process of the workshop. By applying a hierarchy of criteria measuring the success of the work such as time, cost, equipment loading, material savings, etc. various problems of multicriteria optimization can be solved [11]. For each selected optimized version of the technological route, technological documentation of production preparation is automatically generated in the form of the operating card [12], its example is shown in fig.11 [13].

Conclusion
The paper considers the problem of technological preparation of single and small-scale production, which area is characterized by imbalance of work between preparation and implementation of production. The approach to its automation based on modular technology is proposed. The important properties of automation system are demonstrated:  the ability to adapt to specific production conditions such as different equipment, resources, orders and support staff;  significant reduction of the complexity of creating a technological route for an order using a special automated workplace for the technologist;  operational planning and scheduling of the technological process of the workshop;  selection of the optimal characteristics of production processes during hierarchical multicriteria optimization. According to existing estimates the platform provides a multiple increase in productivity and a reduction in labor intensity and in amount of time of the preparation of technological documentation for engineering production.
Alexey Andreevich TOLSTOLES received the M.S. degree in information technology at Peter the Great St. Petersburg Polytechnic University in 2017. He is currently pursuing the Ph.D. degree in the Higher school of software engineering of the same university. His research interests include automation of technological processes, industrial Internet of Things and back-end development.