Construction of virtual simulation teaching platform for elevator control

Aiming at the deficiencies of the PLC teaching and training platforms in various colleges and universities, in order to meet the needs of students to debug PLC programs in various application places, taking elevator control as an example, this paper uses virtual reality technology, visualization technology, and computer programming technology to design a virtual simulation teaching platform based on PLC elevator control. Students can run the virtual simulation platform on the web page, learn the relevant basic knowledge, understand the operating principle of the elevator, and use the ladder diagram language to program in order to achieve the purpose of learning PLC. The results show that students can write and verify PLC programs anytime and anywhere, which greatly reduces the cost of purchasing training equipment and improves learning efficiency.


Introduction
With the development of the times, Programmable Logic Controller (PLC) has become one of the three pillars of industrial automation [1], and PLC technology is gradually being promoted and applied. However, the current PLC practical teaching resources in our country are seriously inadequate, PLC equipment is expensive, the volume is too large, and the difficulty of debugging has become the biggest problem in PLC teaching.
At present, the traditional teaching methods of PLC mainly include the following: 1 Debug the program directly in the on-site control system. Although the debugging effect is very obvious, it is dangerous and time-consuming. 2 Using the existing PLC dedicated experimental platform to conduct experiments, although it can achieve a more ideal teaching effect, the experimental platform is very expensive, and the update speed of the experimental platform is difficult to catch up with the update speed of the PLC. 3 Using the simulation module provided by the PLC programming software to debug the PLC program, but because there is no actual object, it is not certain whether the PLC program can achieve the expected effect [2][3][4][5][6][7].
In view of the above-mentioned problems, combined with the current development of virtual reality technology, using virtual reality technology to develop a PLC elevator simulation training platform is a more reasonable way to solve this problem. It can reduce the safety risks of elevator operation and commissioning, and solve the problems of excessive volume and high price. Unity3D virtual reality technology is a multi-disciplinary comprehensive technology that has developed rapidly in recent years and has many advantages [8][9][10]. This paper uses the Unity3D engine to design an elevator control virtual simulation teaching platform, through which students can learn the basic knowledge of related courses, understand the basic structure of the elevator, and write and debug PLC programs.

Construction goals of virtual simulation teaching platform
In order to improve the quality of experimental teaching and the level of practical teaching and education, automation majors are guided by the modernization of experimental teaching and rely on the existing advanced experimental teaching platform to build a virtual simulation experimental platform based on the PLC elevator control system to effectively reduce the experimental cost and realize resources sharing, stimulate students' interest in learning, and improve the quality of teaching effects. The virtual simulation experiment project mainly has the following three construction goals: (1) Master and apply relevant professional courses. Enable students to master the working principle and composition structure of elevator control system; enable students to master the basic working process of elevator control system; enable students to master the application of PLC instructions, motor speed control system, elevator closed-loop control system design ideas, etc.
(2) Preliminarily master the modeling, simulation and analysis capabilities of complex control systems. By building a virtual simulation operating environment of the elevator control system, students will strengthen their understanding of typical control systems, and the theoretical knowledge of major professional courses such as automatic control principles, electrical control and programmable controllers, motor and drag basics, sensing and detection technology, etc. Have a deeper understanding.
(3) Cultivate students' ability of collaborative innovation and hands-on practice. The development of this virtual simulation experiment is closely focused on the establishment of a knowledge system and the cultivation of comprehensive learning ability, focusing on cultivating students' ability to integrate knowledge and action, that is, to be able to recognize more complex control systems, and to explore new knowledge through given simulation experiment operations and autonomous experiments field.

Virtual simulation teaching platform development process
The development process of the Unity-based elevator control virtual simulation teaching platform introduced in this article is shown in figure 1.

Elevator related information collection
Three-dimensional modeling of elevator scene (3DS Max) Elevator model import Unity 3D Elevator control virtual simulation teaching platform (Unity) Elevator animation production Controller related information collection  First, collect the relevant information of the elevator and the controller, measure the size of the relevant hardware, and then use the 3DS Max software to build the three-dimensional model. In the process of modeling, it is best to use polygon modeling. Polygon modeling is the most commonly used and classic modeling approach. The model to be edited is converted into editable polygons, and then the sub-objects of the model are modified and edited. After modeling, check the model, merge the broken vertices, and remove the isolated vertices. This can reduce the number of model faces and increase the running speed. After the model is modeled, use the V-Ray renderer for rendering, export the rendered model to. FBX format, and then import the model into the Unity 3D engine [11].
Use the Unity 3D platform to associate the PLC program with the three-dimensional elevator animation, so that the PLC program can be used to control the operation of the elevator. Finally, the resources in Unity 3D are published to the server, so that the user can run the system on the browser.

Feature design
In order to ensure that students can efficiently complete the experiment content in class, in the PLCbased elevator control virtual simulation experiment, the online preparation experiment part is arranged for students, so the experiment mainly includes experiment preparation and experiment process. The experiment content is as follows As shown in figure 2, the experiment preparation is mainly for students to watch the teaching videos to understand the experiment content, learn the basic knowledge of PLC, understand the basic structure of the elevator, and complete the experimental pre-assessment. When preparing for the experiment, students can consolidate the previous theoretical lessons. Content, understand the tasks to be completed in the experimental class. The experimental process is mainly to write the program segments of each part of the elevator, and to simulate and verify each program segment. After the verification is correct, further write a single six-story elevator program to complete the elevator passenger flow model test, And finally compile six ten-floor elevator programs to complete the virtual simulation experiment. The elevator control virtual simulation experiment occupies a total of 4 class hours, covering the knowledge of multiple courses such as elevator structure, electric drive foundation, PLC controller, etc., so that the theory can be applied to practice. The knowledge points corresponding to this virtual simulation platform are shown in figure 3.

Establish virtual PLC and database
Programming the PLC program on the platform can make the elevator model make corresponding actions, mainly because of the existence of the virtual PLC. The workflow of the virtual PLC is basically similar to the traditional hardware PLC. First, the user needs to write the PLC on the platform. The program needs to be compiled at the same time. After the compilation is correct, download the corresponding program to the virtual PLC, and then use the corresponding rules to interpret the program to make it acceptable to the elevator model. After the elevator model moves, the corresponding signal will also be generated, and the corresponding signal will be transmitted to the virtual PLC for processing.
When the simulation is running, the virtual PLC and the programming interface are disconnected, that is, if the PLC program is changed at this time, the virtual PLC cannot receive the signal response, and the elevator model will not make corresponding actions, but the virtual PLC will interact with the elevator model in real time. Interface for data exchange. When the state of the virtual PLC output point changes, the value of the data in the database will be changed, and then the corresponding graphic object will change, producing the simulation effect that we require to simulate the actual object. At the same time, the input signal of the PLC should also be associated with the data of the database. The change of the graphic object on the screen changes the data in the database connected to it, and then changes the input signal [12]. When the elevator reaches the designated floor, the upper and lower leveling sensors will detect whether the elevator has stopped. If it has stopped, the signals of the upper and lower leveling sensors are all true, and then transmitted to the virtual PLC, and the virtual PLC will send corresponding signals to make the elevator stop. The door open relay starts to act, the elevator opens the door, and passengers enter the elevator. At the same time, the infrared sensor detects whether there are obstacles in the elevator door. If there are obstacles, the elevator door open relay will act and the elevator will not close the door to ensure safety. If there are no obstacles, the elevator door close relay Action, the elevator door closes, when the elevator door is closed, the elevator door opening and closing process ends.

Compilation of the corresponding subprogram
When building the elevator simulation control system, the above six modules are programmed in ladder diagram, and the subroutines are connected in logical order to form the overall program of the elevator PLC control system.

Scene roaming
With the rapid development of 3D roaming technology, virtual roaming technology has been applied more and more widely. The 3D virtual scene roaming system is a combination of VR, three-dimensional graphics and imaging, computer network technology, database technology and other computer science technologies. Store and process the information of each part of the elevator and surrounding scenes, and then establish a virtual and digital roaming system, which can display the various modules of the elevator in all directions, restore the real appearance of the elevator, and has a strong sense of immersion and interaction Due to sex, students and teachers will feel immersive when roaming in the system [13].
Through the scene roaming, students can understand the structure of the elevator, such as: traction system, guidance system, car, hoistway equipment, safety protection system, etc., and can also understand elevator control modules, such as virtual CPU, communication module, input Output modules and so on.

Graphical user interface design
When students use the system, entering the system, the displayed interface is shown in figure 5. Figure 5 System initial interface Figure 6 Cognitive learning interface In this interface, there are 4 guide bars, namely: cognitive learning, control system design, single elevator design and operation, and multiple elevator design and operation. Students can get acquainted with the operation method of the system more quickly through the guide bar, and at the same time make the human-computer interaction more convenient and quick. Students click on the "cognitive learning" menu bar, and the pop-up interface is shown in figure 6.
In this interface, students can click the button on the left side of the interface to learn about the PLC controller, and click the "Enter Elevator Structure Recognition" button in the lower right corner of the interface to jump to the corresponding page. On the left side of the interface, you can switch between different elevator structure screens, and there will be corresponding introductions on the right side of the interface, so that students can better understand the elevator structure. For example, use the mouse to click on the "Asynchronous motor" in the " Electric drag system" on the left, the asynchronous motor will be highlighted on the screen, as shown in figure 7, and there is a basic introduction to the asynchronous motor on the right side of the interface.

Design of pre-assessment scoring system
After students complete cognitive learning, the system will automatically pop up the pre-assessment scoring interface, as shown in figure 8.
In this interface, students can click on the correct option to answer. After completing the answer, click the "Submit Answer" button, the system will automatically grade, and the student's score will be recorded in the background. The teacher can view and export the student's Achievement. Students must conduct cognitive learning about elevator knowledge before doing experiments, and only after passing the pre-assessment, can students conduct virtual simulation experiments. In the process of answering, in order to prevent students from plagiarizing or proofreading answers, the system randomly shuffles the number of questions, and different students draw different questions.

Conclusion
Aiming at the current situation of insufficient training equipment in universities, this paper uses Unity 3D to build a PLC-based elevator control virtual simulation teaching platform. The test results show that the system provides a safe, intuitive and efficient environment for students to learn PLC. The problem of insufficient PLC training equipment is solved, and the cost of purchasing equipment is reduced. Students' learning is no longer restricted by time and place. They only need a PC with Internet access to complete the experiment. At the same time, due to the realistic experimental teaching scene, it also increases the student's sense of experience, stimulates their interest in learning, and improves learning efficiency.