{'fraction_non_alphanumeric': 0.017905971597424363, 'fraction_numerical': 0.002205168915938961, 'mean_word_length': 4.883757135443695, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Version control system of CAD documents and PLC projects

The paper presents the process of developing a version control system for CAD documents and PLC projects. The software was tested and the optimal composition of the modules was selected. The introduction of the system has made it possible to increase the safety and stability of the process control systems, as well as to reduce the number of conflicts for versions of CAD files. The number of incidents at the enterprise related to the use of incorrect versions of PLC projects is reduced to 0.


Introduction
Modern industrial enterprises, including enterprises of the non-ferrous metallurgy sector and mining enterprises, have structural subdivisions working on the development of project documentation. Development of local control systems, modification of existing automation systems projects, as well as development and modification of software for programmable logic controllers (PLCs), operator panels and SCADA-systems are often handled by specialists of enterprise automation services.
In the event that the volume of development of project documentation is significant or parallel development of software for the operator panel and PLC is carried out, several people are involved in the development of the project. In this situation, it becomes necessary to synchronize the results of the work of specialists to improve the development process. In the classical case, at most enterprises this task is solved by creating shared folders on the server and periodically copying the project files to the server to transfer data to other participants in the process.
This approach has a number of drawbacks, such as the lack of the ability to save previous versions of the project and the lack of the ability to track changes made to the project. If the first drawback is solved by backing up the folder on the server with a certain periodicity, then the second problem does not have solutions with the help of standard tools. There are situations when, for a number of reasons, an employee can intentionally make changes to a project or delete files, which also negatively affects the operation of the enterprise.
When operating the systems of automated process control systems, it is not uncommon to make adjustments to the PLC algorithms by the on-duty engineers in order to promptly restore the work of the technological process. The current version of the project remains only at the engineering station and often the information is not transferred to other employees. All the problems raised above make it very important to implement a version control system for CAD and PCS projects at the enterprise [1][2][3][4][5][6][7][8].
This article discusses the process of developing a corporate system for controlling the versions of CAD projects and automated process control systems (APCS).

Materials and methods
In the paper, the method of empirical research was chosen as a method of research. The study was carried out by the method of complex comparison of various versions of version control systems and selection of the optimal set of modules for solving research problems.
For example, VCS (Version Control System) or RCS (Revision Control System) -a particular case of such subsystems as CVS (Concurrent Versions System) has been used for software development for more than 10 years, but is not fully used in the development of projects for PLCs of process control systems [9,10].
The experience of using VCS systems for the sphere of automated process control systems is not so large as in software development systems for personal computers, portable devices and servers. However, the existing issue of version control is solved somehow by means of separate software solutions. One of the most popular VCS options for PLCs is Versiondog and MDT AutoSave.
From the obvious advantages of both systems, one can note the support for comparing versions for graphical programming languages of IEC 61131 PLC. This function significantly speeds up the search for the error location in new versions of the project.
Parallel work of developers on one project for PLCs is usually provided by additional packages for the programming environment produced by the developer of the environment, and is not implemented in third-party packages due to the high complexity of ensuring compatibility.
It is also very useful to compare the project on the server and the project loaded into the PLC, which makes it possible to increase the safety of the process control system. But since often local control systems are in an isolated network, any changes in the algorithms are made with the help of engineering stations. The project server does not actually have access to the controller. Another serious drawback of the server-PLC version comparison system is the need to either install software on the server for programming the controller, or use the engineering station as a gateway to communicate with the PLC. Those. These version control systems do not have built-in drivers to unload the project from the controller, which increases the cost of the version control system.
The main disadvantage of such systems for the segment of the mining and metallurgical industry is the extremely high cost.
If one considers the control of the versions of the project files for the most common CAD systems such as KOMPAS-3D and AutoCAD LT, then there are no ready-made solutions with convenient functionality at the moment on the market. The whole process of version control is transferred to the designer. However, it is worth mentioning the availability of additional tools, such as Autodesk's DWG Compare, which allow one to compare two DWG files in graphical mode.
More modern CAD systems support the Software Product Data Management (PDM) version control system, but the transition to them is associated with large material costs and the length of the transition time.
In the case of using electronic document management, which one way or another may include the development of the project ASUTP with the exchange of files between the project participants, the version control system can be implemented within the framework of Electronic Document Management Systems (EDMS).
Based on the foregoing, it was decided to implement, on the basis of existing developments, a corporate system for monitoring the versions of CAD files and ACS projects. The main criteria were chosen for low cost of implementation, simplicity of system operation and high synchronization speed, low operating costs and high reliability of data storage.
After the market analysis of VCS systems, including those used in classical software development, Git, Mercurial and SVN systems were selected based on statistical data (figure 1).  To select the type of system, it is necessary to determine the specifics of the work of the design engineers of the process control systems and the software engineers of the ACS equipment. Development of design and design documentation is usually performed in the workplace on the territory of the enterprise, with one project document, if it is COMPAS-3D systems, AutoCAD LT or the like, only one designer works in the editing mode. Changes made to the document, even if the changes are not correct, do not lead to a violation of the integrity of the project, as it may be when developing software.
Thus, the designer can locally work on the project and save changes to the server either at the request of colleagues, or at the end of the work stage, or at a certain time, for example, at the end of the working day. With this logic of operation, the re-distribution of the repository makes sense only if the designer himself needs to check the versions of local files.
When developing a project for one PLC, one programmer is usually involved and the work on the project is done locally. Any changes should be made to the server only after the completion of the work stage. A non-operational controller project, if it is not loaded into the PLC, does not affect the work of colleagues and the system as a whole, except for the case of parallel development of the project for the PLC and for the operator panel (SCADA system). In this case, for the developers of visualization systems, the most significant information is the address space of the controller and the list of tags. That is, the development of visualization can be performed even if there are not correct algorithms with the correct set of tags.
When two programmers work in parallel on one project, they use special tools of the development environment and exchange data between the two machines via shared folders. In this case, the version control system can only be used as a repository for summary and intermediate releases.
The result of the on-line change of the controller project for the working process is also located on the local machine and must be stored on the server, with a description of the list of changes, so that other engineers can work.
Thus, the implementation of a distributed version control system for this particular task is only useful if one needs to locally monitor changes in the project and if the functionality of the centralized system is not enough to ensure the full operation of engineers. In all other cases, it will be sufficient to use a centralized system.

Results and Discussion
As a result of the analysis of existing VCS systems, the study of the experience of using solutions by design organizations, and the experimental approbation of software solutions, the following systems were chosen: the use of SVN as the main platform for efficient work with binary files. Studies have shown that the standard software allows one to get a compression of up to 30% between file revisions.
The client stations of the designers were equipped with the TortoiseSVN application, which showed a high speed when loading documents on the server and synchronizing projects with the server.
The greatest difficulty was caused by the choice of opensources solutions with a web-interface. At the testing stage, the SubversionEdge package was selected from the point of view of ergonomics and functionality.
The structure of the developed version control system for CAD projects and ASUTP files is presented in Figure 2.

Conclusion
Thus, as a result of the development and implementation of the system, the following main results were obtained. The substantiation of a choice of program components on the basis of opensources of decisions has been spent. Therefore, no additional costs are required to implement the version control system.
When using the solution, the number of conflicts in the CAD files of the project has been minimized, the time of project development and the assembly of project sheets in PDF format has decreased.
The number of errors related to the download of the current version of the PLC project in the process control system has decreased. In the future, conflicts of versions of PLC projects will be excluded.
For convenient work with CAD and PLC projects, the administrator interface needs to be adapted taking into account the features of the development process.
The developed solution can be recommended to industrial enterprises and small engineering companies as a way to improve the safety and reliability of automated process control systems.