Method for resuming printing from power failure, 3D printer, and computer-readable storage medium
By using a nonvolatile memory chip to store the print cursor position in a 3D printer, accurate re-shooting after power outage is achieved, solving the problems of waste of consumables and time extension caused by power outage in the middle of printing, and reducing hardware cost and complexity.
Patent Information
- Application Number
- PCT/CN2024/112753
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-02
- Filing Date
- 2024-08-16
- Publication Date
- 2025-06-05
AI Technical Summary
During the 3D printing process, if the 3D printer is abnormally powered off, the printing progress will be lost, resulting in waste of consumables and prolonged printing time.
The power off-load method is used to store the print cursor position through the non-volatile memory chip. After restarting, find the last stored cursor position before the power off, and determine the starting position of the print file.
It avoids waste of consumables caused by power outages in the middle of printing, reduces printing time, and realizes power outage and continuous firing without adding additional energy storage devices, reducing the cost and wiring complexity of 3D printers.
Smart Images

Figure CN2024112753_05062025_PF_FP_ABST
Abstract
Description
Power-off resume printing method, 3D printer, and computer-readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 2, 2023, with application number 202311648871.X and application name “Power-off resume printing method, 3D printer and computer-readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of additive manufacturing, and in particular to a method for resuming printing after power failure, a 3D printer, and a computer-readable storage medium. Background Art
[0004] Three Dimension Printing (3D printing) is a type of rapid prototyping technology, also known as additive manufacturing. It is a technology that uses digital model files as the basis and uses adhesive materials such as powdered metal or plastic to construct objects by printing layer by layer.
[0005] During the 3D printing process, if the 3D printer experiences an abnormal power outage, its printing progress will be lost. When the power is restored, the 3D printer will restart and re-read the relevant files to start printing from the beginning, which will waste 3D printing consumables and extend the time required for printing.
[0006] Summary of the Invention
[0007] In view of the above, embodiments of the present application provide a method for resuming printing after a power outage, a 3D printer, and a computer-readable storage medium, which can avoid waste of consumables due to power outages during printing and reduce printing time.
[0008] An embodiment of the present application provides a method for resuming printing after a power outage, which is applied to a 3D printer. The 3D printer includes a non-volatile memory chip, and the non-volatile memory chip includes at least one data block for storing a cursor position. The method for resuming printing after a power outage includes:
[0009] Get the print file to be read;
[0010] If a reading cursor of the 3D printer moves a preset number of times in the print file, obtaining a current cursor position of the reading cursor in the print file;
[0011] Storing the current cursor position in the data block;
[0012] If the 3D printer is powered on again after being powered off during printing, the non-volatile memory chip is searched for the cursor position that was most recently stored before the 3D printer was powered off;
[0013] The resume printing position of the print file is determined based on the cursor position stored most recently before the 3D printer is powered off.
[0014] The reading cursor of the 3D printer in the embodiment of the present application moves a preset number of times and stores the current cursor position. When the 3D printer is restarted after a power outage, the 3D printer can trace back to the cursor position that was most recently stored before the power outage, thereby maximally approaching the printing position before the power outage, and then accurately resume printing based on the printing position before the power outage, thereby avoiding waste of consumables due to power outages in the middle of printing and reducing printing time.
[0015] In some embodiments, the non-volatile memory chip includes a plurality of data blocks for storing cursor positions, and storing the current cursor position in the data blocks includes:
[0016] Determining a target data block for storing the current cursor position among the plurality of data blocks;
[0017] The current cursor position is stored in the target data block.
[0018] In some embodiments, determining a target data block for storing the current cursor position among the plurality of data blocks includes:
[0019] If the first data block is not the last data block among the multiple data blocks, the next data block after the first data block is used as the target data block, wherein the first data block is the data block for storing the previous cursor position of the current cursor position among the multiple data blocks.
[0020] In some embodiments, determining a target data block for storing the current cursor position among the plurality of data blocks includes:
[0021] If the first data block is the last data block among the multiple data blocks, the first data block among the multiple data blocks is used as the target data block.
[0022] In some embodiments, after determining a target data block for storing the current cursor position among the plurality of data blocks, the method further includes:
[0023] Determining an index number of the current cursor position, the index number representing a time sequence in which the 3D printer stores the current cursor position;
[0024] Storing the index number of the current cursor position in the target data block;
[0025] The step of searching the non-volatile memory chip for the cursor position most recently stored before the 3D printer is powered off includes:
[0026] Based on the index numbers stored in the data blocks of the non-volatile memory chip, the cursor position stored most recently before the 3D printer is powered off is searched in the plurality of data blocks.
[0027] In some embodiments, determining the index number of the current cursor position includes:
[0028] If the read cursor moves a preset number of times in the print file for the first time, a preset initial index value is used as the index number of the current cursor position;
[0029] If the read cursor moves a preset number of times in the print file, obtaining an index number of a previous cursor position of the current cursor position in the data block, and adding the index number of the previous cursor position to a preset index increment value to obtain an index number of the current cursor position;
[0030] The step of searching, based on the index numbers stored in the data blocks of the non-volatile memory chip, for the cursor position most recently stored before the 3D printer is powered off, comprises:
[0031] Based on the index numbers stored in the data blocks of the non-volatile memory chip, searching for the data block to which the maximum index number belongs;
[0032] The cursor position stored in the data block to which the maximum index number belongs is used as the cursor position most recently stored before the 3D printer is powered off.
[0033] In some embodiments, the power-off resume printing method further includes:
[0034] Before the 3D printer reads the print file, storing the power-off resume printing flag of the 3D printer in the non-volatile storage chip;
[0035] After the 3D printer completes printing based on the print file, clearing the power-off resume printing flag;
[0036] Confirm that the 3D printer is powered on again after a power outage during printing, including:
[0037] If, after the 3D printer is powered on, a power-off resume mark is present in the non-volatile memory chip, and the print file is stored in the 3D printer, it is confirmed that the 3D printer is powered on again after a power outage during printing.
[0038] In some embodiments, after determining the resume printing position of the print file based on the cursor position last stored before the 3D printer is powered off, the method further includes:
[0039] Reading the printing instruction in the printing file from the resume printing start position;
[0040] 3D printing is continued on the semi-finished product based on the read printing instruction, where the semi-finished product is an entity formed by printing based on the printing file by the 3D printer before power is turned off.
[0041] The present application also provides a 3D printer, comprising:
[0042] a non-volatile memory chip, the non-volatile memory chip comprising at least one data block for storing a cursor position;
[0043] A processor is connected to the non-volatile memory chip via a bus provided in the 3D printer, and the processor is used to execute the above-mentioned power-off resume printing method.
[0044] An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned power-off resume printing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] FIG1 is a schematic diagram of a scenario of a power-off resume printing system provided according to one or more embodiments of the present application.
[0046] FIG2 is a schematic diagram of the storage structure of a power-off resume data storage area provided according to one or more embodiments of the present application.
[0047] FIG3 is a flowchart of the steps of a method for resuming printing after a power outage according to one or more embodiments of the present application.
[0048] FIG4 is a flowchart of sub-steps of step 303 provided according to one or more embodiments of the present application.
[0049] FIG5 is a schematic structural diagram of a power-off resume printing device provided according to one or more embodiments of the present application.
[0050] FIG6 is a schematic structural diagram of a printing control unit provided according to one or more embodiments of the present application.
[0051] Description of main component symbols
[0052] 3D Printer 10
[0053] Print control unit 11
[0054] Processor 111
[0055] Non-volatile memory chip 112
[0056] Power-off resume data storage area 1121
[0057] Memory 113
[0058] Computer Programs 114
[0059] Print execution unit 12
[0060] Print file storage device 20 DETAILED DESCRIPTION
[0061] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.
[0062] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0064] It should be further noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0065] In this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0066] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0067] 3D printing is a type of rapid prototyping technology, also known as additive manufacturing. It is a technology that uses digital model files as the basis and uses adhesive materials such as powdered metal or plastic to construct objects by printing layer by layer.
[0068] During the 3D printing process, if the 3D printer experiences an abnormal power outage, its printing progress will be lost. When the power is restored, the 3D printer will restart and re-import the relevant files, reading the files from the beginning for printing, which will waste 3D printing consumables and extend the time required for printing.
[0069] Therefore, in some embodiments, the 3D printer can save the data of the current slice layer being printed. After a power outage, the 3D printer can trace back to the slice layer printed before the power outage based on the data of the current slice layer saved before the power outage, so as to continue printing.
[0070] However, the above-mentioned power-off resume printing method can only be accurate to a certain slice layer. If the 3D printer suddenly loses power in the middle of printing a slice layer, it is impossible to determine the specific printing progress of the 3D printer in the slice layer before the power outage, resulting in inaccurate resume printing.
[0071] In other embodiments, a capacitor or additional energy storage device may be added to the 3D printer. When the 3D printer is about to lose power, the capacitor or energy storage device will delay the power outage, and the 3D printer will store the current printing position during this period.
[0072] However, the above-mentioned power-off resume printing method requires the addition of additional energy storage devices such as capacitors, which will increase the hardware cost of the 3D printed parts and increase the complexity of the wiring of the 3D printer.
[0073] In view of the above, embodiments of the present application further provide a method for resuming printing after a power outage, a 3D printer, and a computer-readable storage medium.
[0074] Refer to FIG1 , which is a schematic diagram of a scenario of a power-off resume printing system provided in one embodiment of the present application.
[0075] The scenario shown in FIG1 includes: a 3D printer 10 and a print file storage device 20 .
[0076] The print file storage device 20 stores print files and is used to transmit the print files to the 3D printer 10 .
[0077] The print file storage device 20 can be a mobile storage device such as an SD card, USB flash drive, etc. that stores print files. The 3D printer 10 can be provided with a mobile storage slot, and the print file storage device 20 can be plugged into the mobile storage slot to transfer the print file to the 3D printer 10.
[0078] The print file storage device 20 can also transmit the print file to the 3D printer 10 via network communication.
[0079] The above-mentioned transmission method of the print file and the type of the print file storage device 20 are only examples. In actual application, they can be set according to needs, and the embodiments of the present application are not limited to this.
[0080] For example, the print file storage device 20 can also be a computer device. The user can input the digital model file of the entity to be printed, such as an STL file, into the print file storage device 20. The print file storage device 20 performs layering based on the digital model file to generate a print file, such as a G-code file, and then transmits the print file to the 3D printer 10.
[0081] The print file includes print instructions that can be parsed and executed by the 3D printer 10. The print instructions are used to control the 3D printer to print to form a physical object. For example, the print instructions can be instructions for controlling the printing speed of the 3D printer or instructions for controlling the displacement of the X, Y, and Z axes of the 3D printer, but are not limited thereto.
[0082] The 3D printer 10 includes a print control unit 11 and a print execution unit 12 .
[0083] The printing control unit 11 can automatically perform numerical calculations and / or information processing, and its hardware may include: a processor 111 and a non-volatile memory chip 112 .
[0084] 2 , the non-volatile memory chip 112 includes a power-off resume data storage area 1121 . The power-off resume data storage area 1121 includes at least a cursor position storage area. The cursor position storage area contains at least one data block for storing the cursor position.
[0085] The non-volatile memory chip 112 may be a small-capacity memory device to reduce costs.
[0086] The non-volatile memory chip 112 and the processor 111 are connected via a bus provided in the print control unit 11 so that the processor 111 can read the cursor position from the non-volatile memory chip 112 or write the cursor position to the non-volatile memory chip 112 during the execution of the power-off resume printing method.
[0087] Among them, the power-off resume printing method includes: obtaining a print file to be read; if the reading cursor of the 3D printer 10 moves a preset number of times in the print file, obtaining the current cursor position of the reading cursor in the print file; storing the current cursor position in a data block; if the 3D printer 10 is powered off and then powered on again during printing, searching the non-volatile memory chip 112 for the cursor position most recently stored before the 3D printer 10 was powered off; based on the cursor position most recently stored before the 3D printer 10 was powered off, determining the start position of the resumed printing of the print file.
[0088] In the embodiment of the present application, every time the reading cursor moves a preset number of times, the 3D printer will store the current cursor position, so that after the 3D printer is powered off and restarted, the 3D printer can trace back to the most recently stored cursor position before the power outage, thereby maximally approaching the printing position before the power outage, and then accurately continuing printing based on the printing position before the power outage.
[0089] Moreover, printing can be resumed after power failure without adding additional energy storage devices, reducing the cost and wiring complexity of the 3D printer.
[0090] The print control unit 11 also stores computer instructions, which are applications corresponding to the power-off resume printing method. When the computer instructions are running, the processor in the print control unit 11 can execute the computer instructions, that is, execute the power-off resume printing method.
[0091] The computer instructions may be stored in a computer-readable storage medium, which may be a non-volatile storage chip 112 or other computer-readable storage medium provided in the print control unit 11 .
[0092] The non-volatile memory chip 112 may be an electrically erasable programmable read-only memory (EEPROM).
[0093] EEPROM has the following characteristics:
[0094] 1. EEPROM has a long service life.
[0095] 2. EEPROM does not need to erase the original data when storing data, and can be directly overwritten.
[0096] 3. Its data area is relatively independent and will not affect other stored data.
[0097] 4. Fast writing speed, data writing is more timely.
[0098] In addition to EEPROM, the type of the memory chip may also be: flash memory (flash), embedded Multi Media Card (eMMC), or non-volatile random access memory (NVRAM), etc., but is not limited thereto.
[0099] In addition to the processor 111 and the non-volatile memory chip 112 described in Figure 1, the hardware included in the print control unit 11 can be set according to actual needs. For example, the print control unit 11 can also include a microprogrammed control unit (MCU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0100] In some embodiments, the print control unit 11 may also be configured to read a print instruction in a print file and control the print execution unit 12 to execute the read print instruction to generate a physical model.
[0101] The printing execution unit 12 includes the mechanical structure parts of the 3D printer, such as the nozzle component, XYZ three-dimensional transmission component, etc.
[0102] The components included in the printing execution unit 12 and their installation structure vary with the type and model of the 3D printer, and the embodiments of the present application are not limited to this.
[0103] Figure 3 is a flowchart of the steps of an embodiment of the method for resuming printing after power failure of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0104] The power-off resume printing method is applied to a 3D printer 10 . The 3D printer 10 includes a non-volatile memory chip 112 . The non-volatile memory chip 112 includes at least one data block for storing a cursor position.
[0105] Referring to FIG3 , the power-off resume printing method may include the following steps.
[0106] Step 301: Obtain the print file to be read.
[0107] For example, the print file to be read may be obtained from the print file storage device 20 .
[0108] After obtaining the print file, the 3D printer 10 can read the print instructions of the print file by moving the reading cursor in the print file, and control the print execution unit 12 based on the currently read print instructions, for example, controlling the speed and displacement of the motor in the XYZ three-dimensional transmission component, etc., to print and form a solid.
[0109] In some embodiments, as shown in FIG2 , the non-volatile memory chip 112 may further include a global variable area, which may be used to store global variables such as a power-off resume printing flag. The power-off resume printing flag indicates that the 3D printer 10 is in the power-off resume printing mode.
[0110] Before the 3D printer 10 reads the print file, the 3D printer 10 may store a power-off resume flag in the global variable area of the non-volatile memory chip 112 . After the 3D printer 10 finishes reading the print file and forms a complete printed product, the power-off resume flag may be cleared.
[0111] If the power-off resume printing flag is present in the 3D printer 10 , it indicates that the 3D printer 10 has not completed printing the print file and needs to resume printing after a power outage.
[0112] In some embodiments, the file name of the print file may also be stored in the non-volatile memory chip 112 , thereby facilitating the 3D printer 10 to determine the print file that needs to be resumed after power failure, and the print file to which the cursor position in the multiple data blocks belongs.
[0113] In some embodiments, before the 3D printer 10 reads the print file from the beginning of the print file, the data in each data block in the cursor position storage area can be cleared to avoid the historically stored data in the cursor position storage area from adversely affecting the subsequent step of determining the start position of the print file.
[0114] Step 302 : If the reading cursor of the 3D printer moves a preset number of times in the print file, the current cursor position of the reading cursor in the print file is obtained.
[0115] The 3D printer 10 may move the cursor once each time an instruction opcode or instruction operand is read, or once each time a character is read, or once each time a preset byte of a print file is read, or once each time an instruction is read. This embodiment of the present application is not limited to this.
[0116] The preset number of times can be set according to needs. The smaller the preset number of times, the more frequently the cursor position is stored, and the more accurate the positioning of the start position of continued printing is. The larger the preset number of times, the fewer cursor positions are stored, which is more conducive to improving the storage life of the non-volatile storage chip 112.
[0117] For example, the preset number of times may be 200, that is, the current cursor position is obtained every time the reading cursor moves 200 times.
[0118] Step 303: Store the current cursor position in a data block.
[0119] In some embodiments, the non-volatile memory chip 112 may include a data block for storing a cursor position, and the current cursor position may be stored in the data block.
[0120] In some other embodiments, as shown in FIG. 2 , the non-volatile memory chip 112 may include multiple data blocks for storing cursor positions.
[0121] Compared to using only one data block to store the cursor position, the embodiment of the present application uses multiple data blocks to store different cursor positions, thereby reducing the number of times data (cursor positions) are written in a single data block and improving the service life of the non-volatile memory chip 112.
[0122] In the case where the non-volatile memory chip 112 includes multiple data blocks for storing cursor positions, referring to FIG. 4 , storing the current cursor position in the data blocks may include the following steps.
[0123] Step 401: Determine a target data block for storing the current cursor position among multiple data blocks.
[0124] In some embodiments, a data block may be randomly selected from multiple data blocks as the target data block.
[0125] In some other embodiments, step 401 may include:
[0126] Step 4011: Determine whether the first data block is the last data block among multiple data blocks.
[0127] The first data block is a data block for storing a cursor position previous to the current cursor position among the multiple data blocks.
[0128] If the current cursor position is the first cursor position stored in the non-volatile memory chip 112 , the current cursor position may be stored in the first data block of the plurality of data blocks, such as data block 1 shown in FIG. 2 .
[0129] If the first data block is not the last data block among the multiple data blocks, execute step 4012; if the first data block is the last data block among the multiple data blocks, execute step 4013.
[0130] For example, it is assumed that the reading cursor reads an instruction opcode or an instruction operand each time it moves, and the 3D printer stores the current cursor position each time the reading cursor moves 200 times.
[0131] When reading the cursor movement 200 times, if a certain instruction operation code is read, the 3D printer can use the position of the instruction operation code as the current cursor position and store it in the first data block, for example, in data block 1 shown in FIG. 2 .
[0132] When reading the cursor movement 400 times, the position of the instruction opcode read when the cursor moves 200 times is the previous cursor position of the current cursor position, and the first data block is the first data block when reading the cursor movement 400 times. When reading the cursor movement 400 times, the first data block is not the last data block among multiple data blocks. Therefore, step 4012 can be executed.
[0133] Step 4012: Use the next data block after the first data block as the target data block.
[0134] For example, referring to FIG. 2 , when the reading cursor moves 400 times, the first data block is the first data block (data block 1 ), and the next data block of the first data block, ie, data block 2 , can be used as the target data block.
[0135] When the reading cursor moves 600 times, the first data block is data block 2, and the next data block of data block 2, such as data block 3, can be used as the target data block.
[0136] In the embodiment of the present application, the current cursor position is stored in the data block following the first data block, so that the 3D printer can store the cursor positions in the order of the time when the cursor reaches different cursor positions, thereby facilitating subsequent searches for the most recently stored cursor position before the 3D printer 10 is powered off.
[0137] If the first data block is the last data block among the multiple data blocks, execute step 4013.
[0138] Step 4013: Use the first data block among the multiple data blocks as the target data block.
[0139] For example, assume that the 3D printer stores the current cursor position every time the read cursor moves 200 times, and there are N data blocks in the non-volatile memory chip 112. When the read cursor moves 200(N+1) times, the first data block is data block N, that is, the first data block is the last data block in the non-volatile memory chip 112. In this case, the first data block in the non-volatile memory chip 112 can be used as the target data block.
[0140] Referring to Figure 2, assume that the 3D printer stores the current cursor position every time the cursor moves count times. When the cursor moves count times, the 3D printer's current cursor position is stored in data block 1. When the cursor moves 2*count times, the 3D printer's current cursor position is stored in data block 2. This continues in the order in which the cursor positions were acquired, until the cursor moves (N+1)count times, at which point the current cursor position is stored in data block 1.
[0141] This embodiment can realize the cyclic storage of each cursor position in the non-volatile memory chip 112, which not only solves the problem of the limited number of data blocks, but also makes the number of data writes to each data block in the non-volatile memory chip 112 as balanced as possible, avoiding the situation where a data block is written too many times, thereby further improving the service life of the storage area.
[0142] After the target data block is determined, step 402 may be executed.
[0143] Step 402: Store the current cursor position in the target data block.
[0144] In some embodiments, each data block may store not only the cursor position but also an index number of the stored cursor position, where the index number represents the time sequence in which the cursor position is stored by the 3D printer.
[0145] Specifically, after determining the target data block, the 3D printer 10 may also determine the index number of the current cursor position, which represents the time sequence in which the 3D printer stores the current cursor position; and store the index number of the current cursor position in the target data block.
[0146] In some embodiments, determining the index number of the current cursor position may include: if the reading cursor moves a preset number of times in the print file for the first time, using a preset initial index value as the index number of the current cursor position.
[0147] The initial index value can be set according to application requirements, for example, it can be set to 0, and this embodiment of the present application is not limited to this.
[0148] If the read cursor moves a preset number of times in the print file multiple times, the index number of the previous cursor position of the current cursor position in the data block is obtained, and the index number of the previous cursor position is added to the preset index increment value to obtain the index number of the current cursor position.
[0149] The index increment value can also be set according to application requirements, for example, it can be set to 1, which is not limited in the embodiments of the present application.
[0150] For example, an index number variable index can be set. When the reading cursor moves a preset number of times in the print file for the first time, index = initial index value. Thereafter, each time the reading cursor moves a preset number of times in the print file, the index number variable is incremented by the index increment value (i.e., index = index + index increment value). The index number variable after the increment operation is used as the index number of the current cursor position.
[0151] Assume that the initial index value is 0 and the index increment value is 1. If the cursor is read for the first time and moves the preset number of times in the print file, the index number of the current cursor position is the initial index value 0, and the initial index value 0 is stored in data block 1. If the cursor is read for the second time and moves the preset number of times in the print file, the index number of the previous cursor position (i.e., the initial index value 0) is added to the index increment value 1 to obtain the index number 1 of the current cursor position, and the index number 1 of the current cursor position is stored in data block 2, and so on.
[0152] Step 304: If the 3D printer is powered on again after being powered off during printing, the non-volatile memory chip is searched for the cursor position that was most recently stored before the 3D printer was powered off.
[0153] Among them, the step of identifying that the 3D printer 10 is powered on again after being powered off in the middle of printing may include: if after the 3D printer 10 is powered on, a power-off resume mark is present in the non-volatile memory chip 112, and a print file is stored in the 3D printer 10, confirming that the 3D printer 10 is powered on again after being powered off in the middle of printing.
[0154] In some embodiments, when an index number is also stored in the data block, the cursor position most recently stored before the 3D printer 10 is powered off can be searched in multiple data blocks based on the index number stored in each data block of the non-volatile memory chip 112 .
[0155] Furthermore, when the index number increases gradually, the 3D printer 10 can search for the data block with the largest index number based on the index numbers stored in each data block of the non-volatile memory chip 112; and use the cursor position stored in the data block with the largest index number as the most recently stored cursor position before the 3D printer 10 is powered off.
[0156] Step 305 : determining a resume printing position for the print file based on the cursor position that was most recently stored before the 3D printer was powered off.
[0157] In some embodiments, the last instruction executed by the 3D printer 10 before power failure can be determined based on the last cursor position stored before power failure of the 3D printer 10, and then the starting position of the next instruction after the last instruction executed can be used as the starting position for continued printing.
[0158] After step 305, the 3D printer 10 may read the printing instructions in the print file from the start printing position, for example, by moving the cursor to the start printing position, reading the printing instructions from the start printing position, and then continuing 3D printing on the semi-finished product based on the read printing instructions.
[0159] Before continuing 3D printing, the state of the printing execution unit 12 of the 3D printer can be restored to the state before the power failure to facilitate the subsequent 3D printing. For example, the nozzle in the printing execution unit 12 is heated, the Z axis is raised, and the X and Y axes are reset.
[0160] The embodiment of the present application can achieve the goal of resuming printing after a power outage in a 3D printer without adding additional power supply detection and energy storage hardware, thereby reducing hardware costs.
[0161] In addition, the cursor is read and moved a preset number of times each time a document is printed, and the cursor position is stored, which can be as close to the printing position before the power outage as possible, thereby being able to accurately restore the position before the power outage.
[0162] The cursor position is stored in a circular storage manner, which can increase the service life of the cursor position storage area.
[0163] Based on the same concept as the power-off resume printing method in the above-mentioned embodiment, the present application also provides a power-off resume printing device, which can be used to perform the above-mentioned power-off resume printing method. For ease of explanation, the structural diagram of the power-off resume printing device embodiment only shows the parts related to the embodiment of the present application. Persons skilled in the art will understand that the illustrated structure does not constitute a limitation of the device, and the device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0164] As shown in Figure 5, the power-off resume printing device includes a reading module 501, a storage module 502, and a resume printing module 503. In some embodiments, the above modules may be programmable software instructions stored in a memory and executed by a processor. It is understood that in other embodiments, the above modules may also be program instructions or firmware embedded in the processor.
[0165] It should be noted that the same terms, related terms and their specific explanations and functions in the above embodiments of the power-off resume printing method can also be applied to the following functional introduction of each module 501 to 503. To save space and avoid repetition, they will not be repeated here.
[0166] The reading module 501 is configured to obtain a print file to be read, and if a reading cursor of the 3D printer moves a preset number of times in the print file, obtain a current cursor position of the reading cursor in the print file;
[0167] The storage module 502 is configured to store the current cursor position in the data block;
[0168] The resume printing module 503 is used to search the non-volatile memory chip for the cursor position most recently stored before the 3D printer is powered off and then powered on again if the 3D printer is powered off midway; and determine the resume printing start position of the print file based on the cursor position most recently stored before the 3D printer is powered off.
[0169] FIG6 is a schematic diagram of a printing control unit 11 in a 3D printer provided in an embodiment of the present application.
[0170] The print control unit 11 includes a memory 113, a processor 111, a computer program 114 stored in the memory 113 and executable by the processor 111, and a power-off resume printing data storage area 1121 for storing power-off resume printing data. When the processor 111 executes the computer program 114, the steps of the power-off resume printing method described above are implemented, such as steps 301 to 304 shown in FIG. 1 .
[0171] For example, the computer program 114 can also be divided into one or more modules / units, which are stored in the memory 113 and executed by the processor 111. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 114 in the print control unit 11. For example, the computer program 114 can be divided into the reading module 501, the storage module 502, and the continuous printing module 503 shown in Figure 5.
[0172] Those skilled in the art will understand that the schematic diagram is merely an example of the print control unit 11 and does not constitute a limitation on the print control unit 11. The print control unit 11 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the print control unit 11 may also include input and output devices, network access devices, buses, etc.
[0173] The processor 111 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, a single-chip microcomputer, or the processor 111 may be any conventional processor.
[0174] The memory 113 can be used to store computer programs 114 and / or modules / units. The processor 111 implements various functions of the printing control unit 11 by running or executing computer programs and / or modules / units stored in the memory 113 and calling data stored in the memory 113.
[0175] The memory 113 may include a high-speed random access memory and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile storage chip 112.
[0176] The memory 113 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, an application program required for at least one function (e.g., a sound playback function, an image playback function, etc.). The data storage area may store data generated based on the use of the print control unit 11 (e.g., the cursor position storage area shown in FIG. 2 ). For example, the data storage area may include a power-off resume data storage area 1121, which may be located in the non-volatile memory chip 112.
[0177] If the modules / units integrated in the print control unit 11 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0178] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative. For example, the division of the units described is merely a logical function division, and other division methods may be used in actual implementation.
[0179] In addition, the functional units in the various embodiments of the present application may be integrated into the same processing unit, or each unit may exist physically separately, or two or more units may be integrated into the same unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0180] It is obvious to those skilled in the art that the present application is not limited to the details of the above-mentioned exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or electronic devices stated in the electronic device claim can also be implemented by the same unit or electronic device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not limiting. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that the technical solution of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A method for continuing printing after power failure, applied to a 3D printer, characterized in that: The 3D printer includes a non-volatile memory chip, the non-volatile memory chip includes at least one data block for storing a cursor position, and the power-off resume printing method includes: Get the print file to be read; If the reading cursor of the 3D printer moves a preset number of times in the print file, obtaining a current cursor position of the reading cursor in the print file; Storing the current cursor position in the data block; If the 3D printer is powered on again after being powered off in the middle of printing, the cursor position most recently stored before the 3D printer was powered off is searched in the non-volatile storage chip; The starting position of the print file is determined based on the cursor position that was most recently stored before the 3D printer was powered off.
2. The power-off resume printing method according to claim 1, characterized in that: The non-volatile storage chip includes a plurality of data blocks for storing cursor positions, and storing the current cursor position in the data blocks includes: Determine a target data block for storing the current cursor position among the plurality of data blocks; The current cursor position is stored in the target data block.
3. The power-off resume printing method according to claim 2, characterized in that: Determining a target data block for storing the current cursor position among the plurality of data blocks comprises: If the first data block is not the last data block among the multiple data blocks, the next data block of the first data block is used as the target data block, wherein the first data block is the data block for storing the previous cursor position of the current cursor position among the multiple data blocks.
4. The power-off resume printing method according to claim 3, characterized in that: Determining a target data block for storing the current cursor position among the plurality of data blocks comprises: If the first data block is the last data block among the multiple data blocks, the first data block among the multiple data blocks is used as the target data block.
5. The power-off resume printing method according to claim 2, characterized in that: After determining a target data block for storing the current cursor position among the plurality of data blocks, the method further includes: Determine an index number of the current cursor position, wherein the index number represents a time sequence in which the 3D printer stores the current cursor position; Storing the index number of the current cursor position in the target data block; The searching the non-volatile storage chip for the cursor position that was most recently stored before the 3D printer was powered off includes: Based on the index number stored in each data block of the non-volatile memory chip, the cursor position stored most recently before the 3D printer is powered off is searched in the plurality of data blocks.
6. The power-off resume printing method according to claim 5, characterized in that: The step of determining the index number of the current cursor position includes: If the read cursor moves a preset number of times in the print file for the first time, a preset initial index value is used as the index number of the current cursor position; If the read cursor moves a preset number of times in the print file multiple times, obtaining the index number of the previous cursor position of the current cursor position in the data block, and adding the index number of the previous cursor position to a preset index increment value to obtain the index number of the current cursor position; The step of searching the data blocks for the cursor position last stored before the 3D printer is powered off based on the index number stored in each data block of the non-volatile storage chip comprises: Based on the index numbers stored in the data blocks of the non-volatile memory chip, searching for the data block to which the maximum index number belongs; The cursor position stored in the data block to which the maximum index number belongs is used as the cursor position most recently stored before the 3D printer is powered off.
7. The power-off resume printing method according to any one of claims 1 to 6, characterized in that: The power-off resume printing method further comprises: Before the 3D printer reads the print file, storing the power-off resume printing flag of the 3D printer in the non-volatile storage chip; After the 3D printer completes printing based on the print file, clearing the power-off resume printing flag; Confirm that the 3D printer is powered on again after being powered off during printing, including: If after the 3D printer is powered on, a power-off resume mark is present in the non-volatile storage chip, and the print file is stored in the 3D printer, it is confirmed that the 3D printer is powered on again after a power outage during printing.
8. The power-off resume printing method according to any one of claims 1 to 7, characterized in that: After determining the starting position of the print file based on the cursor position last stored before the 3D printer is powered off, the method further includes: Read the printing instruction in the printing file from the start-to-print position; 3D printing is continued on the semi-finished product based on the read printing instruction, where the semi-finished product is an entity formed by the 3D printer printing based on the printing file before power failure.
9. A 3D printer, characterized in that: The 3D printer comprises: A non-volatile memory chip, wherein the non-volatile memory chip includes at least one data block for storing a cursor position; A processor, wherein the processor is connected to the non-volatile memory chip via a bus provided in the 3D printer, and the processor is used to execute the power-off resume printing method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the power-off resume printing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
3D printer capable of printing continuously at outage and method for controlling 3D printer to continue printing at outage
CN103921446A
Three-dimensional printing device and continuous printing method thereof
CN108621433A
Control system and method for power-off reset continuous printing of FDM 3D printer
CN110039767A
FLASH data storage method and system, electronic equipment and medium
CN116954496A
Power-off continuous printing method, 3D printer and computer readable storage medium
CN117644656A