Multi-axis concurrent motion control method and device based on position deviation and closed-loop mark, equipment and storage medium
Patent Information
- Application Number
- CN202611084666.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本申请的主要目的在于提供一种基于位置偏差与闭环标志的多轴并发运动控制方法、装置、设备及存储介质,旨在解决在多轴并发运动控制中,无法准确感知各轴的实际运动状态,导致控制可靠性不足的技术问题
本申请由于采用了将绝对位置偏差与控制闭环标志进行联合判定的技术手段,在多轴并发运动控制中不仅基于当前位置与终止坐标确定绝对位置偏差,还同步获取控制闭环标志,以两者共同作为运动状态判定依据,形成双维度状态感知机制,从而解决了现有技术仅依据位置偏差进行到位判定、无法准确感知各轴实际运动状态导致控制可靠性不足的技术问题,与现有技术相比,实现了准确识别多轴并发运动中各类运动状态、避免到位误判和异常漏判、提高多轴并发控制时序准确性和安全性的技术效果。
Smart Images

Figure CN122923979A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multi-axis motion control technology, and in particular to multi-axis concurrent motion control methods, devices, equipment and storage media based on position deviation and closed-loop flags. Background Technology
[0002] In multi-axis motion control systems, such as those involving precision positioning and alignment with multiple degrees of freedom, it is typically necessary to concurrently issue target position commands to multiple motion axes and perform position determination and coordinated control based on the motion feedback from each axis. Currently, the most known multi-axis concurrent position determination technology mainly adopts a static difference dead zone determination mechanism. After the higher-level system issues a joint absolute coordinate control command, the processor system polls and collects the current physical encoder feedback position of each effective motion axis, calculates the absolute value of the position deviation between the current position and the target position, and directly determines that the axis has reached a convergence state when the deviation is less than a preset tolerance dead zone.
[0003] However, the aforementioned static difference dead zone determination mechanism has a significant state awareness blind spot in actual multi-axis concurrent motion. For example, the joint absolute coordinates issued by the host computer often include a specific axis with a target displacement increment of zero, meaning this axis is required to remain in its original position. However, at this time, the underlying driver of this specific axis, due to mechanical lag or historical fine-tuning tailing, is actually still in the effective convergence tail period of the previous action, and the closed-loop control flag remains active. Since the initial physical difference of this axis is naturally within the dead zone, traditional algorithms will directly trigger misjudged convergence at the moment of startup, causing incorrect logical jumps in the multi-axis control state machine and leading to timing errors. In addition, in long-distance motion, if an execution axis is forcibly shut down by the underlying driver due to touching a safety boundary such as a soft limit or hard limit, but its physical difference has not entered the target dead zone, the traditional polling dead zone mechanism, because it cannot detect the sudden change of the underlying closed-loop flag, will directly cause the higher-level control state machine to fall into a deadlock state of infinite waiting.
[0004] In summary, the current solution cannot accurately perceive the actual motion state of each axis in multi-axis concurrent motion control, resulting in insufficient control reliability. Summary of the Invention
[0005] The main objective of this application is to provide a multi-axis concurrent motion control method, device, equipment, and storage medium based on position deviation and closed-loop flag, aiming to solve the technical problem of insufficient control reliability caused by the inability to accurately perceive the actual motion state of each axis in multi-axis concurrent motion control.
[0006] To achieve the above objectives, this application proposes a multi-axis concurrent motion control method based on position deviation and closed-loop flags. The multi-axis concurrent motion control method based on position deviation and closed-loop flags includes: Obtain multi-axis concurrent control commands, and determine the termination coordinates corresponding to each axis based on the multi-axis concurrent control commands; The multi-axis motion is driven concurrently based on the termination coordinates, and the current coordinates and control closed-loop flags of each axis are obtained in real time. Based on the current coordinates and the termination coordinates of each axis, the absolute position deviation of each axis is determined; Based on the absolute position deviation of each axis and the control closed-loop flag, the motion state of each axis is determined, and the state determination result of each axis is obtained. Motion control is performed on each axis based on the state determination result.
[0007] In one embodiment, the step of determining the motion state of each axis based on the absolute position deviation of each axis and the control closed-loop flag, and obtaining the state determination result of each axis, includes: When the absolute position deviation of any axis is a preset value and the control closed loop flag is in an active state, the motion state of the axis is determined to be an in-transit non-converged state. When the absolute position deviation of any axis is not a preset value, the motion state determination result of the axis is determined based on the absolute position deviation and the control closed loop flag.
[0008] In one embodiment, when the absolute position deviation of any axis is not a preset value, determining the motion state judgment result of the axis based on the absolute position deviation and the control closed-loop flag includes: When the absolute position deviation of any axis is not a preset value, obtain the preset allowable range of position deviation; When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the completed position state. When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is active, the motion state of the shaft is determined to be the end fine-tuning non-converged state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed-loop flag is in an active state, the motion state of the shaft is determined to be a normal motion state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the limit abnormal action termination state.
[0009] In one embodiment, performing motion control on each axis based on the state determination result includes: When the status determination result of any axis is the limit abnormal action termination state, the multi-axis motion is interrupted and the abnormal status is reported. If the state determination result of any axis is any of the following: in-way non-convergence state, end-point fine-tuning non-convergence state, and normal motion state, maintain the current motion control of each axis. Multi-axis concurrent control ends when all axis status determination results are in the "completed" state.
[0010] In one embodiment, the step of concurrently driving multi-axis motion based on the termination coordinates and acquiring the current coordinates and control closed-loop flags of each axis in real time includes: Acquire the spatial motion characteristics of each axis, and configure motion velocity thresholds and acceleration slope curves based on the spatial motion characteristics; Based on the termination coordinates of each axis, the motion velocity threshold, and the acceleration slope curve, multi-axis motion is driven concurrently. During multi-axis motion, the current coordinates of each axis and the control closed-loop flag are acquired in real time.
[0011] In one embodiment, before the step of concurrently driving multi-axis motion according to the termination coordinates and obtaining the current coordinates and control closed-loop flags of each axis in real time, the method further includes: Obtain historical state information of multi-axis motion; Based on the historical state information, reset the historical control state of the historical multi-axis motion and clear the residual control quantities generated by the historical multi-axis motion.
[0012] In one embodiment, determining the absolute position deviation of each axis based on the current coordinate and the termination coordinate includes: The termination coordinates are then subjected to sign-raising processing to obtain raised termination coordinates; Calculate the difference between the current coordinate and the lifting termination coordinate of each axis to obtain the absolute position deviation of each axis.
[0013] Furthermore, to achieve the above objectives, this application also proposes a multi-axis concurrent motion control device based on position deviation and closed-loop flag, wherein the multi-axis concurrent motion control device based on position deviation and closed-loop flag includes: The instruction processing module is used to acquire multi-axis concurrent control instructions and determine the termination coordinates of each axis based on the multi-axis concurrent control instructions. The drive acquisition module is used to concurrently drive multi-axis motion according to the termination coordinates, and to acquire the current coordinates and control closed-loop flags of each axis in real time. The deviation calculation module is used to determine the absolute position deviation of each axis based on the current coordinate and the termination coordinate of each axis; The state determination module is used to determine the motion state of each axis based on the absolute position deviation of each axis and the control closed loop flag, and obtain the state determination result of each axis. The motion execution module is used to perform motion control on each axis based on the state determination result.
[0014] Furthermore, to achieve the above objectives, this application also proposes a multi-axis concurrent motion control device based on position deviation and closed-loop flags. The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flags as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flag as described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flag as described above.
[0017] One or more technical solutions proposed in this application have at least the following technical effects: This application employs a technique that jointly determines absolute position deviation and control closed-loop flags. In multi-axis concurrent motion control, it not only determines the absolute position deviation based on the current position and the final coordinate, but also simultaneously acquires the control closed-loop flags. Both are used as the basis for motion state determination, forming a two-dimensional state perception mechanism. This solves the technical problem of insufficient control reliability caused by existing technologies that rely solely on position deviation for positioning determination and cannot accurately perceive the actual motion state of each axis. Compared with existing technologies, this application achieves the technical effects of accurately identifying various motion states in multi-axis concurrent motion, avoiding misjudgments of positioning and omissions of abnormalities, and improving the timing accuracy and safety of multi-axis concurrent control. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1This is a flowchart illustrating an embodiment of the multi-axis concurrent motion control method based on position deviation and closed-loop flags provided in this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the multi-axis concurrent motion control method based on position deviation and closed-loop flags provided in this application; Figure 3 This is a simplified flowchart illustrating an embodiment of the multi-axis concurrent motion control method based on position deviation and closed-loop flags provided in this application. Figure 4 This is a schematic diagram of the module structure of a multi-axis concurrent motion control device based on position deviation and closed-loop markers according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the multi-axis concurrent motion control method based on position deviation and closed-loop flag in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of this application embodiment is as follows: acquiring multi-axis concurrent control commands, determining the termination coordinates of each axis based on the multi-axis concurrent control commands; concurrently driving multi-axis motion according to the termination coordinates, and acquiring the current coordinates and control closed-loop flags of each axis in real time; determining the absolute position deviation of each axis based on the current coordinates and the termination coordinates of each axis; determining the motion state of each axis based on the absolute position deviations and the control closed-loop flags of each axis, and obtaining the state determination results of each axis; and performing motion control on each axis based on the state determination results.
[0025] Because existing technologies in multi-axis concurrent motion control rely solely on position deviation for positioning determination, they cannot accurately perceive the actual motion state of each axis, resulting in insufficient control reliability.
[0026] This application provides a solution that introduces a control closed-loop flag as a second-dimensional state-aware parameter, enabling the system to effectively distinguish between states where the position deviation is zero or minimal but the closed-loop control is still executing, and states where the position deviation has not been eliminated but the closed-loop control has been unexpectedly shut down—states that existing technologies cannot identify. Therefore, when the position deviation is zero or minimal but the closed-loop control flag is still active, the system will not misjudge the position; when the position deviation has not been eliminated but the closed-loop control flag has changed to a released state, the system will not miss any abnormal judgments. Ultimately, this achieves the technical effects of accurately identifying various motion states in multi-axis concurrent motion, avoiding position misjudgments and missed abnormal judgments, and improving the timing accuracy and safety of multi-axis concurrent control.
[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or processor capable of performing the above functions. The following description uses a processor as an example to illustrate this embodiment and the subsequent embodiments. All actions involving the acquisition of signals, information, or data in this application are performed in accordance with the relevant data protection regulations of the locality and with authorization from the owner of the corresponding device.
[0028] Based on this, embodiments of this application provide a multi-axis concurrent motion control method based on position deviation and closed-loop flags, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the multi-axis concurrent motion control method based on position deviation and closed-loop flags in this application.
[0029] In this embodiment, the multi-axis concurrent motion control method based on position deviation and closed-loop flag includes steps S10~S50: Step S10: Obtain multi-axis concurrent control commands, and determine the termination coordinates corresponding to each axis based on the multi-axis concurrent control commands.
[0030] It should be noted that multi-axis concurrent control commands refer to command data issued by the host computer or control terminal that contains joint control information for multiple motion axes. The termination coordinate refers to the absolute target position of each axis in this concurrent motion. After receiving the multi-axis concurrent control command, the absolute target coordinates corresponding to each axis are extracted from the command and determined as the termination coordinates of each axis in this motion.
[0031] Specifically, the system receives multi-axis concurrent absolute position control commands from the client via an embedded TCP (Transmission Control Protocol) network protocol stack. In applications such as automatic alignment, streaming dynamic focusing, and safety control in ophthalmic precision measurement equipment, the host computer sends multi-axis joint absolute coordinate control commands to the embedded system at high frequency, based on the micro-motion and anatomical alignment requirements of the human body. This command encapsulates the absolute destination coordinate data of all valid axes participating in the concurrent movement. The absolute destination coordinates of each axis are carried in the command as multi-byte spatial position data, indicating the final physical spatial position that this axis needs to reach after the concurrent movement is completed. The received multi-axis concurrent absolute position control commands are parsed, and the absolute destination coordinates of each axis are extracted sequentially according to the preset command frame format and axis numbering order. After extraction, the control engine maps the absolute destination coordinates of each axis to the corresponding termination coordinates, completing the process of determining the target position of each axis from the command data.
[0032] It is understandable that, in multi-axis concurrent motion, each axis needs to acquire its own target position within the same command cycle for subsequent synchronous drive and state determination. Therefore, by executing step S10, the termination coordinates of each axis are uniformly extracted and determined from the multi-axis concurrent control command, which can provide a consistent target position reference for the synchronous start of multi-axis concurrent drive, thereby improving the coordination of multi-axis concurrent control.
[0033] Step S20: Drive multi-axis motion concurrently according to the termination coordinates, and obtain the current coordinates and control closed-loop flags of each axis in real time.
[0034] It should be noted that multi-axis motion refers to the process in which multiple motion axes are synchronously activated within the same control cycle and collaboratively perform spatial displacement according to their respective target positions. Current coordinates refer to the real-time feedback data representing the actual physical position of each axis, obtained by reading back the physical encoders of each axis during multi-axis motion. Control closed-loop flags are flag signals used by the underlying drive module to indicate whether the closed-loop control of each axis is active.
[0035] In one feasible implementation, before step S20, the method may further include: acquiring historical state information of historical multi-axis motions; resetting the historical control state of the historical multi-axis motions based on the historical state information, and clearing the residual control quantities generated by the historical multi-axis motions.
[0036] It should be noted that historical multi-axis motion refers to the previous multi-axis motion executed before the current concurrent drive. Historical state information refers to the control state data retained when the previous multi-axis motion ended or was interrupted. Historical control state refers to the control stage and logical state of the previous multi-axis motion in the state machine. Residual control quantity refers to the accumulated integral term and derivative term surplus in each axis position loop that have not yet been released during the execution of the previous multi-axis motion.
[0037] Specifically, before executing this concurrent drive, the system first checks if there is historical state information from previous multi-axis actions. If so, it retrieves this historical state information, including the execution status of the previous action queue and the control phase of each axis's position loop. Then, a preemptive suspension operation is performed to forcibly terminate any instructions in the previous action queue that have not yet been completed, and the state machine is reset to its initial state. Simultaneously, the position loop destruction procedure is called to sequentially destroy the position loops of each axis, clearing all accumulated integral and differential terms in the position loops to zero, thereby eliminating any residual effects of previous actions on this drive.
[0038] Understandably, in multi-axis concurrent motion control, if the integral and differential energy of the previous action is not cleared in time, it will be superimposed on the new control output at the moment of start-up of the current drive, causing overshoot, oscillation or transient shock of each axis during the start-up phase. Especially in ophthalmic precision measurement equipment with extremely high requirements for stability, such transient disturbances will seriously affect measurement accuracy and equipment safety. Therefore, by performing historical state reset and residual control quantity clearing operations before step S20, the interference of the previous action on the current drive can be eliminated, thereby improving the start-up stability and control accuracy of multi-axis concurrent drive.
[0039] In one feasible implementation, step S20 may include: acquiring the spatial motion characteristics of each axis, and configuring a motion velocity threshold and an acceleration slope curve based on the spatial motion characteristics; concurrently driving multi-axis motion based on the termination coordinates of each axis, the motion velocity thresholds, and the acceleration slope curves; and acquiring the current coordinates and control closed-loop flags of each axis in real time during the multi-axis motion.
[0040] It should be noted that spatial motion characteristics refer to the inherent motion attributes of each axis in terms of mechanical structure, stroke, and load characteristics. Different axes exhibit different spatial motion characteristics due to variations in their installation position within the equipment, the physical loads they drive, and their range of motion. The motion speed threshold refers to the maximum allowable motion speed of each axis during concurrent motion, used to prevent overshoot or collision risks caused by excessive speed. The acceleration slope curve refers to the acceleration change curve of each axis during its acceleration from rest to the target speed, used to control the smoothness of axis motion and avoid mechanical vibrations caused by sudden speed changes.
[0041] Specifically, before driving multi-axis motion, the spatial motion characteristics of each axis are first acquired. In ophthalmic precision measurement equipment, different motion axes have different spatial motion characteristics due to their different functions. For example, the focusing axis, which is responsible for the forward and backward movement of optical components, and the translation axis, which is responsible for horizontal plane scanning, have significant differences in their travel range, load inertia, and motion accuracy requirements.
[0042] Based on the spatial motion characteristics of each axis, a suitable motion speed threshold and acceleration slope curve are configured for each axis, enabling each axis to operate smoothly within the limits allowed by its own mechanical characteristics while ensuring motion efficiency. After configuration, the termination coordinates of each axis are converted into valid control words recognizable by the underlying hardware. Combined with the motion speed threshold and acceleration slope curve of each axis, these are synchronously sent to the underlying drive module, concurrently activating multi-axis synchronous startup. During multi-axis motion, the current coordinates of each axis's physical encoder are read back in real time through the underlying position feedback bus. Simultaneously, the control closed-loop flag of each axis is obtained through the underlying drive status interface to obtain the real-time position and closed-loop control status of each axis during motion.
[0043] It is understandable that, due to the inherent differences in mechanical structure, load characteristics, and range of motion of different motion axes, if all axes are driven concurrently using uniform drive parameters, some axes will experience overshoot, vibration, or asynchronous motion due to speed or acceleration mismatch. This is especially true in ophthalmic precision measurement equipment, where optical components have extremely high requirements for motion smoothness and synchronization during automatic alignment and flowing dynamic focusing. Therefore, by configuring differentiated drive parameters based on the spatial motion characteristics of each axis, each axis can operate in the optimal motion state within the range allowed by its own mechanical characteristics, thereby improving the smoothness and synchronization of multi-axis concurrent motion.
[0044] Step S30: Determine the absolute position deviation of each axis based on the current coordinate and the termination coordinate of each axis.
[0045] It should be noted that the absolute position deviation refers to the absolute value of the difference between the current actual physical position of each axis and the target position of the current concurrent motion. It is used to characterize how far the axis is from the target position and is the core basis for judging whether the axis has moved into place, whether it is still in the process of normal motion, and whether an abnormal stop has occurred.
[0046] In one feasible implementation, step S30 may include: performing sign-shifting processing on the termination coordinates to obtain raised termination coordinates; calculating the difference between the current coordinates of each axis and the raised termination coordinates to obtain the absolute position deviation of each axis.
[0047] It should be noted that sign lifting refers to the process of expanding the sign bit of binary data representing position coordinates from the current bit width to a higher bit width while maintaining the positive or negative attribute of the value and ensuring that the higher bits are correctly filled with the sign bit state. The lifted termination coordinate is the termination coordinate obtained after sign lifting, which retains the original numerical attributes and ensures that the higher bit sign bit has been correctly expanded.
[0048] Specifically, after obtaining the termination coordinates of each axis, instead of directly using the original extracted coordinate data for deviation calculation, the termination coordinates of each axis are first subjected to sign bit lifting. In embedded systems, position coordinates are typically stored and transmitted in multi-byte format. For coordinates with negative values, the highest bit is the sign bit. When these data pass through processing stages of different bit widths during bus transmission, high-bit truncation may occur, resulting in the loss of the negative sign bit and the value jumping to an incorrect positive number. To address this, a strong type sign bit lifting of int32_t (32-bit signed integer type) is enforced on the termination coordinates of each axis. This means that the termination coordinates of each axis are uniformly converted to 32-bit signed integers, and the high-bit extension of the sign bit is automatically completed during the conversion: for negative coordinates, all high bits are filled with 1s to ensure that their negative attribute remains unchanged; for positive coordinates, all high bits are filled with 0s to maintain their positive attribute. This process ensures precise spatial alignment of the high-bit sign of negative values during long-distance concurrent travel, preventing the position control word from being truncated during bus transmission or data processing from the source. After obtaining the lifting termination coordinates, the current coordinates of each axis are read back through the underlying position feedback bus. The difference between the current coordinates and the corresponding lifting termination coordinates is calculated for each axis, and the absolute value of the difference is taken to finally obtain the absolute position deviation of each axis.
[0049] Understandably, during multi-axis long-distance concurrent motion control, the termination coordinates of each axis may contain negative values. If the sign bit of the termination coordinates is not lifted before calculating the absolute position deviation, the high-order sign bit of the negative coordinates may be lost during transmission or temporary storage, resulting in severe distortion of the coordinate values. Consequently, the calculated absolute position deviation will be completely incorrect, and subsequent motion state determination based on this deviation will be meaningless, potentially leading to misjudgments or even collisions. Therefore, by lifting the sign bit of the termination coordinates before calculating the deviation, it is possible to ensure that the values of the termination coordinates of each axis are accurately aligned in the spatial domain, providing an accurate coordinate basis for the calculation of the absolute position deviation, thereby improving the accuracy of state determination and the safety of the entire multi-axis concurrent motion control.
[0050] Step S40: Based on the absolute position deviation of each axis and the control closed loop flag, determine the motion state of each axis to obtain the state determination result of each axis.
[0051] It should be noted that the state determination result refers to the judgment conclusion made on the motion state of each axis participating in this concurrent motion at the current moment.
[0052] Specifically, after obtaining the absolute position deviation and control closed-loop flag of each axis, these two parameters are used as joint inputs for motion state determination. First, the absolute position deviation of each axis is compared with a preset allowable position deviation range to determine whether the absolute position deviation falls within this range. Simultaneously, the control closed-loop flag of each axis is read to determine whether the flag is currently active or deactivated. Based on the position result of the absolute position deviation relative to the allowable range, combined with the active or deactivated state of the control closed-loop flag, the corresponding motion state type is determined for each axis according to a preset state mapping rule. This state mapping rule takes the combination of absolute position deviation and control closed-loop flag as input and outputs the corresponding state determination result, thereby achieving accurate classification of the actual motion state of each axis in multi-axis concurrent motion.
[0053] Understandably, existing technologies rely solely on a single position deviation for positioning determination, failing to distinguish between fundamentally different motion states, such as position deviation within the allowable range while closed-loop control continues, and position deviation outside the allowable range while closed-loop control has been unexpectedly shut down. This can easily lead to misjudgments or missed judgments. This new step, however, combines absolute position deviation with control closed-loop indicators for joint determination. By comprehensively perceiving the true motion of each axis from two dimensions—position deviation and closed-loop control status—it effectively identifies state differences that traditional methods cannot detect. This provides an accurate and reliable state basis for subsequent motion control decisions, thereby improving the accuracy and safety of multi-axis concurrent control.
[0054] Step S50: Perform motion control on each axis according to the state determination result.
[0055] It should be noted that motion control refers to the execution of corresponding control operations on the entire multi-axis concurrent motion system based on the motion state determination results of each axis, including but not limited to continuing to maintain motion, ending motion, or emergency interruption of motion.
[0056] In one feasible implementation, step S50 may include: interrupting multi-axis motion and reporting the abnormal state when the state determination result of any axis is the limit abnormal action termination state; maintaining the current motion control of each axis when the state determination result of any axis is any of the following: in-transit non-convergence state, end-point fine-tuning non-convergence state, and normal motion state; and ending multi-axis concurrent control when the state determination results of all axes are the arrival completion state.
[0057] It should be noted that the "Limit Abnormal Action Termination" state indicates an abnormal state in which the axis is forcibly shut down by the underlying drive due to touching safety boundaries such as soft or hard limits during movement. The "In-Transit Non-Convergence" state indicates that although the axis has no new positional movement requirement, the closed-loop convergence of the previous action has not yet been fully completed. The "End-of-Line Fine-Tuning Non-Convergence" state indicates that the axis is approaching the target position and is in the end-of-line deceleration fine-tuning phase, not yet fully converged. The "Normal Movement" state indicates that the axis is in the process of normal running motion. The "Completed Position" state indicates that the axis has accurately reached the target position and stopped moving.
[0058] Specifically, after obtaining the status determination results of each axis, the status determination results of each axis are first submitted to the status data warehouse. The high-level state machine then extracts the determination results of each axis from the data warehouse for overall aggregation and adjudication. When the adjudication finds that any axis is marked as having a limit abnormal action termination state, it indicates that an abnormal shutdown event triggered by the safety boundary has occurred in this concurrent motion. At this time, a medical communication packet is assembled through the network protocol stack, carrying the limit abnormal status code, and the abnormal information is asynchronously reported to the control terminal. The subsequent motion sequence of all axes is instantly locked, and no axis is allowed to continue moving. When the adjudication finds that the status determination results of all axes are in the "completed" state, it indicates that all participating axes in this concurrent motion have successfully reached their respective target positions and stopped moving. At this time, a full-line success status code is assembled through the network protocol stack and asynchronously reported to the control terminal. The underlying effective power registers of each axis are simultaneously rewritten. Subsequently, the multi-axis concurrent absolute control state machine is fully released and shut down, causing each axis to enter a low-current standby management state. The processor system then re-enters the background main loop polling center. When the ruling finds that some axes are marked as in-transit non-convergence state, end-point fine-tuning non-convergence state, or normal motion state, and no axis is marked as limit abnormal action termination state, it indicates that some axes in this concurrent motion have not completed their motion or have not yet fully converged. At this time, the current motion control state of each axis is maintained, and the subsequent motion control process continues to be executed.
[0059] Understandably, in multi-axis concurrent motion, different axes may be in completely different motion stages and control states. If a uniform control operation is applied to all axes, it will be impossible to simultaneously meet the comprehensive requirements of safety protection, motion efficiency, and control accuracy. Therefore, this step adopts differentiated motion control strategies based on the different state judgment results of each axis. When an abnormal limit is detected, all axes are immediately locked and the abnormal state is reported, which can respond to safety boundary trigger events in the first instance and prevent the equipment from continuing to move and causing mechanical damage or personal injury. When the motion of each axis has not been fully completed, the current motion control is maintained, which can ensure that each axis continues to complete its remaining motion stroke independently and avoid the impact of the motion process of other axes due to the premature termination of control of individual axes. When all axes have completed their positions, the multi-axis concurrent control is terminated and the system enters standby mode, which can release system resources in a timely manner, reduce power consumption and device losses, and comprehensively improve the accuracy, safety, and operating efficiency of multi-axis concurrent control.
[0060] This embodiment provides a multi-axis concurrent motion control method based on position deviation and closed-loop flag. By acquiring multi-axis concurrent control commands, the termination coordinates of each axis are determined. During the concurrent driving of multi-axis motion based on the termination coordinates, the current coordinates and control closed-loop flags of each axis are simultaneously acquired in real time. The absolute position deviation is determined based on the current and termination coordinates, and the absolute position deviation and control closed-loop flags are used together as a joint basis for motion state determination, forming a two-dimensional state perception mechanism. Differentiated motion control is executed on each axis based on the state determination results obtained from the joint determination. This embodiment, by jointly determining information from two dimensions—position deviation and closed-loop control state—can effectively distinguish between situations that traditional single position deviation determination methods cannot identify, such as when the position deviation is within the allowable range but the closed-loop control is still executing, and when the position deviation has not entered the allowable range but the closed-loop control has been unexpectedly shut down. This accurately identifies various motion states in multi-axis concurrent motion, avoids misjudgments of arrival and omissions of anomalies, and improves the timing accuracy and safety of multi-axis concurrent control.
[0061] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S40 includes steps S41 to S42: Step S41: When the absolute position deviation of any axis is a preset value and the control closed loop flag is in an active state, the motion state of the axis is determined to be in an in-transit non-converged state.
[0062] It should be noted that the preset value refers to a pre-set reference value used to determine whether the absolute position deviation of a certain axis is zero. It is usually set to zero to indicate that the axis is not required to produce a new position movement this time, that is, the host computer requires the axis to remain in its original position.
[0063] Specifically, during motion state determination, the pre-interception logic is first executed: The absolute position deviation of each axis is checked against a preset value. If the absolute position deviation of an axis equals the preset value, it indicates that the target position issued by the host computer is consistent with the current position of that axis, and no new displacement is required. At this point, the control closed-loop flag for that axis is checked. If the flag is active, it indicates that although the axis does not need to move this time, its underlying drive is still in the closing-loop convergence tail of the previous action, and the closed-loop control has not yet ended. In this case, subsequent position deviation interval comparisons are not performed; the axis's state is directly determined as an in-transit, non-converged state, thus preventing potential misjudgments of arrival due to the initial position deviation being within the allowable range.
[0064] Understandably, in ophthalmic multi-axis precision measurement equipment, the host computer frequently issues multi-axis joint absolute coordinate commands, often including specific axes with zero target displacement increments. If a traditional position deviation dead zone determination method is used, the initial physical difference of this axis is naturally within the dead zone, triggering the position completion determination immediately upon startup, leading to erroneous logical transitions in the state machine. This step, by setting a pre-interception condition, directly marks the axis as unconverged when the position deviation is zero but the closed-loop flag is still active, blocking the generation of false position signals at the determination entry point, thereby avoiding position misjudgment and ensuring the timing accuracy of multi-axis concurrent control.
[0065] Step S42: When the absolute position deviation of any axis is not a preset value, determine the motion state judgment result of the axis based on the absolute position deviation and the control closed loop flag.
[0066] In one feasible implementation, step S42 may include: when the absolute position deviation of any axis is not a preset value, obtaining a preset position deviation allowable range; when the absolute position deviation is within the position deviation allowable range and the control closed-loop flag is in a released state, determining the motion state of the axis as a completed position state; when the absolute position deviation is within the position deviation allowable range and the control closed-loop flag is in an active state, determining the motion state of the axis as an unconverged end-point fine-tuning state; when the absolute position deviation is not within the position deviation allowable range and the control closed-loop flag is in an active state, determining the motion state of the axis as a normal motion state; when the absolute position deviation is not within the position deviation allowable range and the control closed-loop flag is in a released state, determining the motion state of the axis as a limit switch abnormal action termination state.
[0067] It should be noted that the position deviation allowable range refers to the preset deviation threshold range used to define whether the movement is in place. When the absolute position deviation of a certain axis falls within this range, it indicates that the deviation between the current actual position of the axis and the target position is within an acceptable error range.
[0068] Specifically, for axes whose absolute position deviation is not equal to the preset value, it indicates that the axis has a clear positional movement requirement and enters the normal state determination process. First, the preset position deviation allowable range is obtained, the absolute position deviation of the axis is compared with the position deviation allowable range, and the control closed-loop flag of the axis is read. The state determination result is determined based on the combination of the two conditions.
[0069] When the absolute position deviation is within the allowable range and the control closed loop flag is in the released state, it indicates that the position deviation of the axis has converged to the allowable range and the closed loop control has ended normally, and the axis is judged to be in the completed position state.
[0070] When the absolute position deviation is within the allowable range of position deviation, but the control closed loop flag is still active, it indicates that although the axis has moved to the vicinity of the target position and the deviation has entered the allowable range, the underlying closed loop control is still performing end fine-tuning and has not yet been fully released. The axis is judged to be in the state of end fine-tuning non-convergence.
[0071] When the absolute position deviation is not within the allowable position deviation range and the control closed loop flag is active, it indicates that there is still a large deviation between the axis and the target position, and the closed loop control is being executed normally. The axis is then judged to be in normal motion state.
[0072] When the absolute position deviation is outside the allowable range, but the control closed-loop flag has been released, it indicates that the closed-loop control of the axis has been unexpectedly shut off before reaching the target position. This is usually because the axis touched a safety boundary such as a soft or hard limit during a long-distance run, and the underlying drive forcibly shut off the closed-loop control of the axis, causing the flag to be abnormally cleared to zero before the deviation converges. In this case, the axis is judged to be in a limit abnormal action termination state.
[0073] The status determination results of each axis are submitted to the status data warehouse after the determination is completed, for use in subsequent motion control decisions.
[0074] Understandably, in multi-axis concurrent motion, there are various complex situations, such as a required movement but the closed loop being unexpectedly shut down, or a required movement being made and currently converging normally. Judging solely based on a single position deviation would fail to distinguish these fundamentally different motion states. This step, by combining the positional relationship between the absolute position deviation and the allowable position deviation range with the activation and release states of the control closed loop flag, forms four detailed motion state classifications. In particular, it can accurately capture the termination state of abnormal limit actions when the absolute position deviation has not yet entered the allowable range but the control closed loop flag has been released. This avoids the infinite waiting deadlock problem caused by the traditional polling dead zone mechanism's inability to detect sudden changes in the underlying closed loop flag, providing a precise and reliable state foundation for subsequent motion control.
[0075] This embodiment provides a multi-axis concurrent motion control method based on position deviation and closed-loop flag. By setting up pre-interception logic, when the absolute position deviation is at a preset value and the control closed-loop flag is active, it is directly determined to be in a non-converged state, preventing the generation of false arrival signals. When the absolute position deviation is not at the preset value, the motion state is finely divided into four types based on the position deviation allowable range and the control closed-loop flag: arrival completion, end-effector fine-tuning non-convergence, normal motion, and limit switch abnormal termination. This embodiment can effectively avoid misjudgment of arrival caused by the zero displacement increment axis still being in the closing-loop convergence tail period. At the same time, it can accurately capture limit switch abnormal termination events when the absolute position deviation has not yet entered the allowable range but the closed-loop flag has been abnormally released, thereby achieving accurate identification of various motion states in multi-axis concurrent motion and providing a reliable basis for motion control decisions.
[0076] For example, to help understand the implementation flow of the multi-axis concurrent motion control method based on position deviation and closed-loop flag obtained by combining this embodiment with the above embodiment one, please refer to Figure 3 , Figure 3 A simplified flowchart of a multi-axis concurrent motion control method based on position deviation and closed-loop flag is provided, specifically: The control engine receives multi-axis concurrent absolute position control commands from the client via an embedded TCP network protocol stack. It extracts the absolute destination coordinates for each axis and performs a forced sign bit boosting (int32_t) on the multi-byte spatial position data within the register. This ensures precise spatial alignment of the high-order sign bit of negative numbers during long-distance concurrent travel, preventing the position control word from being truncated during bus transmission.
[0077] Before the multi-axis drive is activated, the state machine performs a preemptive suspension, forcibly terminates and resets the historical action queue state machine, and calls the position loop destruction program to eliminate the residual integral and differential energy of the past, so as to prevent the historical state from causing overshoot interference to the current concurrent position closed loop.
[0078] For each actuator axis's spatial motion characteristics, a maximum motion speed limit ceiling and acceleration slope curve are configured. Then, the position deviation is converted into an effective control word for the underlying hardware and sent down to concurrently drive and activate the synchronous start-up of multiple axes.
[0079] When the multi-axis concurrent control state machine is configured to be enabled, the order is switched into the preset 500ms time slice effective convergence detection cycle loop, and high-frequency non-blocking spatial convergence position scanning is performed.
[0080] At the instant the detection cycle ends, the underlying position feedback bus is forcibly invoked to read back the latest physical encoder real feedback steps of each independent actuator axis to obtain the current coordinates of each axis. At the same time, the control closed-loop flag of each axis is obtained through the underlying drive status interface.
[0081] Based on the current and final coordinates of each axis, the absolute position deviation of each axis is determined. Then, the motion state determination process begins. First, a pre-interception verification is performed: it checks whether the absolute position deviation of the current scanning axis is zero, and simultaneously verifies whether its underlying effective control loop flag remains active. If the absolute position deviation of an axis is zero and its control loop flag remains active, the pre-interceptor implements a veto restriction, disqualifying it from arrival determination, forcibly marking it as in-transit and non-converged, and the timing is split and returned directly to the next time slice polling, avoiding false convergence logic jumps caused by the physical difference itself being within the dead zone.
[0082] If the pre-interception judgment is negative, that is, the absolute position deviation is not zero, then the release control is enabled, allowing it to enter the normal spatial deviation convergence judgment: determine whether the absolute position deviation of the current execution axis has safely entered the preset position deviation allowable range.
[0083] In the branch within the allowable range of the cut-in position deviation, the state machine performs multi-dimensional dual verification to determine whether the underlying control closed-loop flag has been completely released. If the flag has been released, it proves that the axis meets the dual arrival convergence condition, and the execution axis is marked as arrival completed and submitted to the state data warehouse; if the flag has not been released, it proves that the closed-loop controller is still in the tail period of the end deceleration fine-tuning release, and the axis is marked as the end fine-tuning non-convergence state, and the order is kept pending.
[0084] In branches that have not entered the allowable position deviation range, the state machine performs interruption monitoring to determine whether the control closed-loop flag of the underlying driver has undergone an abnormal change and been cleared. If the valid flag has been unexpectedly shut down and cleared before entering the allowable range, it indicates that the axis has been forcibly shut down due to a collision with a soft or hard limit switch or other safety boundary. The abnormal interruption signal is accurately captured, and the execution axis is determined to have terminated due to a limit abnormality, which is then submitted to the error data warehouse. If the flag is normal, the execution axis is determined to be in the normal operation state of a long-distance run.
[0085] Check the completeness of status submissions and determine whether all valid axes participating in this concurrent control have completed status determination and submitted results to the data warehouse. If any axis is still in the pending order state, the time-series loop returns to the next 500ms cycle; if all axes have been submitted, proceed to the summary decision.
[0086] The high-level state machine extracts data from the submitted data warehouse and executes the final summary decision across the entire line: it determines whether any axis in the state warehouse is marked as a limit abnormal action termination state.
[0087] If the decision indicates an abnormal axis with a limit, the state machine network group will asynchronously report the abnormal status code of the medical communication package to the control terminal for safety, and instantly lock the subsequent timing sequence to prevent the machine from continuing to move.
[0088] If all axes are in the normal completed state, the status unit packs the full line of assembly success status code and reports it through the asynchronous network interface, and simultaneously rewrites the multi-axis underlying effective power register.
[0089] After the summary decision is completed, the multi-axis concurrent absolute control state machine is fully released and shut down, and each axis is put into low-current standby management state, and then re-enters the background main loop polling center.
[0090] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the multi-axis concurrent motion control method based on position deviation and closed-loop flags in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0091] This application also provides a multi-axis concurrent motion control device based on position deviation and closed-loop indicator. Please refer to [link / reference]. Figure 4 The multi-axis concurrent motion control device based on position deviation and closed-loop flag includes: The instruction processing module 10 is used to acquire multi-axis concurrent control instructions and determine the termination coordinates of each axis based on the multi-axis concurrent control instructions. The drive acquisition module 20 is used to concurrently drive multi-axis motion according to the termination coordinates, and to acquire the current coordinates and control closed-loop flags of each axis in real time. Deviation calculation module 30 is used to determine the absolute position deviation of each axis based on the current coordinate and the termination coordinate of each axis; The state determination module 40 is used to determine the motion state of each axis based on the absolute position deviation of each axis and the control closed loop flag, and obtain the state determination result of each axis. The motion execution module 50 is used to perform motion control on each axis based on the state determination result.
[0092] The multi-axis concurrent motion control device based on position deviation and closed-loop markers provided in this application, employing the multi-axis concurrent motion control method based on position deviation and closed-loop markers in the above embodiments, can solve the technical problem of insufficient control reliability caused by the inability to accurately perceive the actual motion state of each axis in multi-axis concurrent motion control. Compared with the prior art, the beneficial effects of the multi-axis concurrent motion control device based on position deviation and closed-loop markers provided in this application are the same as those of the multi-axis concurrent motion control method based on position deviation and closed-loop markers provided in the above embodiments, and other technical features in the multi-axis concurrent motion control device based on position deviation and closed-loop markers are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0093] In one embodiment, the state determination module 40 is further configured to determine the motion state of the axis as an in-transit non-converged state when the absolute position deviation of any axis is a preset value and the control closed loop flag is in an active state. When the absolute position deviation of any axis is not a preset value, the motion state determination result of the axis is determined based on the absolute position deviation and the control closed loop flag.
[0094] In one embodiment, the state determination module 40 is further configured to obtain a preset position deviation allowable range when the absolute position deviation of any axis is not a preset value; When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the completed position state. When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is active, the motion state of the shaft is determined to be the end fine-tuning non-converged state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed-loop flag is in an active state, the motion state of the shaft is determined to be a normal motion state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the limit abnormal action termination state.
[0095] In one embodiment, the motion execution module 50 is further configured to interrupt multi-axis motion and report the abnormal state when the state determination result of any axis is a limit abnormal action termination state. If the state determination result of any axis is any of the following: in-way non-convergence state, end-point fine-tuning non-convergence state, and normal motion state, maintain the current motion control of each axis. Multi-axis concurrent control ends when all axis status determination results are in the "completed" state.
[0096] In one embodiment, the drive acquisition module 20 is further configured to acquire the spatial motion characteristics of each axis, and configure a motion velocity threshold and an acceleration slope curve based on the spatial motion characteristics; Based on the termination coordinates of each axis, the motion velocity threshold, and the acceleration slope curve, multi-axis motion is driven concurrently. During multi-axis motion, the current coordinates of each axis and the control closed-loop flag are acquired in real time.
[0097] In one embodiment, the drive acquisition module 20 is further configured to acquire historical state information of historical multi-axis movements; Based on the historical state information, reset the historical control state of the historical multi-axis motion and clear the residual control quantities generated by the historical multi-axis motion.
[0098] In one embodiment, the deviation calculation module 30 is further configured to perform sign-bit lifting processing on the termination coordinates to obtain lifted termination coordinates; Calculate the difference between the current coordinate and the lifting termination coordinate of each axis to obtain the absolute position deviation of each axis.
[0099] This application provides a multi-axis concurrent motion control device based on position deviation and closed-loop marker. The multi-axis concurrent motion control device based on position deviation and closed-loop marker includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the multi-axis concurrent motion control method based on position deviation and closed-loop marker in the above embodiment 1.
[0100] The following is for reference. Figure 5 This document illustrates a structural schematic diagram of a multi-axis concurrent motion control device based on position deviation and closed-loop markers suitable for implementing embodiments of this application. The multi-axis concurrent motion control device based on position deviation and closed-loop markers in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The multi-axis concurrent motion control device based on position deviation and closed-loop flag shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0101] like Figure 5As shown, a multi-axis concurrent motion control device based on position deviation and closed-loop flags may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the multi-axis concurrent motion control device based on position deviation and closed-loop flags. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the multi-axis concurrent motion control device based on position deviation and closed-loop indicators to wirelessly or wiredly communicate with other devices to exchange data. Although the figure shows a multi-axis concurrent motion control device based on position deviation and closed-loop indicators with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0102] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0103] The multi-axis concurrent motion control device based on position deviation and closed-loop markers provided in this application, employing the multi-axis concurrent motion control method based on position deviation and closed-loop markers in the above embodiments, can solve the technical problem of insufficient control reliability caused by the inability to accurately perceive the actual motion state of each axis in multi-axis concurrent motion control. Compared with the prior art, the beneficial effects of the multi-axis concurrent motion control device based on position deviation and closed-loop markers provided in this application are the same as those of the multi-axis concurrent motion control method based on position deviation and closed-loop markers provided in the above embodiments, and other technical features in this multi-axis concurrent motion control device based on position deviation and closed-loop markers are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0104] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0105] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0106] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the multi-axis concurrent motion control method based on position deviation and closed-loop flag in the above embodiments.
[0107] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0108] The aforementioned computer-readable storage medium may be included in a multi-axis concurrent motion control device based on position deviation and closed-loop flag; or it may exist independently and not assembled into a multi-axis concurrent motion control device based on position deviation and closed-loop flag.
[0109] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a multi-axis concurrent motion control device based on position deviation and closed-loop flag, the multi-axis concurrent motion control device based on position deviation and closed-loop flag performs the following actions: acquiring multi-axis concurrent control instructions; determining the termination coordinates of each axis based on the multi-axis concurrent control instructions; concurrently driving multi-axis motion according to the termination coordinates, and acquiring the current coordinates and control closed-loop flags of each axis in real time; determining the absolute position deviation of each axis based on the current coordinates and the termination coordinates; performing motion state determination on each axis based on the absolute position deviations and the control closed-loop flags, and obtaining the state determination results of each axis; and performing motion control on each axis based on the state determination results.
[0110] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0112] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0113] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned multi-axis concurrent motion control method based on position deviation and closed-loop flags. This solves the technical problem of insufficient control reliability caused by the inability to accurately perceive the actual motion state of each axis in multi-axis concurrent motion control. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the multi-axis concurrent motion control method based on position deviation and closed-loop flags provided in the above embodiments, and will not be elaborated upon here.
[0114] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flag as described above.
[0115] The computer program product provided in this application can solve the technical problem of insufficient control reliability caused by the inability to accurately perceive the actual motion state of each axis in multi-axis concurrent motion control. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the multi-axis concurrent motion control method based on position deviation and closed-loop flag provided in the above embodiments, and will not be repeated here.
[0116] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A multi-axis concurrent motion control method based on position deviation and closed-loop flag, characterized in that, The method includes: Obtain multi-axis concurrent control commands, and determine the termination coordinates corresponding to each axis based on the multi-axis concurrent control commands; The multi-axis motion is driven concurrently based on the termination coordinates, and the current coordinates and control closed-loop flags of each axis are obtained in real time. Based on the current coordinates and the termination coordinates of each axis, the absolute position deviation of each axis is determined; Based on the absolute position deviation of each axis and the control closed-loop flag, the motion state of each axis is determined, and the state determination result of each axis is obtained. Motion control is performed on each axis based on the state determination result.
2. The method as described in claim 1, characterized in that, The step of determining the motion state of each axis based on the absolute position deviation of each axis and the control closed-loop flag, and obtaining the state determination result of each axis, includes: When the absolute position deviation of any axis is a preset value and the control closed loop flag is active, the motion state of the axis is determined to be an in-transit non-converged state. When the absolute position deviation of any axis is not a preset value, the motion state determination result of the axis is determined based on the absolute position deviation and the control closed loop flag.
3. The method as described in claim 2, characterized in that, When the absolute position deviation of any axis is not a preset value, the motion state determination result of the axis is determined based on the absolute position deviation and the control closed-loop flag, including: When the absolute position deviation of any axis is not a preset value, obtain the preset allowable range of position deviation; When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the completed position state. When the absolute position deviation is within the allowable range of the position deviation and the control closed loop flag is active, the motion state of the shaft is determined to be the end fine-tuning non-converged state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed-loop flag is in an active state, the motion state of the shaft is determined to be a normal motion state. When the absolute position deviation is not within the allowable range of the position deviation and the control closed loop flag is in the released state, the motion state of the shaft is determined to be the limit abnormal action termination state.
4. The method as described in claim 1, characterized in that, The step of performing motion control on each axis based on the state determination result includes: When the status determination result of any axis is the limit abnormal action termination state, the multi-axis motion is interrupted and the abnormal status is reported. If the state determination result of any axis is any of the following: in-way non-convergence state, end-point fine-tuning non-convergence state, and normal motion state, maintain the current motion control of each axis. Multi-axis concurrent control ends when all axis status determination results are in the "completed" state.
5. The method as described in claim 1, characterized in that, The method of concurrently driving multi-axis motion based on the termination coordinates and acquiring the current coordinates and control closed-loop flags of each axis in real time includes: Acquire the spatial motion characteristics of each axis, and configure motion velocity thresholds and acceleration slope curves based on the spatial motion characteristics; Based on the termination coordinates of each axis, the motion velocity threshold, and the acceleration slope curve, multi-axis motion is driven concurrently. During multi-axis motion, the current coordinates of each axis and the control closed-loop flag are acquired in real time.
6. The method as described in claim 1, characterized in that, Before the step of concurrently driving multi-axis motion based on the termination coordinates and obtaining the current coordinates and control closed-loop flags of each axis in real time, the method further includes: Obtain historical state information of multi-axis motion; Based on the historical state information, reset the historical control state of the historical multi-axis motion and clear the residual control quantities generated by the historical multi-axis motion.
7. The method as described in claim 1, characterized in that, The determination of the absolute position deviation of each axis based on the current coordinate and the termination coordinate includes: The termination coordinates are then subjected to sign-raising processing to obtain raised termination coordinates; Calculate the difference between the current coordinate and the lifting termination coordinate of each axis to obtain the absolute position deviation of each axis.
8. A multi-axis concurrent motion control device based on position deviation and closed-loop indicator, characterized in that, The device includes: The instruction processing module is used to acquire multi-axis concurrent control instructions and determine the termination coordinates corresponding to each axis based on the multi-axis concurrent control instructions; The drive acquisition module is used to concurrently drive multi-axis motion according to the termination coordinates, and to acquire the current coordinates and control closed-loop flags of each axis in real time. The deviation calculation module is used to determine the absolute position deviation of each axis based on the current coordinate and the termination coordinate of each axis; The state determination module is used to determine the motion state of each axis based on the absolute position deviation of each axis and the control closed loop flag, and obtain the state determination result of each axis. The motion execution module is used to perform motion control on each axis based on the state determination result.
9. A multi-axis concurrent motion control device based on position deviation and closed-loop indicator, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flags as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the multi-axis concurrent motion control method based on position deviation and closed-loop flag as described in any one of claims 1 to 7.