Simulation control platform based on model development and material handling test method
Through the nonlinear hardware linearization modeling and logic conversion of the simulation control platform, the problem of lack of commercial software in the high-precision instrument equipment industry has been solved, system-level testing and simulation have been realized, development efficiency has been improved and costs have been reduced.
Patent Information
- Application Number
- CN202210296150.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-03-24
AI Technical Summary
In high-precision instrument and equipment industries such as semiconductor equipment and medical equipment, there is a lack of mature commercial software for simulation testing based on model development, resulting in low development efficiency, high costs, and difficulty in achieving system-level testing and simulation.
A simulation control platform based on model development is adopted. Through the combination of upper computer module, process logic conversion module, lower computer module and virtual object module, nonlinear hardware linearization modeling is realized, and system-level testing and simulation are carried out. Logic conversions such as blocking state switching unit, periodic interrupt unit, process switching unit and priority switching unit are included, and motion firmware is generated for control object modeling.
It improves development efficiency, reduces coding workload and technical complexity, decouples software and hardware, improves maintainability and inheritance, and significantly reduces testing costs and time.
Smart Images

Figure CN114690663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electromechanical system equipment, and in particular to a simulation control platform based on model development and a material handling and handover testing method. Background Art
[0002] With the continuous development of the manufacturing industry, precision control is particularly important in the semiconductor industry or the medical device industry. The development of a set of precision instruments and equipment requires the coordinated and unified development of multiple disciplines such as optics, mechanics, electronics and electrical, control, and software. The process includes demand identification, design, material feeding, testing, design optimization, and online launch.
[0003] Traditional model-based development focuses solely on the design and development of core algorithms or functional logic. Code is then generated and integrated into manual code, creating an executable file that is burned into the control board for debugging. In the automotive sector, model-based development is a relatively mature technology for various onboard subsystems, such as automatic power steering and lane departure warning systems. For model-in-the-loop testing, mature commercial software (such as CarSim and TruckSim) is available that can be used as vehicle models for co-simulation testing. However, in traditional high-precision instrumentation and equipment industries, such as semiconductor equipment and medical devices, mature commercial software is not yet available to simulate the control objects. Model-based development is relatively simple and superficial, lacking a development toolchain. The use of MATLAB / Simulink is limited to simulation and analysis of control algorithms, as well as data analysis using toolboxes. The advantages of model-based development, such as improved development efficiency, reduced development time and labor costs, and reduced coding effort, are not yet realized.
[0004] Therefore, it is necessary to provide a new type of simulation control platform based on model development and a material handling test method to solve the above problems existing in the prior art. Summary of the Invention
[0005] The purpose of the present invention is to provide a simulation control platform and a material handling test method based on model development, which realizes system modeling of the control object by linearizing the nonlinear hardware to complete system-level testing and simulation, thereby improving development efficiency.
[0006] To achieve the above-mentioned purpose, the simulation control platform based on model development of the present invention includes an upper computer module, a process logic conversion module, a lower computer module and a virtual object module that are communicatively connected in sequence, wherein the upper computer module is used to communicate with the lower computer module, the lower computer module is used to generate motion firmware that can be executed by the virtual object module, the virtual object module is used to model and design the target control object, and the process logic conversion module is used to perform logical conversion on the process in the lower computer module to unify the timing in the lower computer module and the upper computer module.
[0007] The beneficial effects of the simulation control platform developed based on the model described in the present invention are: the simulation control platform is composed of an upper computer module, a process logic conversion module, a lower computer module and a virtual object module, and the nonlinear hardware is linearly modeled to achieve system modeling of the control object, so that system-level testing and simulation can be completed through the simulation control platform. This not only reduces coding work and technical complexity, allowing developers to focus on functions and performance, further improving product competitiveness, but also allows the entire machine software to be separated from physical operation, decoupling software and hardware, and improving maintainability and inheritance.
[0008] Optionally, the process logic conversion module includes at least one of a blocking state switching unit, a periodic interrupt unit, a process switching unit and a priority switching unit. The blocking state switching unit is used to switch the blocking state process in the lower machine module to a non-blocking state process. The periodic interrupt unit is used to convert the multi-period interrupt task in the lower machine module into a task polled by time slice; the process switching unit is used to switch some multi-process diagnostic tasks in the lower machine module to single-process diagnostic tasks; the priority switching unit is used to adjust the priority and task scheduling of some processes in the lower machine module.
[0009] Optionally, the blocking state switching unit includes at least one of a timeout conversion subunit and an asynchronous switching subunit, the timeout switching subunit is used to set a timeout period for the blocking state process in the lower computer module, and after waiting for the timeout period and not receiving valid data, switch from the current process to executing other processes; the asynchronous switching subunit is used to switch the synchronous command processing mechanism in the communication process to an asynchronous command processing mechanism to realize parallel processing of multiple commands.
[0010] Optionally, the motion firmware generated in the lower computer module includes a hardware diagnostic process, which includes queue processing tasks, communication tasks, control algorithms, diagnostic tasks and command processing tasks. The periodic interrupt unit is used to execute the queue processing tasks, the communication tasks, the control algorithms, the diagnostic tasks and the command processing tasks according to a polling mechanism.
[0011] Optionally, the periodic interrupt unit expands the cache of the queue processing task and sets a timeout logic for the communication task.
[0012] Optionally, the diagnostic task includes a chip-level diagnostic subtask, a board-level diagnostic subtask, a component-level diagnostic subtask and a system-level diagnostic subtask, and the process switching unit executes the chip-level diagnostic subtask, the board-level diagnostic subtask, the component-level diagnostic subtask and the system-level diagnostic subtask within the same cycle to locate the fault location and fault time.
[0013] Optionally, the priority switching unit switches tasks of different priorities of some processes in the lower computer module to a unified priority, and switches preemptive task scheduling to non-preemptive task scheduling.
[0014] The present invention also discloses a material handling test method, which is tested using the above-mentioned simulation control platform based on model development. The material handling test method includes:
[0015] Sending handover command data to the lower computer module through the upper computer module, so that the lower computer module controls the virtual object module to move to the handover position and feeds back the first environment data to the lower computer module;
[0016] After the lower computer module detects that there is material at the handover location according to the first environmental data, the upper computer module notifies the upper computer module;
[0017] The lower computer module sends material movement command data to simulate the movement of the material to be transported and fix it in a preset position;
[0018] The upper computer module sends processing command data to the lower computer module, so that the lower computer module controls the virtual object module to move to the processing position to complete the loading test process.
[0019] The beneficial effect of the material loading and handover test method described in the present invention is that: the material loading and handover test method is executed through the above-mentioned simulation control platform developed based on the model. The entire test process only requires the upper computer module and the lower computer module to cooperate with each other to complete the entire test process. The material loading test process can be completed without physical operation, which not only improves the test efficiency, but also significantly reduces the test cost, and can be applied to various scenarios.
[0020] Optionally, the sending of handover command data to the slave module through the upper computer module so that the slave module controls the virtual object module to move to the handover position includes:
[0021] The upper computer module sends the handover command data to the lower computer module, wherein the handover command data includes handover position coordinate data;
[0022] The lower computer module runs a firmware control algorithm according to the handover position coordinate data in the handover command data to obtain first force data, and obtains displacement data and first sensor data before the firmware control algorithm runs;
[0023] The lower computer module sends the first force data, the displacement data and the first sensor data to the virtual object module, and runs the control object model algorithm in the virtual object module through the first force data to move the virtual object module to a handover position.
[0024] Optionally, feeding back the first environment data to the slave computer module includes:
[0025] During the process of running the control object model algorithm, the displacement data and the first sensor data are acquired, and the displacement data and the first sensor data are sent to the lower computer module.
[0026] Optionally, the lower computer module sends material movement command data to simulate the movement of the material to be transported and fix it at a preset position, including:
[0027] The lower computer module sends flag information to the virtual object module to simulate the movement of the material to the preset position, wherein the flag information includes a mobile material flag and a fixed material flag.
[0028] Optionally, the upper computer module sends processing command data to the lower computer module, so that the lower computer module controls the virtual object module to move to a processing position, including:
[0029] The upper computer module sends the processing command data to the lower computer module, and after the lower computer module runs the processing command data, it obtains second force data, and sends the second force data to the virtual object module to run the control object model algorithm through the second force data and move the virtual object module to the processing position. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a structural block diagram of the simulation control platform developed based on the model according to an embodiment of the present invention;
[0031] Figure 2 A schematic diagram of a process based on synchronous command processing in the prior art;
[0032] Figure 3A schematic diagram of a process based on asynchronous command processing of a simulation control platform developed based on a model according to an embodiment of the present invention;
[0033] Figure 4 A schematic diagram of the hardware diagnosis process in the prior art;
[0034] Figure 5 A schematic diagram of the hardware diagnosis process performed by the simulation control platform based on model development according to an embodiment of the present invention;
[0035] Figure 6 A schematic diagram of the processing process of a diagnostic task in the prior art;
[0036] Figure 7 This is a schematic diagram of the process of processing diagnostic tasks by the simulation control platform developed based on the model according to an embodiment of the present invention;
[0037] Figure 8 A schematic diagram of the processing process of tasks of different priorities in the prior art;
[0038] Figure 9 Schematic diagram of the process of processing tasks of uniform priority by the simulation control platform based on model development according to an embodiment of the present invention;
[0039] Figure 10 Schematic diagram of the design process of the simulation control platform based on model development according to an embodiment of the present invention;
[0040] Figure 11 This is a flow chart of the material handling test method according to an embodiment of the present invention;
[0041] Figure 12 This is a schematic diagram of the specific process of the material handling test method according to an embodiment of the present invention;
[0042] Figure 13 This is a structural block diagram of the process logic conversion module of the simulation control platform developed based on the model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meanings understood by people with ordinary skills in the field to which the present invention belongs. The words "including" and similar words used in this article mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0044] In view of the problems existing in the prior art, the embodiment of the present invention provides a simulation control platform based on model development. Figure 1 , including an upper computer module 10, a process logic conversion module 20, a lower computer module 30 and a virtual object module 40 that are communicatively connected in sequence, wherein the upper computer module 10 is used to communicate with the lower computer module 30, the lower computer module 30 is used to generate motion firmware that can be executed by the virtual object module 40, the virtual object module 40 is used to model and design the target control object, and the process logic conversion module 20 is used to perform logical conversion on the process in the lower computer module 30 to unify the timing in the lower computer module 30 and the upper computer module 10.
[0045] In this embodiment, the simulation control platform forms an independently operating platform through the upper computer module 10, the process logic conversion module 20, the lower computer module 30 and the virtual object module 40. The target control object is modeled and designed through the virtual object module 40 to obtain a virtual model corresponding to the target control object. The upper computer module 10 communicates with the lower computer module 30 to issue control instructions to control the lower computer module 30. The lower computer module 30 is mainly used to generate motion firmware that can be executed by the virtual object module 40, so as to control the movement of the virtual object module 40 through the lower computer module 30, thereby facilitating the control of the virtual model generated by the virtual object module 40.
[0046] In some embodiments, the simulation control platform runs on the Windows platform of a computer, and the host computer module 10 is software developed based on a programming language, called host computer software or host computer project (Host.sln); the lower computer module 30 is generated by the modeling software according to the motion control situation to generate code, and form an engineering firmware that can be run independently based on a centralized development environment; the virtual object module 40 is also generated by the modeling software according to the target control object modeling to generate code and form engineering firmware; wherein, the engineering firmware is a file that can run and execute independently, so as to facilitate the completion of the simulation process.
[0047] Specifically, in this embodiment, the upper computer module 10 is an upper computer software developed based on the programming language C# or python, including an interface, various drivers and module components with different functions. The lower computer module 30 and the virtual object module 40 are both engineering firmware obtained based on the modeling software simulink, and the centralized development environment of the lower computer module 30 and the virtual object module 40 are both VS2019.
[0048] In some other embodiments, the lower computer module 30 and the upper computer module 10 run on the Windows platform of the same computer, so that during the operation of the entire simulation control platform, the upper computer module 10 does not need a separate driver software layer to control the lower computer module 30 to achieve a full-scene testing process, effectively reducing the manpower and time costs of the test.
[0049] In some other embodiments, the lower computer module 30 is a motion control firmware in a semiconductor device. In this embodiment, the motion control firmware is modeled and designed using the modeling software simulink to obtain a firmware model Fireware.mdl, and the code source file Fireware.c of the firmware model is generated using the modeling software encoder simulink coder, and then imported into the integrated development environment VS2019 to obtain the VS project Fireware.sln.
[0050] The virtual object module 40 is the Plant.mdl file obtained through the modeling design of the modeling software Simulink, which generally includes a scheduling module, an algorithm module, a diagnostic module, a communication module and a queue module. The code source file Plant.c of the firmware model is generated by the modeling software encoder Simulink coder, and then imported into the integrated development environment VS2019 to obtain the VS project Plant.sln, so that the lower computer module 30 and the virtual object module 40 can correspond one to one on different platforms.
[0051] Since there are many processes in the Fireware.sln file modeled by the lower computer module 30 in the integrated development environment VS2019, if the PC is used directly for process management, the user cannot fully predict the running status of each process due to the computer's time slice polling, and orderly communication between the upper computer module 10 and the lower computer module 30 cannot be guaranteed. The process logic conversion module 20 is used to perform logical conversion on the processes in the lower computer module 30 to unify the timing in the lower computer module 30 and the upper computer module 10 to facilitate orderly communication.
[0052] In some embodiments, the process logic conversion module 20 includes at least one of a blocking state switching unit 201, a periodic interrupt unit 202, a process switching unit 203 and a priority switching unit 204. The blocking state switching unit 201 is used to switch the blocking state process in the lower machine module 30 to a non-blocking state process, and the periodic interrupt unit 202 is used to convert the multi-period interrupt task in the lower machine module 30 into a task polled by time slice; the process switching unit 203 is used to switch some multi-process diagnostic tasks in the lower machine module 30 to single-process diagnostic tasks; the priority switching unit 204 is used to adjust the priority and task scheduling of some processes in the lower machine module 30.
[0053] In this embodiment, reference Figure 13 The process logic conversion module 20 includes a blocking state switching unit 201, a periodic interruption unit 202, a process switching unit 203 and a priority switching unit 204, so that the process logic conversion module 20 can perform blocking state switching, periodic termination, process switching and priority switching on the lower computer module 30, thereby unifying the communication timing between the lower computer module 30 and the upper computer module 10 in each state.
[0054] In some embodiments, the blocking state switching unit 201 includes at least one of a timeout conversion subunit 2011 and an asynchronous switching subunit 2012. The timeout switching subunit 2011 is used to set a timeout period for the blocking state process in the lower computer module 30, and after waiting for the timeout period and not receiving valid data, switch from the current process to executing other processes; the asynchronous switching subunit 2012 is used to switch the synchronous command processing mechanism in the communication process to an asynchronous command processing mechanism to realize parallel processing of multiple commands.
[0055] Specifically, since the multiple processes in the lower computer module 30 include a communication module and a queue module, and the communication module and the queue module generally include a blocked process, they are in a state of receiving data for a long time, resulting in a long occupancy time in the lower computer module 30 and a time-consuming waiting time. The timeout switching subunit 2011 performs timeout switching, and sets a timeout time t for the blocked process in the lower computer module 30. During the execution of the blocked process, if the blocked process still does not receive valid data after the timeout time t, it switches to executing other tasks, thereby switching the blocked process to executing a non-blocking process, thereby improving the execution efficiency of the process and avoiding excessive waiting.
[0056] On the other hand, in the communication process between the upper computer module 10 and the lower computer module 30, reference Figure 2 , usually adopts a synchronous command processing mechanism, that is, after the upper computer module 10 sends a command, the lower computer module 30 sequentially performs the process of command reception, command execution and response sending, and completes the process after the upper computer module 10 receives the response. However, this method requires the entire synchronous command processing to be completed before other processes can be carried out, which prolongs the process processing time to a certain extent and cannot achieve timing control. In this solution, reference Figure 3 By adopting the asynchronous switching subunit 2012 to switch the synchronous command processing to asynchronous command processing, based on the asynchronous command processing mechanism, the upper computer module 10 can process other processes after receiving the "receive return" signal of the "command acceptance" process in the lower computer module 30. There is no need to wait until the "command acceptance", "command execution" and "response sending" on the lower computer module 30 are completed and the "response acceptance" signal is received before other processes can be carried out. Multiple command acceptance and command execution can be processed in parallel, thereby reducing the process time.
[0057] Specifically, after the upper computer module 10 sends the command to the lower computer module 30, the lower computer module 30 sends an accept return instruction to the upper computer module 10 after receiving the command, and the upper computer module 10 can execute other processes after receiving the accept return instruction, and the command execution process is executed in the lower computer module 30. If the upper computer module 10 wants to obtain a response result, the lower computer module 30 sends a response result after receiving the response sending instruction, and the upper computer module 10 obtains the response result, thereby realizing the parallel processing process of multiple command acceptance and command execution, effectively reducing the execution time of the process.
[0058] In some embodiments, the motion firmware generated in the lower computer module 30 includes a hardware diagnostic process, which includes queue processing tasks, communication tasks, control algorithms, diagnostic tasks and command processing tasks. The periodic interrupt unit 2012 is used to execute the queue processing tasks, the communication tasks, the control algorithms, the diagnostic tasks and the command processing tasks according to a polling mechanism.
[0059] Specifically, refer to Figure 4 For the hardware diagnosis process in the lower computer module 30, the traditional operating sequence is a multi-cycle interrupt task. Within the time Ts, the control algorithm is completed first, and the queue processing task, communication task, and diagnosis task are completed in sequence in the remaining time. However, since the operating environment on the computer is a time-sharing processing system, it is impossible to guarantee that the processing will be carried out according to this sequence. Therefore, the hardware diagnosis process is processed by the periodic interrupt unit 2012, referring to Figure 5 , changing the hardware diagnosis process from the original execution sequence to polling.
[0060] In some further embodiments, the periodic interrupt unit 2012 expands the cache of the queue processing task and sets a timeout logic for the communication task, thereby expanding the performance of the queue and communication to ensure that the queue processing task and the communication task will not be blocked when executing the hardware diagnosis process.
[0061] In some other embodiments, the diagnostic task includes a chip-level diagnostic subtask, a board-level diagnostic subtask, a component-level diagnostic subtask and a system-level diagnostic subtask, and the process switching unit 2013 executes the chip-level diagnostic subtask, the board-level diagnostic subtask, the component-level diagnostic subtask and the system-level diagnostic subtask within the same cycle to locate the fault location and fault time.
[0062] Specifically, refer to Figure 6 The traditional method is to interrupt the chip-level diagnostic subtask, board-level diagnostic subtask, component-level diagnostic subtask and system-level diagnostic subtask in different cycles. For example, the chip-level diagnostic subtask is interrupted at 20us, the board-level diagnostic subtask is interrupted at 200us, the component-level diagnostic subtask is interrupted at 500us and the system diagnostic subtask is interrupted at 1ms. However, since the priority and timing mechanisms in the computer cannot operate effectively at the same time, this method cannot guarantee that the diagnostic subtasks are executed in accordance with the time and order of multiple cycles, affecting the efficiency of fault diagnosis. In this solution, reference Figure 7By cyclically running the chip-level diagnostic subtask, board-level diagnostic subtask, component-level diagnostic subtask and system-level diagnostic subtask within a diagnostic cycle, it is ensured that each diagnostic function is completed in a controllable manner on the computer time flow, the corresponding fault location and time are located, the fault diagnosis process is completed, and the diagnostic efficiency is improved.
[0063] In some embodiments, the priority switching unit 204 switches tasks of different priorities of some processes in the lower computer module 30 to a unified priority, and switches preemptive task scheduling to non-preemptive task scheduling.
[0064] Specifically, refer to Figure 8 Taking five executing tasks as an example, the priorities of Task 1, Task 2, and Task 3 increase in sequence. When Task 1 returns to the ready state from the suspended state, the execution of Task 1 will be preempted by Task 2 under the action of the preemptive scheduler. However, the implementation of such task preemption logic on computers is relatively complex, and when there are shared resources, it is difficult to achieve the common use of multiple tasks. Therefore, this solution switches the tasks of different priorities of some processes to a unified priority through the priority switching unit 2014, and switches the preemptive task scheduling to non-preemptive task scheduling, which can effectively reduce the workload of task allocation and timing design. Figure 9 , designed as four tasks with the same priority: one, two, three and four. The time allocated to each task is fixed, and is a multiple of the system clock, such as 5 times. The running process is as follows: Task one runs first, and after running for 5 clock cycles, it switches to Task two through time slice scheduling. After Task two runs for 5 system clock cycles, it switches to Task three through time slice scheduling. Task three calls a blocking API function during running. After calling the function, it will switch to the next Task four through time slice scheduling. Even if the 5 system time beats of Task three have not been used up at this time, Task four will switch to Task one through time slice scheduling after running for 5 system clock beats. Under the above time slice polling, the workload of task allocation and task timing design can be reduced, and the platform construction time is greatly reduced.
[0065] In some other embodiments, for different devices, the design process of the lower computer module 30 and the virtual object module 40 in the simulation control platform is as follows:
[0066] First, the characteristic information of the target control object and the characteristic information of the motion firmware are input into the simulation software Simulink. The characteristic information of the target control object includes mechanical characteristic information, electrical characteristic information, motion characteristic information and application scenario characteristic information. The characteristic information of the motion firmware includes functional requirement information and performance requirement information. The simulation software Simulink models the target control object and the motion firmware. After the modeling is completed, the target control object and the motion firmware are integrated for simulation testing based on the simulation software Simulink to further optimize the model, and the engineering files Plant.mdl and Firmware.mdl corresponding to the virtual object module 40 and the lower computer module 30 are obtained respectively.
[0067] Since the optimized model is an MDL-formatted project file, C language code is generated from both Plant.mdl and Firmware.mdl. This code is then converted into .sln project files (Plant.sln and Firmware.sln) using the VS2019 integrated development environment. These files can then be jointly tested within the IDE to verify the accuracy of the resulting model. Specifically, this testing process is software-in-the-loop testing.
[0068] It should be noted that during the design process of the motion firmware and the target control object, the design of the host computer module is completed synchronously to obtain the corresponding engineering file Host.sln of the host computer. After that, it can be tested in conjunction with Plant.sln and Firmware.sln to complete the full-scene test of the host computer module. Finally, after verification with the hardware, the final host computer module 10 can be obtained to complete the design process of the model.
[0069] In some embodiments, the specific design process is as follows, refer to Figure 10 First, the firmware design process is carried out. After inputting the characteristic information of the target control object and the characteristic information of the motion firmware in the simulation software Simulink, the modeling and code generation are respectively carried out to obtain the engineering files Plant.mdl and Firmware.mdl; then, the engineering files Plant.mdl and Firmware.mdl are respectively subjected to firmware function testing, performance testing and interface testing. If the motion firmware is tested, the Firmware.mdl is optimized and retested until the test is completed and the firmware design process ends.
[0070] After that, we enter the host computer design process. After inputting the host computer requirements, we develop the corresponding host computer model and perform testing and optimization to obtain the optimized host computer model. After debugging the host computer model, we conduct full-scene testing. After completing the full-scene testing process, we continue to determine whether the debugging is complete. After determining that the host computer model is finally debugged, the design process ends and the final host computer model is obtained. Among them, if debugging is not completed each time, the process of testing and optimizing the host computer model will continue, which will not be repeated here.
[0071] It should be noted that the simulation control platform of the present invention is suitable for traditional manufacturing industries, including medical devices, semiconductor equipment and other equipment that require high-precision control. Based on this simulation control platform, the software development process is not restricted by hardware. Through precise analysis and complete modeling of the control object, the host computer can complete the whole process test in the Windows environment. When the whole machine is installed, the host computer only needs to debug the performance of the equipment, which greatly reduces the workload related to hardware, and can greatly shorten the development time and improve development efficiency.
[0072] The present invention also provides a material transfer test method, referring to Figure 11 , using the above-mentioned simulation control platform based on model development for testing, the material handover test method includes the following steps:
[0073] S1101. Send handover command data to the slave module through the upper computer module, so that the slave module controls the virtual object module to move to the handover position and feeds back first environment data to the slave module.
[0074] In some embodiments, the sending of the handover command data to the slave module by the upper computer module so that the slave module controls the virtual object module to move to the handover position includes:
[0075] The upper computer module sends the handover command data to the lower computer module, wherein the handover command data includes handover position coordinate data;
[0076] The lower computer module runs a firmware control algorithm according to the handover position coordinate data in the handover command data to obtain first force data, and obtains displacement data and first sensor data before the firmware control algorithm runs;
[0077] The lower computer module sends the first force data, the displacement data and the first sensor data to the virtual object module, and runs the control object model algorithm in the virtual object module through the first force data to move the virtual object module to a handover position.
[0078] Specifically, refer to Figure 12 At the beginning of loading, the host computer module first sends the handover position coordinate data to the slave computer module via Ethernet, so as to control the XY axis in the loading equipment to move to the handover position, where the handover position coordinate data is recorded as (x exchange ,y exchange ).
[0079] After the lower computer module receives the handover position coordinate data in the handover command data, the lower computer module cyclically runs the firmware control algorithm according to the handover position coordinate data to obtain the first force data, and sends the first force data to the virtual object module via Ethernet after each cycle. At the same time, the lower computer module obtains displacement data and first sensor data respectively when running the firmware control algorithm in each cycle, wherein the displacement data is the displacement data of the XY axis moving to the handover position, and the first sensor data includes the sensor data Flag of the handover position. EX .
[0080] The lower computer module then sends the first force data, the displacement data, and the first sensor data to the virtual object module, and runs the control object model algorithm in the virtual object module according to the first force data, so that the virtual object module simulates movement to the handover position, thereby completing the preliminary motion simulation process.
[0081] In some further embodiments, the feeding back the first environment data to the slave computer module includes:
[0082] During the process of running the control object model algorithm, the displacement data and the first sensor data are acquired, and the displacement data and the first sensor data are sent to the lower computer module.
[0083] Specifically, after each cycle of running the control object model algorithm is completed, the displacement data and the first sensor data are sent to the lower computer module to facilitate subsequent determination of whether there is material at the handover position.
[0084] S1102: After the lower computer module detects the presence of materials at the handover location through the first environmental data, the upper computer module notifies the upper computer module.
[0085] Specifically, after the lower computer module receives the first environmental data, it obtains the pressure data of the vacuum sensor in the first environmental data to determine whether there is material at the handover position. After determining that there is material, it sends a notification message to the upper computer module so that the upper computer module can simulate the loading process.
[0086] S1103: The lower computer module sends material movement command data to simulate the movement of the material to be transported and fix it at a preset position.
[0087] In some embodiments, the process includes:
[0088] The lower computer module sends flag information to the virtual object module to simulate the movement of the material to the preset position, wherein the flag information includes a mobile material flag and a fixed material flag.
[0089] Specifically, the slave module sends the moving material flag and the fixed material flag to the virtual object module, simulating the material moving to a preset position. The moving material flag corresponds to the robot arm in the equipment moving the material to the corresponding position, while the fixed material flag simulates the vacuum solenoid valve opening to a vacuum state, simulating the material being fixed in place.
[0090] In some embodiments, the process of simulating the material moving to the corresponding position and being fixed at the corresponding position is set to 1 to 10 seconds.
[0091] S1104: The upper computer module sends processing command data to the lower computer module, so that the lower computer module controls the virtual object module to move to the processing position to complete the loading test process.
[0092] In some embodiments, the above process includes:
[0093] The upper computer module sends the processing command data to the lower computer module, and after the lower computer module runs the processing command data, it obtains second force data, and sends the second force data to the virtual object module to run the control object model algorithm through the second force data and move the virtual object module to the processing position.
[0094] After the material is moved and fixed in the corresponding position, the upper computer module sends the processing command data to the lower computer module, so that the lower computer module runs the firmware model algorithm according to the processing command data to obtain the second force data, and sends the second force data to the virtual object module, so that the virtual object module runs the control object model algorithm according to the second force data, thereby moving the virtual object module to the processing position on the platform and completing the entire loading test process.
[0095] Wherein, the processing command data includes processing position coordinate data So that the virtual object module can simulate movement to this position.
[0096] In the above-mentioned material loading and handover test method, the material loading and handover test is carried out through the simulation control platform established above. The test process of the entire material loading and handover process can be completed in the Windows environment of the computer. There is no need for physical testing. The workload related to hardware is greatly reduced, which not only effectively reduces the test time but also improves the development efficiency.
[0097] While the embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations of these embodiments are possible. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the claims. Furthermore, the invention described herein is susceptible to other embodiments and may be practiced or implemented in a variety of ways.
Claims
1. A simulation control platform based on model development, characterized in that: The system comprises an upper computer module, a process logic conversion module, a lower computer module and a virtual object module that are communicatively connected in sequence, wherein the upper computer module is used to communicate with the lower computer module, the lower computer module is used to generate motion firmware that can be executed by the virtual object module, the virtual object module is used to model and design the target control object, and the process logic conversion module is used to perform logic conversion on the process in the lower computer module to unify the timing in the lower computer module and the upper computer module; The process logic conversion module includes a blocking state switching unit, a periodic interrupt unit, a process switching unit and a priority switching unit. The blocking state switching unit is used to switch the blocking state process in the lower machine module to a non-blocking state process. The periodic interrupt unit is used to convert the multi-periodic interrupt task in the lower machine module into a task polled by time slice; the process switching unit is used to switch some multi-process diagnostic tasks in the lower machine module to single-process diagnostic tasks; the priority switching unit is used to adjust the priority and task scheduling of some processes in the lower machine module; The motion firmware generated in the lower computer module includes a hardware diagnosis process, which includes a queue processing task, a communication task, a control algorithm, a diagnosis task, and a command processing task. The periodic interrupt unit is used to execute the queue processing task, the communication task, the control algorithm, the diagnosis task, and the command processing task according to a polling mechanism; The diagnostic task includes a chip-level diagnostic subtask, a board-level diagnostic subtask, a component-level diagnostic subtask, and a system-level diagnostic subtask, and the process switching unit executes the chip-level diagnostic subtask, the board-level diagnostic subtask, the component-level diagnostic subtask, and the system-level diagnostic subtask in the same cycle to locate the fault location and fault time; The priority switching unit is used to switch tasks of different priorities of some processes in the lower computer module to a unified priority, and switch preemptive task scheduling to non-preemptive task scheduling to reduce the workload of task allocation and timing design.
2. The simulation control platform based on model development according to claim 1, characterized in that: The blocking state switching unit includes at least one of a timeout switching subunit and an asynchronous switching subunit. The timeout switching subunit is used to set a timeout period for the blocking state process in the lower computer module, and after waiting for the timeout period and not receiving valid data, switch from the current process to executing other processes; the asynchronous switching subunit is used to switch the synchronous command processing mechanism in the communication process to an asynchronous command processing mechanism to realize parallel processing of multiple commands.
3. The simulation control platform based on model development according to claim 1, characterized in that: The periodic interruption unit expands the cache of the queue processing task and sets a timeout logic for the communication task.
4. A material handling test method, characterized in that: The test is performed using the simulation control platform based on model development as described in any one of claims 1 to 3 above, and the material handling test method includes: Sending handover command data to the lower computer module through the upper computer module, so that the lower computer module controls the virtual object module to move to the handover position and feeds back the first environment data to the lower computer module; After the lower computer module detects that there is material at the handover location according to the first environmental data, the upper computer module notifies the upper computer module; The lower computer module sends material movement command data to simulate the movement of the material to be transported and fix it in a preset position; The upper computer module sends processing command data to the lower computer module, so that the lower computer module controls the virtual object module to move to the processing position to complete the loading test process.
5. The material handling test method according to claim 4, characterized in that: The sending of the handover command data to the slave module through the upper computer module so that the slave module controls the virtual object module to move to the handover position includes: The upper computer module sends the handover command data to the lower computer module, wherein the handover command data includes handover position coordinate data; The lower computer module runs a firmware control algorithm according to the handover position coordinate data in the handover command data to obtain first force data, and obtains displacement data and first sensor data before the firmware control algorithm runs; The lower computer module sends the first force data, the displacement data and the first sensor data to the virtual object module, and runs the control object model algorithm in the virtual object module through the first force data to move the virtual object module to a handover position.
6. The material handling test method according to claim 5, characterized in that: The feeding back the first environment data to the slave computer module includes: During the process of running the control object model algorithm, the displacement data and the first sensor data are acquired, and the displacement data and the first sensor data are sent to the lower computer module.
7. The material handling test method according to claim 4, characterized in that: The lower computer module sends material movement command data to simulate the movement of the material to be transported and fix it at a preset position, including: The lower computer module sends flag information to the virtual object module to simulate the movement of the material to the preset position, wherein the flag information includes a mobile material flag and a fixed material flag.
8. The material handling test method according to claim 4, characterized in that: The upper computer module sends processing command data to the lower computer module, so that the lower computer module controls the virtual object module to move to a processing position, including: The upper computer module sends the processing command data to the lower computer module, and the lower computer module obtains second force data after running the processing command data. The second force data is sent to the virtual object module to run the control object model algorithm in the virtual object module through the second force data and move the virtual object module to the processing position.
Citation Information
Patent Citations
Automatic simulation system and method
CN107367956A
Numerical control system timing synchronization control system
CN107450479A