Control method, system, and storage medium of motion control system
By adopting a dual-system operation mode in the robot control system, and using a real-time system (such as Linux) to independently process control commands, the problem of slow response of Windows system in emergency handling or high-speed and high-precision conditions is solved, and high-precision and high-efficiency operation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALFRED (SUZHOU) TESTING TECH CO LTD
- Filing Date
- 2023-03-14
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, Windows systems cannot respond in real time during the operation of equipment axes or robotic arms in emergency situations or high-speed, high-precision conditions, resulting in slow braking or excessively rapid sensing, causing loss of system counts and damage.
The system adopts a dual-system operation mode, using a real-time system (such as Linux) to independently process robot control commands. The first system handles interface display and human-machine interaction, while the second system performs real-time control. Data is transferred through shared memory to improve control accuracy.
It has enabled the control of high-precision and high-performance projects, improved the control accuracy and operating efficiency of motion control equipment, and reduced system response delay and losses.
Smart Images

Figure CN116339199B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a control method, system, and storage medium for a motion control system. Background Technology
[0002] Currently, in the process of controlling the movement of equipment axes or robotic arms, Windows systems are usually used because an interface display is required. However, Windows systems cannot react in real time in emergency situations or high-speed, high-precision situations. For example, when dealing with high-precision, high-performance projects, when equipment malfunctions and timely braking or rapid sensor identification is required, using Windows systems may result in delayed braking or overly rapid sensing, leading to loss of system counts and thus losses. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a control method, system, and storage medium for a motion control system, capable of handling high-precision, high-performance projects and improving the control accuracy of motion control equipment.
[0004] In a first aspect, embodiments of this application provide a control method for a motion control system, applied to a first system, the first system having a human-machine interface; the first system is connected to a second system, the second system being a real-time system, the method comprising:
[0005] Based on the control commands input through the human-computer interaction interface, the first data to be executed is obtained;
[0006] The first data to be executed is written into the shared memory of the first system and the second system, so that the second system can perform real-time control of the operation and control equipment based on the first data to be executed.
[0007] According to the above embodiments provided in this application, at least the following beneficial effects are achieved: Compared with related technologies, the motion control system provided in this application adopts a dual-system operation mode, in which the control commands for robot motion control operations are executed by a real-time system. The first system is used to handle interface display and human-computer interaction, thereby realizing that human-computer interaction and robot control can operate independently. Furthermore, since the second real-time system is a real-time system, it can utilize the characteristics of high real-time performance, fast code execution, and short thread cycle time to improve the control accuracy of the motion control equipment. Therefore, the embodiments of this application can cope with high-precision and high-performance projects and also improve operating efficiency.
[0008] According to some embodiments of the first aspect of this application, writing the first data to be executed into the shared memory of the first system and the second system includes:
[0009] The first data to be executed is saved as a first local variable, and the first local variable is updated according to the feedback result of the real-time control.
[0010] The parameter values of the first execution data are copied to variables with the same attributes in the shared memory.
[0011] Secondly, embodiments of this application provide a control method for a motion control system, applied to a second system, the second system being a real-time system connected to a first system, the first system having a human-machine interface, the method comprising:
[0012] The first data to be executed, written by the first system, is obtained from the shared memory of the first system and the second system; the first data to be executed is obtained by the first system based on the control instructions input by the human-computer interaction interface.
[0013] Based on the first data to be executed, the operation and control equipment corresponding to the first data to be executed is controlled in real time.
[0014] According to some embodiments of the second aspect of this application, the step of performing real-time control of the operation control equipment corresponding to the first data to be executed, based on the first data to be executed, includes:
[0015] Obtain the thread type of the first data to be executed;
[0016] When the thread type is motion control, the motion control device is controlled to perform the motion control operation corresponding to the first data to be executed through the preset motion control thread, and the device operation result is obtained;
[0017] When the thread type is non-motion control, the preset non-motion control thread performs read and / or write operations corresponding to the first execution data on the motion control device and obtains the device operation log.
[0018] According to some embodiments of the second aspect of this application, the first system is provided with a code writing module, and before reading the first executable data written by the first system, the method further includes:
[0019] Receive operation control operations written by the user in the code writing module;
[0020] The motion control operation is published to the second system so that after receiving the first data to be executed, the second system controls the motion control device to execute the motion control operation through the motion control thread.
[0021] According to some embodiments of the second aspect of this application, after real-time control of the motion control equipment corresponding to the first data to be executed, the method further includes:
[0022] The motion control thread updates the result flag in the shared memory with the device operation result;
[0023] The non-motion control thread performs control operations on the motion control device based on the result flag.
[0024] Thirdly, embodiments of this application provide a control method for a motion control system, the method comprising:
[0025] The system obtains the first data to be executed by inputting control commands through the human-computer interaction interface of the first system and writes the first data to be executed into the shared memory of the second system, wherein the second system is a real-time system;
[0026] The second system reads the first data to be executed from the shared memory and performs real-time control on the operation and control equipment corresponding to the first data to be executed based on the first data to be executed.
[0027] Fourthly, embodiments of this application also provide a motion control system, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement:
[0028] The data interaction method of the network data plane system as described in the first aspect;
[0029] or,
[0030] The data interaction method of the network data plane system as described in the second aspect.
[0031] Fifthly, embodiments of this application also provide a motion control system, including a first system and a second system;
[0032] The first system includes: a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor. When the first processor executes the program, it implements the control method of the motion control system described in the first aspect.
[0033] The second system includes: a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor. When the second processor executes the program, it implements the control method of the motion control system as described in the second aspect.
[0034] Sixthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being used for:
[0035] The control method for implementing the motion control system described in the first aspect;
[0036] or,
[0037] The control method for implementing the motion control system described in the second aspect;
[0038] or,
[0039] The control method of the motion control system described in the third aspect is implemented.
[0040] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0041] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of the application.
[0042] Figure 1 This is a schematic flowchart of the control method of the motion control system provided in the first aspect embodiment of this application;
[0043] Figure 2 This is a schematic flowchart illustrating the control method of a motion control system provided in one embodiment of this application;
[0044] Figure 3 This is a schematic diagram of the shared memory writing process provided in the first aspect embodiment of this application;
[0045] Figure 4 This is a schematic flowchart of the control method of the motion control system provided in the second aspect embodiment of this application;
[0046] Figure 5 This is a schematic diagram of a process for real-time control of motion control equipment provided in the second aspect embodiment of this application;
[0047] Figure 6 This is a flowchart illustrating the control method of the motion control system provided in the third aspect embodiment of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0050] Currently, Windows systems are typically used for operation and control of equipment axes or robotic arms to achieve human-machine interaction. However, in emergency situations or high-speed, high-precision scenarios, Windows systems cannot react in real time. For example, when dealing with high-precision, high-performance projects, if equipment malfunctions and requires timely braking or rapid sensor identification, using a Windows system may result in delayed braking or excessively rapid sensing, leading to loss of system counts and consequently losses.
[0051] Based on the above, this application provides a control method, system, and storage medium for a motion control system, which can handle high-precision and high-performance projects and improve the control accuracy of motion control equipment.
[0052] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0053] The first aspect of this application specifically provides a control method for a motion control system, such as... Figure 1 As shown, the motion control system is applied to the first system, which is equipped with a human-machine interface. The first system is connected to the second system, which is a real-time system. The control method of the motion control system includes, but is not limited to, the following steps:
[0054] Step S100: Obtain the first data to be executed according to the control instructions input through the human-machine interface;
[0055] Step S200: Write the first data to be executed into the shared memory of the first system and the second system, so that the second system can control the operation and control equipment in real time according to the first data to be executed.
[0056] The motion control system method provided in this application adopts a dual-system operation mode. The control commands for robot motion control operations are executed by a real-time system. The first system is used to handle interface display and human-computer interaction, thereby realizing that human-computer interaction and robot control can operate independently. Since the second real-time system is a real-time system, its high real-time performance, fast code execution, and short thread cycle time can be utilized to improve the control accuracy of the motion control equipment. Therefore, the embodiments of this application can cope with high-precision and high-performance projects and also improve operating efficiency.
[0057] It should be noted that, referring to Figure 2As shown, in the first system, the control commands for robot movement are encapsulated in a motion control interface. Upon receiving a control command, control parameters can be parsed from it. The first system then processes these control parameters according to the attributes of the motion control interface to obtain the first data to be executed. In some embodiments, the data processing involves determining that the motion control interface attribute is a first attribute, then reading historical control parameters from the same motion control device in shared memory, modifying the current control parameters based on these historical parameters, and obtaining the first data to be executed. Alternatively, if the data processing determines that the motion control interface attribute is a second attribute, then directly copying the parameters used for control by the second system from the control parameters into shared memory.
[0058] It should be noted that, taking axis control as an example, the control parameters include the axis position and the return result. When the motion control interface for this control parameter does not require data changes, the axis position is updated as the first data to be executed to the corresponding variable in the shared memory. This allows the second system to call the corresponding motion control interface for control processing based on the axis position. After the motion control device performs the corresponding operation, the device operation result is written to the variable in the shared memory, allowing the first system to update the feedback result based on this variable.
[0059] In some embodiments, the first system and the second system constitute a real-time operation and control system, wherein the first system is a Windows system and the real-time system is a Linux system. For example, using... Figure 2 Taking the process shown as an example, during the operation of the real-time operation control system, the control parameters parsed from the control commands input by the Windows system are used for data processing to obtain the first data to be executed. The first data to be executed is written to the Linux system through shared memory so that the Linux system can perform real-time control on the operation control equipment corresponding to the first data to be executed.
[0060] It should be noted that by encapsulating the operation and control interface and opening it to the first system, engineers can directly use the operation and control interface to open up hardware devices, greatly reducing the development cycle.
[0061] Reference Figure 3 It is understood that step S200 includes, but is not limited to, the following steps:
[0062] Step S110: Save the first data to be executed as the first local variable, and update the first local variable according to the feedback result of real-time control;
[0063] Step S120: Copy the parameter values of the first execution data to variables with the same attributes in shared memory.
[0064] It should be noted that having the same attributes indicates that they operate on the same type of operation. For example, if the first execution data includes the control parameter of axis position, there is also a corresponding shared memory representing the axis position. Furthermore, the shared memory contains variables that correspond one-to-one with the control parameters of the motion control interface corresponding to the first execution data.
[0065] It should be noted that shared memory uses pointer access for data sharing, which inherently carries some security risks. Therefore, saving the first data to be executed to a first local variable can further enhance the security of access by the first system. Correspondingly, for the second system, when using data in shared memory, it copies it to the corresponding second local variable, allowing the second system to execute motion control operations based on the value in the second local variable. Motion control operations include axis movement and axis stopping.
[0066] Secondly, this application embodiment also provides a control method for a motion control system, referring to... Figure 4 This method is applied to a second system, which is a real-time system connected to the first system. The first system has a human-computer interaction interface, and the method includes, but is not limited to, the following steps:
[0067] Step S300: Obtain the first data to be executed written by the first system from the shared memory of the first system and the second system; the first data to be executed is obtained by the first system according to the control instructions input by the human-machine interface.
[0068] Step S400: Based on the first data to be executed, perform real-time control on the operation and control equipment corresponding to the first data to be executed.
[0069] The motion control system method provided in this application adopts a dual-system operation mode. The control commands for robot motion control operations are executed by a real-time system. The first system is used to handle interface display and human-computer interaction, thereby realizing that human-computer interaction and robot control can operate independently. Since the second real-time system is a real-time system, its high real-time performance, fast code execution, and short thread cycle time can be utilized to improve the control accuracy of the motion control equipment. Therefore, the embodiments of this application can cope with high-precision and high-performance projects and also improve operating efficiency.
[0070] Understandably, referring to Figure 2 and Figure 5 Step S400 includes, but is not limited to, the following steps:
[0071] Step S410: Obtain the thread type of the first data to be executed;
[0072] Step S420: When the thread type is motion control, the motion control device is controlled to perform the motion control operation corresponding to the first data to be executed through the preset motion control thread, and the device operation result is obtained.
[0073] Step S430: When the thread type is non-motion control, the read operation and / or write operation corresponding to the first data to be executed is performed on the motion control device through the preset non-motion control thread, and the device operation log is obtained.
[0074] It should be noted that the threads required to execute the first set of data are determined during the initialization of the second system.
[0075] It should be noted that the second real-time system divides the threads into three types: a shared memory thread, a motion control thread, and a non-motion control thread. The shared memory thread is used to read and write data in the shared memory, the motion control thread is used to perform motion control operations on the motion control equipment, and the non-motion control thread is used to perform read and write operations on the motion equipment. For example, a write operation can be used to control the lights on the motion control equipment to make the lights turn on.
[0076] It should be noted that the second real-time system encapsulates an operation control interface. Therefore, when the first data to be executed is acquired by the second real-time system, it can call the corresponding operation control interface to perform the corresponding operation. Those skilled in the art can select the specific implementation logic of the operation control interface according to actual needs.
[0077] In this embodiment, refer to Figure 2 The first system and the second system constitute the real-time operation and control system. The first system is a Windows system and the real-time system is a Linux system. During the operation of the real-time operation and control system, the first data to be executed is generated by the operation on the Windows system. The first data to be executed is written to the Linux system through shared memory so that the Linux system can perform real-time control on the operation and control equipment corresponding to the first data to be executed.
[0078] For example, when an engineer is working on a project, the motion control thread writes device actions using a motion control interface that is exposed from the second system to the first system, and compiles the motion control thread code into the second system. Therefore, the second system can perform motion control operations according to the execution logic of the compiled motion control interface.
[0079] It should be noted that the first system mainly handles real-time operations such as interface display and human-computer interaction, while the second system is mainly responsible for operations with high real-time requirements such as device axis movement and IO read / write.
[0080] Specifically, refer to Figure 2The second system reads the first data to be executed from the shared memory in real time. Based on the first data to be executed, it determines whether the thread type is motion control. If the thread is motion control, it controls the motion control device to execute the motion control operation of the first data to be executed, obtaining the device operation result. The device operation result is then acquired and input into the shared memory to form return data, allowing the first system to read the return data from the shared memory and perform further processing. If the thread is not motion control, for example, refer to... Figure 2 As shown, this thread is an IO thread. The IO thread performs IO read and write operations on the operation and control device to obtain the device operation log. The device operation log is then retrieved and input into shared memory to form return data, so that the first system can read the return data in shared memory and perform further processing on the data.
[0081] Understandably, the first system includes a code writing module, and before reading the first data to be executed written by the first system, the method also includes:
[0082] Receive operation and control commands written by the user in the code writing module;
[0083] The motion control operation is published to the second system so that after the second system receives the first data to be executed, it controls the motion control device to execute the motion control operation through the motion control thread.
[0084] It should be noted that the second system is not displayed on the interface of the first system. Therefore, system-level operations are required for the second system. At this time, the code writing module provided by the first system can be used to automatically compile the code logic into the second system to realize system-level operations on the second system, and at the same time, encapsulate the execution logic of the operation control instructions.
[0085] It is understood that the method following step S400 may include, but is not limited to, the following steps:
[0086] The motion control thread updates the result flag in shared memory with the device operation results;
[0087] The non-motion control thread performs control operations on the motion control equipment based on the result flag.
[0088] It should be noted that by setting the result flag, the interaction between the non-motion control thread and the motion control thread is made simpler.
[0089] It is understandable that the control methods of a motion control system also include, but are not limited to, the following steps:
[0090] Based on the operating status of the first system, determine whether the first system is malfunctioning;
[0091] When the first system is found to be malfunctioning, the second system is subjected to a no-response timeout process to stop the second system from running.
[0092] It should be noted that the axis control thread and I / O thread of the second system operate on the corresponding devices, and both threads have emergency handling mechanisms. Specifically, the code running in the real-time motion control system is configured with a no-response timeout mechanism. This means that if the no-response period exceeds a preset time, the second system should automatically shut down.
[0093] For example, when using the first system, a blue screen or system crash may occur. The second system is a separate system that uses one of the cores of the first system. Therefore, when a blue screen or system crash occurs, the second system will not shut down immediately. Instead, the blue screen or system crash will trigger the second system's unresponsive timeout handling to stop the system, thus avoiding losses for the customer and ensuring the safety of the operators.
[0094] Thirdly, this application embodiment also provides a control method for a motion control system, referring to... Figure 6 The method includes, but is not limited to, the following steps:
[0095] Step S500: Obtain the first data to be executed by inputting control instructions through the human-machine interface of the first system and write the first data to be executed into the shared memory of the second system, wherein the second system is a real-time system;
[0096] In step S600, the second system reads the first data to be executed from the shared memory and performs real-time control on the operation and control equipment corresponding to the first data to be executed.
[0097] The motion control system method provided in this application adopts a dual-system operation mode. The control commands for robot motion control operations are executed by a real-time system. The first system is used to handle interface display and human-computer interaction, thereby realizing that human-computer interaction and robot control can operate independently. Since the second real-time system is a real-time system, its high real-time performance, fast code execution, and short thread cycle time can be utilized to improve the control accuracy of the motion control equipment. Therefore, the embodiments of this application can cope with high-precision and high-performance projects and also improve operating efficiency.
[0098] In some embodiments, the first system and the second system constitute a real-time motion control system, wherein the first system is a Windows system and the real-time system is a Linux system. The motion control method is applied to the real-time motion control system. Assuming that the pre-lit motion control equipment is equipped with a loading area and an OKNG corresponding throwing area, specifically, the real-time motion control system receives sensor data from the sensors of the pre-lit motion control equipment and, based on the sensor data, activates the axis modules of the pre-lit motion control equipment to perform corresponding operations. At the same time, there is scheduling data for each vision device on the motion control equipment. Therefore, the second system can directly control the vision scheduling data and the axis modules. Since the second system has no interface display and does not occupy resources, and since the second system is a real-time system, all the performance of the second system can be devoted to the calculation process of controlling the motion control equipment. Therefore, in this way, the data processing speed is improved, thereby reducing the overall production time and improving the control accuracy.
[0099] In addition, a fourth aspect of this application also provides a motion control system, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0100] The processor and memory can be connected via a bus or other means.
[0101] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0102] In some embodiments, the non-transient software program and instructions required for implementing the control method of the motion control system of the first aspect embodiment described above are stored in the memory. When executed by a processor, the control method of the motion control system in the above embodiment is executed, for example, the method described above is executed. Figure 1 Method steps S100 to S200, Figure 3 Method steps S110 to S120.
[0103] In other embodiments, the non-transient software program and instructions required to implement the control method of the motion control system in the second aspect embodiment described above are stored in the memory. When executed by a processor, the control method of the motion control system in the above embodiment is executed, for example, the method described above. Figure 4Method steps S300 to 400 in the middle Figure 5 Method steps S410 to 430.
[0104] In addition, a fifth aspect embodiment of the present invention also provides a video communication system, including a first system and a second system;
[0105] The first system includes: a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor. When the first processor executes the program, it implements the control method of the motion control system provided in the first aspect embodiment above. Correspondingly, the second system includes: a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor. When the second processor executes the program, it implements the control method of the motion control system provided in the second aspect embodiment above.
[0106] The first processor and the first memory can be connected via a bus or other means.
[0107] The first memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, the first memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the first memory may optionally include memory remotely located relative to the first processor, and these remote memories can be connected to the first processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0108] The non-transient software program and instructions required to implement the control method of the motion control system in the first aspect embodiment described above are stored in a first memory. When executed by a first processor, the control method of the motion control system in the first aspect embodiment described above is executed, for example, the method described above is executed. Figure 6 Method steps S500 to 600.
[0109] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may fall into one place or be distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0110] Furthermore, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions. These instructions are executed by a processor or control module, for example, by a processor in the aforementioned device embodiment, causing the processor to execute the control method of the motion control system in the first aspect embodiment, for example, performing the above-described... Figure 1 Method steps S100 to S200, Figure 3 Method steps S110 to S120; or execute the control method of the motion control system in the second aspect embodiment described above, for example, execute the method described above. Figure 4 Method steps S300 to 400 in the middle Figure 5 Method steps S410 to S430, Figure 6 Method step S421; or execute the control method of the motion control system in the third aspect embodiment described above, for example, execute the method described above. Figure 6 Method steps S500 to 600.
[0111] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0112] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A control method for a motion control system, characterized in that, The method is applied to a first system, which is equipped with a human-computer interaction interface; the first system is connected to a second system, which is a real-time system, and the operating systems of the first system and the second system are different; the method includes: According to the control instructions input through the human-machine interface, first data to be executed is obtained; wherein, the control instructions include control parameters and operation control interface; when the operation control interface attribute is a first attribute, historical control parameters of the same operation control device are read from the shared memory of the first system and the second system, and the current control parameters are modified according to the historical control parameters to obtain the first data to be executed; when the operation control interface attribute is a second attribute, the control parameters are used as the first data to be executed. The first data to be executed is written into the shared memory of the first system and the second system, so that the second system can perform real-time control of the operation and control equipment based on the first data to be executed.
2. The control method for the motion control system according to claim 1, characterized in that, The step of writing the first data to be executed into the shared memory of the first system and the second system includes: The first data to be executed is saved as a first local variable, and the first local variable is updated according to the feedback result of the real-time control. The parameter values of the first data to be executed are copied to variables with the same attributes in the shared memory.
3. A control method for a motion control system, characterized in that, The method is applied to a second system, which is a real-time system connected to the first system. The first system is equipped with a human-computer interaction interface. The method includes: The first data to be executed is obtained from the shared memory of the first system and the second system. The first data to be executed is obtained by the first system based on the control instructions input by the human-machine interface. The control instructions include control parameters and operation control interface. When the operation control interface attribute is a first attribute, the historical control parameters of the same operation control device are read from the shared memory of the first system and the second system, and the current control parameters are modified according to the historical control parameters to obtain the first data to be executed. When the operation control interface attribute is a second attribute, the control parameters are used as the first data to be executed. Based on the first data to be executed, the operation and control equipment corresponding to the first data to be executed is controlled in real time.
4. The control method for the motion control system according to claim 3, characterized in that, The step of performing real-time control of the operation and control equipment corresponding to the first data to be executed, based on the first data to be executed, includes: Obtain the thread type of the first data to be executed; When the thread type is motion control, the motion control device is controlled to perform the motion control operation corresponding to the first data to be executed through the preset motion control thread, and the device operation result is obtained; When the thread type is non-motion control, the preset non-motion control thread performs read and / or write operations on the motion control device corresponding to the first data to be executed and obtains the device operation log.
5. The control method for the motion control system according to claim 4, characterized in that, The first system includes a code writing module. Before reading the first data to be executed written by the first system, the method further includes: Receive operation control operations written by the user in the code writing module; The motion control operation is published to the second system so that after receiving the first data to be executed, the second system controls the motion control device to execute the motion control operation through the motion control thread.
6. The control method for the motion control system according to claim 4, characterized in that, After performing real-time control on the operation and control equipment corresponding to the first data to be executed, the method further includes: The motion control thread updates the result flag in the shared memory with the device operation result; The non-motion control thread performs control operations on the motion control device based on the result flag.
7. A control method for a motion control system, characterized in that, include: The system obtains first data to be executed by inputting control commands through the human-machine interface of the first system and writes the first data to be executed into the shared memory of the second system, wherein the second system is a real-time system; the operating systems of the first system and the second system are different; wherein the control commands include control parameters and operation control interface; when the operation control interface attribute is a first attribute, the historical control parameters of the same operation control device are read from the shared memory of the first system and the second system, and the current control parameters are modified according to the historical control parameters to obtain the first data to be executed; when the operation control interface attribute is a second attribute, the control parameters are used as the first data to be executed. The second system reads the first data to be executed from the shared memory and performs real-time control on the operation and control equipment corresponding to the first data to be executed based on the first data to be executed.
8. A motion control system, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements: The control method of the motion control system as described in any one of claims 1 to 2; or, The control method of the motion control system as described in any one of claims 3 to 6.
9. A motion control system, characterized in that, Including the first system and the second system; The first system includes: a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor. When the first processor executes the program, it implements the control method of the motion control system as described in any one of claims 1 to 2. The second system includes: a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, wherein the second processor executes the program to implement the control method of the motion control system as described in any one of claims 3 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which are used for: A control method for implementing the motion control system according to any one of claims 1 to 2; or, The control method for implementing the motion control system according to any one of claims 3 to 6; or, The control method of the motion control system described in claim 7.
Citation Information
Patent Citations
Open type numerical control system based on PC
CN101196738A
PAC (programmable automatic controller) real-time control system based on dual-core processor
CN103744342A
Numerical control system control method and device, numerical control system and computer storage medium
CN112346405A