Power-off recovery method, embroidery machine, and computer-readable storage medium

CN117055468BActive Publication Date: 2026-09-29FUZHOU RUINENG CONTROL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310979753.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2026-09-29
Estimated Expiration
2043-08-04

AI Technical Summary

Technical Problem

[0002]目前,电脑刺绣机在发生断电的情况下,如果刺绣机的绣框被推动移位,刺绣机无法记录变化后的绣框位置

Benefits of technology

[0014]本申请提供了一种断电恢复方法,应用于刺绣机,刺绣机包括绣框和驱动组件,驱动组件用于带动绣框移动,包括:从绣框选取限位点,以限位点作为绣框的原始点;通过驱动组件带动绣框移动,响应于刺绣机处于断电状态,获取与限位点对应的当前点的当前位置信息,以该当前位置作为绣框的停绣点;响应于刺绣机断电恢复,将绣框的当前点移至原始点,并基于当前位置信息控制驱动组件带动绣框移动,以使绣框的当前点向停绣点移动。基于上述方式,通过在断电时记录绣框的位置信息,将绣框向原始点移动,并根据记录的位置信息控制绣框移动,将绣框恢复至原来的位置,可以提高断电恢复速度,且无需人工进行判断,提高断电恢复的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117055468B_ABST
    Figure CN117055468B_ABST
Patent Text Reader

Abstract

The application discloses a power-off recovery method, an embroidery machine and a computer readable storage medium. The embroidery machine comprises a frame and a driving assembly. The driving assembly is used to drive the frame to move. The method comprises the following steps: selecting a limiting point from the frame, and taking the limiting point as an original point of the frame; driving the frame to move through the driving assembly, and in response to the fact that the embroidery machine is in a power-off state, acquiring current position information of a current point corresponding to the limiting point, and taking the current position as a stopping point of the frame; and in response to the fact that the embroidery machine is recovered from power-off, firstly moving the current point of the frame to the original point, and controlling the driving assembly to drive the frame to move based on the current position information, so that the current point of the frame moves to the stopping point. Based on the above method, the position information of the frame is recorded when the power is off, the frame is moved to the original point, and the frame is controlled to move according to the recorded position information, so that the frame is recovered to the original position. The power-off recovery speed can be improved, and manual judgment is not needed, so that the accuracy of power-off recovery is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial control technology, and in particular to a power failure recovery method, an embroidery machine, and a computer-readable storage medium. Background Technology

[0002] Currently, in the event of a power outage, if the embroidery frame of a computerized embroidery machine is moved, the machine cannot record the changed frame position. Upon restarting, manual assessment or adjustment of the frame's position is required, resulting in slow recovery and inaccurate manual judgment. Summary of the Invention

[0003] To address the aforementioned problems, this application provides a power outage recovery method, an embroidery machine, and a computer-readable storage medium.

[0004] To address the aforementioned technical problems, this application provides a first technical solution: a power outage recovery method applied to an embroidery machine. The embroidery machine includes an embroidery frame and a drive assembly. The drive assembly is used to move the embroidery frame, comprising: selecting a limit point from the embroidery frame and using the limit point as the original point of the embroidery frame; moving the embroidery frame via the drive assembly; in response to the embroidery machine being in a power outage state, acquiring the current position information of the current point corresponding to the limit point and using the current position of the current point as the stopping point of the embroidery frame; and in response to the power outage recovery of the embroidery machine, moving the current point of the embroidery frame to the original point, and controlling the drive assembly to move the embroidery frame based on the current position information, so that the current point of the embroidery frame moves towards the stopping point.

[0005] The embroidery machine includes a single-turn absolute encoder, which is used to acquire first encoding information of the drive component when the embroidery machine is in a power-off state. The current position information includes the first encoding information and position information. The step of moving the current point of the embroidery frame to the original point and controlling the drive component to move the embroidery frame based on the current position information includes: controlling the drive component to move the current point of the embroidery frame to the original point; controlling the drive component based on the position information to move the embroidery frame from the original point to the stopping point; and acquiring second encoding information of the drive component through the single-turn absolute encoder when the embroidery frame has moved to the stopping point.

[0006] The step of obtaining the second encoding information of the driving component through the single-turn absolute encoder includes: obtaining position error information based on the first encoding information and the second encoding information; and controlling the driving component to move the embroidery frame based on the position error information so that the current point of the embroidery frame moves towards the stopping point.

[0007] The step of obtaining position error information based on the first encoding information and the second encoding information includes: the first encoding information includes a first encoding value of the embroidery frame in a first direction and a second encoding value of the embroidery frame in a second direction; the second encoding information includes a third encoding value of the embroidery frame in the first direction and a fourth encoding value of the embroidery frame in the second direction; a first position error value of the embroidery frame in the first direction is obtained based on the first encoding value and the third encoding value; and a second position error value of the embroidery frame in the second direction is obtained based on the second encoding value and the fourth encoding value.

[0008] The step of controlling the driving component to move the embroidery frame based on the position error information includes: in response to the first position error value being greater than a preset error value or the second position error value being greater than the preset error value, controlling the driving component to move the embroidery frame so that the current point of the embroidery frame moves towards the stopping point; in response to the first position error value being less than the preset error value and the second position error value being less than the preset error value, controlling the driving component to stop the embroidery frame from moving.

[0009] The step of controlling the drive component to move the current point of the embroidery frame to the original point includes: obtaining the third encoding information of the original point through the single-turn absolute encoder; obtaining the fourth encoding information of the drive component through the single-turn absolute encoder when the embroidery frame moves to the original point; obtaining the distance between the current point and the original point based on the third encoding information and the fourth encoding information; and controlling the drive component to stop moving in response to the distance being less than a preset distance.

[0010] The step of controlling the embroidery frame to stop moving in response to the distance being less than a preset distance includes: controlling the driving component to move the embroidery frame based on the third encoding information and the fourth encoding information, so that the current point of the embroidery frame moves towards the original point.

[0011] To solve the above-mentioned technical problems, another technical solution provided in this application is: to provide an embroidery machine, the embroidery machine including an embroidery frame, a drive assembly, a single-turn absolute encoder, a distance sensor, a controller, and a memory. The embroidery frame is connected to the controller through the drive assembly. The controller receives a control signal and is used to control the movement of the embroidery frame through the drive assembly. The drive assembly is used to acquire the position information of the embroidery frame. The single-turn absolute encoder is connected to the drive assembly and is used to acquire encoding information. The distance sensor is connected to the controller and is used to detect the distance between the embroidery frame and the distance sensor. When the distance is less than a preset distance, a prompt signal is sent to the controller to control the embroidery frame to stop moving. The controller is connected to the memory, wherein the memory stores program data. The controller retrieves the program data stored in the memory to execute the power failure recovery method described above.

[0012] The drive assembly includes a first motor that moves along a first direction and a second motor that moves along a second direction. The single-turn absolute encoder includes a first single-turn absolute encoder and a second single-turn absolute encoder. The first single-turn absolute encoder is connected to the first motor and is used to acquire the encoding information of the first motor. The second single-turn absolute encoder is connected to the second motor and is used to acquire the encoding information of the second motor.

[0013] To solve the above-mentioned technical problems, another technical solution provided by this application is: to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, is used to implement the power failure recovery method as described above.

[0014] This application provides a power outage recovery method applied to an embroidery machine. The embroidery machine includes an embroidery frame and a drive component. The drive component moves the embroidery frame, comprising: selecting a limit point from the embroidery frame, using the limit point as the original point of the embroidery frame; moving the embroidery frame via the drive component; in response to a power outage, acquiring the current position information of the current point corresponding to the limit point, using the current position as the stopping point of the embroidery frame; and in response to power outage recovery, moving the current point of the embroidery frame to the original point, and controlling the drive component to move the embroidery frame based on the current position information, so that the current point of the embroidery frame moves towards the stopping point. Based on the above method, by recording the position information of the embroidery frame during a power outage, moving the embroidery frame towards the original point, and controlling the movement of the embroidery frame according to the recorded position information to restore the embroidery frame to its original position, the power outage recovery speed can be improved, and no manual judgment is required, thus improving the accuracy of power outage recovery. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0016] Figure 1 This is a flowchart illustrating an embodiment of the power outage recovery method provided in this application;

[0017] Figure 2 This is a flowchart illustrating another embodiment of the power outage recovery method provided in this application;

[0018] Figure 3 This is a flowchart illustrating another embodiment of the power outage recovery method provided in this application;

[0019] Figure 4 This is a flowchart illustrating another embodiment of the power outage recovery method provided in this application;

[0020] Figure 5 This is a schematic diagram of the frame of an embodiment of the embroidery machine provided in this application;

[0021] Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0022] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and not for limiting the present invention. Furthermore, it should be noted that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, not all structures. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.

[0023] The terms "first," "second," etc., used in this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0024] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0025] In embroidery machines, the embroidery frame is typically mounted below the needle bar to hold the fabric in place. When the needle bar is not running, the embroidery frame can be moved by a motor to position it before embroidery begins. As the quality requirements for embroidered products increase, so do the demands on embroidery machines. Currently, in the event of a power outage, if the embroidery frame is moved, the machine cannot record the changed frame position. This results in the embroidery starting point not being in the original position upon restarting, leading to overlapping patterns or errors. Therefore, upon the next startup, manual judgment or adjustment of the frame's position is required, which is slow and prone to inaccuracy.

[0026] In view of the above problems, this application provides a power outage recovery method. The technical solution of the embodiment of this application will be clearly and completely described below with reference to the accompanying drawings.

[0027] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of a power outage recovery method provided in this application. The power outage recovery method of this embodiment is applied to an embroidery machine, which includes an embroidery frame and a drive assembly, the drive assembly being used to move the embroidery frame.

[0028] The power outage recovery method in this embodiment includes the following steps:

[0029] S101: Select the limiting point from the embroidery frame, and use the limiting point as the original point of the embroidery frame.

[0030] The embroidery frame is typically rectangular or square, and the initial position of one vertex of the frame is selected as the limiting point. For example, when the embroidery frame is rectangular, it includes a top-left point, a bottom-left point, a top-right point, and a bottom-right point; the initial position of the top-right point can be selected as the limiting point. In other embodiments, the embroidery frame can be circular, and the initial position of the point furthest from the center of the circle in the horizontal or vertical direction can be selected as the limiting point.

[0031] Before the embroidery machine is started and the embroidery frame has begun to move, after selecting the limit point, the limit point is used as the original point of the embroidery frame, and the position information of the original point is recorded.

[0032] The location information of the original point can be its coordinates.

[0033] S102: Drive the embroidery frame to move through the drive component. In response to the embroidery machine being in a power-off state, obtain the current position information of the current point corresponding to the limit point, and use the current position of the current point as the stopping point of the embroidery frame.

[0034] The drive component can be a motor, which moves the embroidery frame to the embroidery starting point. The embroidery starting point is the position of the embroidery frame when the embroidery machine begins embroidery; this position can be preset.

[0035] The current point and limit point of the embroidery frame are set to correspond, meaning the selection of the current point and the limit point are consistent. For example, if the initial position of the upper right point is selected as the limit point, then the upper right point is selected as the current point. The current position information of the current point is the position information of the current point when the embroidery machine is powered off. The position information can be the position coordinates of the current point or the positional relationship between the current point and the original point. The current position of the current point when the embroidery machine is powered off is used as the stopping point of the embroidery frame.

[0036] When a power outage or line failure causes the embroidery machine to be in a power-off state, the current position information of the current point is recorded, and the current position is used as the stop point of the embroidery frame.

[0037] S103: In response to the power failure recovery of the embroidery machine, the current point of the embroidery frame is moved to the original point, and the drive component is controlled to move the embroidery frame based on the current position information so that the current point of the embroidery frame moves towards the stop point.

[0038] In response to a power outage and subsequent recovery of the embroidery machine, the embroidery machine receives a power outage recovery command from the host computer. The host computer can be a computer, tablet, or other control device, and includes an HMI (Human Machine Interface), through which the power outage recovery command can be sent to the embroidery machine.

[0039] Specifically, the embroidery machine receives a power-off recovery command from the host computer. Based on the recorded position information of the original point, it controls the drive component to move the embroidery frame, shifting the current point to the original point. Then, based on the current position information of the current point recorded when the embroidery machine lost power, it drives the embroidery frame to move, causing the current point of the embroidery frame to move from the original point to the current position, thereby restoring the position of the embroidery frame.

[0040] Therefore, this embodiment provides a power outage recovery method, including: selecting a limit point from the embroidery frame, using the limit point as the original point of the embroidery frame; moving the embroidery frame by a driving component; in response to the embroidery machine being in a power outage state, acquiring the current position information of the current point corresponding to the limit point, using the current position of the current point as the stopping point of the embroidery frame; in response to the embroidery machine recovering from a power outage, moving the current point of the embroidery frame to the original point, and controlling the driving component to move the embroidery frame based on the current position information, so that the current point of the embroidery frame moves towards the stopping point. Based on the above method, by recording the position information of the embroidery frame during a power outage, moving the embroidery frame towards the original point, and controlling the movement of the embroidery frame according to the recorded position information to restore the embroidery frame to its original position, the power outage recovery speed can be improved, and no manual judgment is required, thus improving the accuracy of power outage recovery.

[0041] Please see Figure 2 , Figure 2 This is a schematic flowchart of another embodiment of the power outage recovery method provided in this application. This embodiment is... Figure 1 The specific implementation method involves moving the current point of the embroidery frame to the original point and controlling the drive component to move the embroidery frame based on the current position information. In this embodiment, the embroidery machine includes a single-turn absolute encoder, which is used to acquire the first encoding information of the drive component when the embroidery machine is in a power-off state.

[0042] The power outage recovery method in this embodiment includes the following steps:

[0043] S201: Control the drive component to move the current point of the embroidery frame to the original point.

[0044] In the event of a power outage, the control drive component moves the current point of the embroidery frame to the original point in response to the power restoration. Typically, to prevent a collision between the current point and the physical boundary of the embroidery machine, the current point of the embroidery frame cannot be moved precisely to the original point.

[0045] For example, the original point of the embroidery frame is set to point O. The current position information of the current point of the embroidery frame includes the first encoding information and the position information. The current position of the current point is set to point M. The control drive component moves the current point of the embroidery frame to the original point, that is, the control drive component moves the current point of the embroidery frame from point M to point O until the current point stops at point O'. There is a positional error between point O and point O'.

[0046] S202: Position information-based control drive component to move the embroidery frame from the original point to the stop point.

[0047] The current point's position information can be its coordinates or its positional relationship with the original point. The current position of the current point when the embroidery machine is powered off is taken as the stopping point of the embroidery frame; that is, the coordinates of the stopping point are the coordinates of the current point. The drive component is controlled based on the current point's position information to move the current point of the embroidery frame from the original point to the stopping point. Since the current point of the embroidery frame cannot accurately move to the original point, the embroidery frame is moved based on points with positional errors from the original point, meaning the current point of the embroidery frame cannot accurately move to its current position.

[0048] For example, in step S201, to prevent the current point from colliding with the physical boundary of the embroidery machine, the current point of the embroidery frame is actually stopped at point O'. Based on the position information of the current point, the drive component is controlled to move the current point of the embroidery frame from point O' to point M. Since there is a positional error between point O and point O', the drive component is controlled to move the embroidery frame, moving the current point of the embroidery frame from point O' to point M'. There is a positional error between point M and point M'.

[0049] S203: When the embroidery frame moves to the current position, the second encoding information of the drive component is obtained by a single-turn absolute encoder.

[0050] Specifically, when the embroidery frame moves to its current position, the second encoding information of the driving component is obtained.

[0051] The single-turn absolute encoder can be either a photoelectric encoder or a magnetoelectric encoder. Using a single-turn absolute encoder, the encoded information of the drive component can be recorded within a single turn (360 degrees). The encoded information at each position is absolute and unique within that single turn (360 degrees). The resolution of the single-turn absolute encoder can be 12 bits, 15 bits, or 17 bits. Taking a 12-bit resolution single-turn absolute encoder as an example, this encoder can record 2^12 encoded positions, or 4096 encoded positions.

[0052] The displacement of the embroidery frame varies depending on the diameter of the single-turn absolute encoder. For example, one rotation of the single-turn absolute encoder corresponds to a displacement of 20mm, 25mm, or 30mm for the embroidery frame. If the displacement of the embroidery frame corresponding to one rotation of the single-turn absolute encoder is greater than the maximum position error, then the single-turn absolute encoder can accurately record the position information of the drive component, and thus the position information of the embroidery frame.

[0053] S204: Based on the first encoding information and the second encoding information, the position error information is obtained.

[0054] Specifically, the first encoding information of the driving component when the embroidery machine is in a power-off state is obtained. The first encoding information is the encoding information of the embroidery stop point. The second encoding information is the encoding information of the current point after the power outage of the embroidery frame is restored. Based on the first and second encoding information, the position error information is obtained, which is the position error information of the current point in the power-off state and after the power outage is restored.

[0055] For example, in a power outage state, the current position of the current point is point M, which is the stop point. After the power is restored, the current position of the current point is point M'. The position error information obtained through the first and second encoding information is the position error information between point M' and point M.

[0056] Specifically, the first coding information includes a first coding value of the embroidery frame in the first direction and a second coding value of the embroidery frame in the second direction. The second coding information includes a third coding value of the embroidery frame in the first direction and a fourth coding value of the embroidery frame in the second direction. Based on the first coding value and the third coding value, a first position error value of the embroidery frame in the first direction is obtained. Based on the second coding value and the fourth coding value, a second position error value of the embroidery frame in the second direction is obtained.

[0057] The first direction can be the horizontal direction of the embroidery frame. The second direction can be the vertical direction of the embroidery frame. By comparing the first and second coding information of the embroidery frame in the first direction, the positional error of the embroidery frame in the first direction can be obtained. By comparing the first and second coding information of the embroidery frame in the second direction, the positional error of the embroidery frame in the second direction can be obtained.

[0058] Specifically, by comparing the first coded value of the first coded information with the third coded value of the second coded information, a first position error value for the embroidery frame in the first direction is obtained. By comparing the second coded value of the first coded information with the fourth coded value of the second coded information, a second position error value for the embroidery frame in the second direction is obtained.

[0059] S205: Based on the position error information, control the drive component to move the embroidery frame so that the current point of the embroidery frame moves towards the stop point.

[0060] The control drive component moves the embroidery frame so that the current point of the embroidery frame moves towards the stop point.

[0061] For example, in the event of a power outage, the current position of the current point is point M, which is the stop point for embroidery. After the power is restored, the current position of the current point is point M', and the current point of the embroidery frame is moved from point M' to point M.

[0062] Specifically, in response to either a first position error value or a second position error value being greater than a preset error value, the driving component is controlled to move the embroidery frame so that the current point of the embroidery frame moves towards the stop point. In response to both the first and second position error values ​​being less than the preset error value, the driving component is controlled to stop the embroidery frame from moving.

[0063] The preset error value is a pre-defined error between the current point's position during a power outage and after power restoration. If the position error of the current point in the embroidery frame in the first or second direction is greater than the preset error value, it indicates a significant error between the current point's position during a power outage and its position after power restoration, requiring continued control of the embroidery frame to move towards the current position.

[0064] If the first position error value is greater than the preset error value or the second position error value is greater than the preset error value, the control drive component moves the embroidery frame so that the current point of the embroidery frame moves towards the stop embroidery point until the first position error value is less than the preset error value and the second position error value is less than the preset error value. Then, the control drive component controls the embroidery frame to stop moving.

[0065] Optionally, the control drive component can move the embroidery frame. It can control the current point of the embroidery frame to move in a straight line to the current position, or it can first control the embroidery frame to move in the first direction based on the first position error value, and then control the embroidery frame to move in the second direction based on the second position error value.

[0066] Therefore, through the method of this embodiment, by controlling the embroidery frame to move towards the original point, and controlling the embroidery frame to move from the original point to the current position, since the current point of the embroidery frame cannot be accurately moved to the current position, the position error information between the current position and the current position can be obtained according to the single-turn absolute encoder. The single-turn absolute encoder has a high resolution and can obtain accurate position error information. Based on the position error information, the current point of the embroidery frame is controlled to move towards the stop embroidery point, thereby improving the accuracy of power failure recovery.

[0067] In addition, single-turn absolute encoders can record the position information of the embroidery frame without battery power. Compared with existing multi-turn absolute encoders, they do not need to rely on the number of rotations or historical position information to obtain the position information of the embroidery frame, nor do they need to monitor the battery status or replace the battery, thus reducing additional maintenance costs.

[0068] Please see Figure 3 , Figure 3 This is a schematic flowchart of another embodiment of the power outage recovery method provided in this application. This embodiment is... Figure 2 The specific implementation method of the control drive component moving the current point of the embroidery frame to the original point.

[0069] The power outage recovery method in this embodiment includes the following steps:

[0070] S301: Obtain the third encoded information of the original point through a single-turn absolute encoder.

[0071] Among them, the third encoding information of the original point is the encoding information of the original point when the embroidery machine is powered off.

[0072] S302: When the embroidery frame moves to the original point, the fourth encoding information of the drive component is obtained by a single-turn absolute encoder.

[0073] To prevent the current point from colliding with the physical boundary of the embroidery machine, the current point of the embroidery frame cannot be accurately moved to the original point. If the embroidery frame moves to the original point, the fourth encoding information of the driving component after the movement is obtained. The fourth encoding information is the encoding information of the current point when it is close to the original point.

[0074] S303: Based on the third and fourth encoding information, obtain the distance between the current point and the original point.

[0075] To prevent the current point from colliding with the physical boundary of the embroidery machine, it is necessary to detect the distance between the current point and the original point. Based on the third and fourth encoded information, the distance between the current point and the original point can be obtained.

[0076] S304: In response to the distance being less than a preset distance, the embroidery frame is stopped by controlling the drive component.

[0077] The preset distance is the pre-defined distance between the current point and the original point. When the distance between the current point and the original point is less than the preset distance, the embroidery frame stops moving.

[0078] In other embodiments, a distance sensor may be installed at the location of the origin point or at the boundary of the embroidery machine to detect the distance between the embroidery frame and the origin point or the boundary of the embroidery machine.

[0079] Therefore, by using the method of this embodiment, by monitoring the distance between the current point and the original point when the current point of the embroidery frame is close to the original point, the probability of the embroidery frame colliding with the boundary of the embroidery machine can be reduced, thus reducing the probability of damage to the embroidery frame or the embroidery machine.

[0080] Please see Figure 4 , Figure 4 This is a schematic flowchart of another embodiment of the power outage recovery method provided in this application. This embodiment is... Figure 2 Another specific implementation of the control drive component moving the current point of the embroidery frame to the original point.

[0081] The power outage recovery method in this embodiment includes the following steps:

[0082] S401: Obtain the third encoded information of the original point through a single-turn absolute encoder.

[0083] This step is the same as step S301, and will not be repeated here.

[0084] S402: When the embroidery frame moves to the original point, the fourth encoding information of the drive component is obtained by a single-turn absolute encoder.

[0085] This step is the same as step S301, and will not be repeated here.

[0086] S403: Based on the third and fourth encoded information, obtain the distance between the current point and the original point.

[0087] This step is the same as step S301, and will not be repeated here.

[0088] S404: In response to the distance being less than a preset distance, the embroidery frame is stopped by controlling the drive component.

[0089] This step is the same as step S301, and will not be repeated here.

[0090] S405: Based on the third and fourth encoding information, control the drive component to move the embroidery frame so that the current point of the embroidery frame moves towards the original point.

[0091] To prevent the current point from colliding with the physical boundary of the embroidery machine, the current point of the embroidery frame cannot be accurately moved to the original point, and this error is difficult to eliminate due to objective reasons. In this embodiment, the driving component can be controlled to move the embroidery frame based on the third encoding information of the original point and the fourth encoding information of the current point, so that the current point of the embroidery frame moves towards the original point.

[0092] Therefore, by using the encoding information of the original point and the current point to control the movement of the current point of the embroidery frame towards the original point, the accuracy of power-off recovery of the original point can be improved, thereby improving the accuracy of power-off recovery of the embroidery frame. Since the single-turn absolute encoder has high resolution, the encoding information for the encoding position is more accurate, which can also reduce the probability of boundary collision between the embroidery frame and the embroidery machine, and reduce the probability of damage to the embroidery frame or the embroidery machine.

[0093] Please see Figure 5 , Figure 5 This is a schematic diagram of the frame of an embodiment of the embroidery machine provided in this application. Figure 5 As shown, the embroidery machine 100 includes an embroidery frame 101, a drive assembly 102, a single-turn absolute encoder 103, a distance sensor 104, a controller 105, and a memory 106.

[0094] The embroidery frame 101 is connected to the controller 105 via the drive assembly 102. The controller 105 receives control signals and uses them to control the movement of the embroidery frame 101 via the drive assembly 102. These control signals are sent by the HMI 107 and can be power-off recovery commands or movement commands, etc.

[0095] The drive component 102 is used to acquire the position information of the embroidery frame 101. The single-turn absolute encoder 103 is connected to the drive component 102 and is used to acquire the encoded information. Based on the position information and the encoded information, the drive component 102 is controlled to move the embroidery frame 101.

[0096] The drive assembly 102 includes a first motor 1021 that moves along a first direction and a second motor 1022 that moves along a second direction. The single-turn absolute encoder 103 includes a first single-turn absolute encoder 1031 and a second single-turn absolute encoder 1032. The first single-turn absolute encoder 1031 is connected to the first motor 1021 and is used to acquire the encoding information of the first motor 1021. The second single-turn absolute encoder 1032 is connected to the second motor 1022 and is used to acquire the encoding information of the second motor 1022.

[0097] The distance sensor 104 is connected to the controller 105 and is used to detect the distance between the embroidery frame 101 and the distance sensor 104. When the distance is less than a preset distance, the sensor sends a prompt signal to the controller 105 to control the embroidery frame 101 to stop moving.

[0098] The controller 105 is connected to the memory 106, wherein the memory 106 is used to store computer programs, and the controller 105 is used to execute the computer programs to implement the power failure recovery method described above.

[0099] The controller 105 can also be referred to as a CPU (Central Processing Unit). The controller 105 may be an electronic chip with signal processing capabilities. The controller 105 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor.

[0100] The memory 106 can be a memory module, TF card, etc., and can store all the information in the embroidery machine 100, including the input raw data, computer program, intermediate running results, and final running results. It stores and retrieves information according to the location specified by the controller 105. With the memory 106, the embroidery machine 100 has a memory function and can ensure normal operation. The memory 106 of the embroidery machine 100 can be classified according to its purpose as main memory (RAM) and auxiliary memory (external memory), or it can be classified as external memory and internal memory. External memory is usually magnetic media or optical discs, which can store information for a long time. RAM refers to the storage component on the motherboard, used to store currently executing data and programs, but it is only used for temporary storage of programs and data; the data will be lost when the power is turned off.

[0101] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium provided in this application. Figure 6 As shown, the computer-readable storage medium 110 stores program instructions 111 capable of implementing all of the above methods.

[0102] If the integrated units of the various functional units in the embodiments of this application are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium 110. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer-readable storage medium 110 includes several instructions in a program instruction 111 to cause a computer device (which may be a personal computer, system server, or network device, etc.), an electronic device (e.g., MP3, MP4, etc., or a mobile terminal such as a mobile phone, tablet, or wearable device, or a desktop computer, etc.), or a processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0103] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media 110 (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable storage medium 110. These computer-readable storage media 110 can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that program instructions 111, executable by the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0105] These computer-readable storage media 110 may also be stored in memory capable of directing a computer or other programmable data processing device to operate in a particular manner, such that program instructions 111 stored in the computer-readable storage media 110 produce an article of manufacture including instruction means, which are implemented in the flowchart. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0106] These computer-readable storage media 110 may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing program instructions 111 that execute on the computer or other programmable apparatus for implementing the process shown in the flowchart. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0107] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0108] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any medium for use by, or in conjunction with, an instruction execution system, apparatus or device (which may be a personal computer, server, network device or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0109] The above are merely embodiments of this application and do not limit the scope of this patent application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A power outage recovery method, characterized in that, Applied to an embroidery machine, the embroidery machine includes an embroidery frame and a drive assembly, the drive assembly being used to move the embroidery frame, including: Select a limiting point from the embroidery frame, and use the limiting point as the original point of the embroidery frame; The embroidery frame is moved by the drive component. In response to the embroidery machine being in a power-off state, the current position information of the current point corresponding to the limit point is obtained, and the current position of the current point is used as the stopping point of the embroidery frame. In response to the power failure of the embroidery machine being restored, the current point of the embroidery frame is moved to the original point, and the driving component is controlled to move the embroidery frame based on the current position information, so that the current point of the embroidery frame moves toward the stop embroidery point; The embroidery machine includes a single-turn absolute encoder, which is used to acquire first encoding information of the drive component when the embroidery machine is in a power-off state. The current position information includes the first encoding information and position information. The step of moving the current point of the embroidery frame to the original point and controlling the drive component to move the embroidery frame based on the current position information includes: The drive component is controlled to move the current point of the embroidery frame to the original point; The driving component is controlled based on the location information to move the embroidery frame from the original point to the stop point. When the embroidery frame moves to the stop point, the second encoding information of the drive component is obtained by the single-turn absolute encoder; The step of obtaining the second encoding information of the drive component through the single-turn absolute encoder includes: Based on the first encoding information and the second encoding information, position error information is obtained; Based on the position error information, the driving component is controlled to move the embroidery frame so that the current point of the embroidery frame moves toward the stopping point. The step of obtaining position error information based on the first encoding information and the second encoding information includes: The first encoding information includes a first encoding value of the embroidery frame in a first direction and a second encoding value of the embroidery frame in a second direction. The second encoding information includes a third encoding value of the embroidery frame in the first direction and a fourth encoding value of the embroidery frame in the second direction. Based on the first encoding value and the third encoding value, a first position error value of the embroidery frame in the first direction is obtained. Based on the second encoded value and the fourth encoded value, the second position error value of the embroidery frame in the second direction is obtained; The step of controlling the driving component to move the embroidery frame based on the position error information includes: In response to the first position error value being less than a preset error value and the second position error value being less than the preset error value, the embroidery frame is controlled to stop moving by controlling the driving component; The step of controlling the driving component to move the current point of the embroidery frame to the original point includes: The third encoding information of the original point is obtained through the single-loop absolute encoder; When the embroidery frame moves to the original point, the fourth encoding information of the drive component is obtained by the single-turn absolute encoder; Based on the third and fourth encoding information, the distance between the current point and the original point is obtained; In response to the distance being less than a preset distance, the embroidery frame is controlled to stop moving by controlling the drive component; The step of controlling the embroidery frame to stop moving by controlling the drive component in response to the distance being less than a preset distance includes: Based on the third and fourth encoding information, the driving component is controlled to move the embroidery frame so that the current point of the embroidery frame moves toward the original point; The step of controlling the driving component to move the embroidery frame based on the position error information includes: In response to the first position error value being greater than a preset error value or the second position error value being greater than the preset error value, the driving component is controlled to move the embroidery frame so that the current point of the embroidery frame moves toward the stop embroidery point.

2. An embroidery machine, characterized in that, The device includes an embroidery frame, a drive assembly, a single-turn absolute encoder, a distance sensor, a controller, and a memory. The embroidery frame is connected to the controller via the drive assembly. The controller receives control signals and controls the movement of the embroidery frame via the drive assembly. The drive assembly acquires the position information of the embroidery frame. The single-turn absolute encoder is connected to the drive assembly and acquires encoding information. The distance sensor is connected to the controller and detects the distance between the embroidery frame and the distance sensor. When the distance is less than a preset distance, the controller sends a prompt signal to the controller to stop the movement of the embroidery frame. The controller is connected to the memory, which stores program data. The controller retrieves the program data stored in the memory to execute the power failure recovery method as described in claim 1.

3. The embroidery machine according to claim 2, characterized in that, The drive assembly includes a first motor that moves along a first direction and a second motor that moves along a second direction. The single-turn absolute encoder includes a first single-turn absolute encoder and a second single-turn absolute encoder. The first single-turn absolute encoder is connected to the first motor and is used to acquire the encoding information of the first motor. The second single-turn absolute encoder is connected to the second motor and is used to acquire the encoding information of the second motor.

4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, is used to implement the power failure recovery method as described in claim 1.

Citation Information

Patent Citations

  • Power-off tracking method and system of die height indicator

    CN108176732A

  • Power-off protection control method, system and device for embroidery frame of embroidery machine

    CN114753072A

  • Numerical control device

    JP1994155232A

  • System of recovering sewing start point of automatic embroidering machine

    JP2001137580A

  • Apparatus and method for detecting position of embroidery machine after power failure

    US4688498A