A control method and system applied to an industrial sewing machine
By automatically identifying and accurately parsing pattern file formats, intelligent control of industrial sewing machines is achieved, solving the problems of format mismatch and hardware limitations, and improving sewing quality and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JINXIN ELECTRONICS
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-29
AI Technical Summary
Existing industrial sewing machine controllers lack a unified format recognition and robust parsing mechanism, leading to parsing errors in non-standard or slightly damaged pattern files, difficulty in handling mixed-encoded stitch data and auxiliary instructions, and limitations in hardware computing power make it difficult to perform overall path planning and motion optimization, thus affecting sewing quality and efficiency.
By automatically recognizing the pattern file format, accurately parsing the stitch data and converting it into motion control signals, and dynamically adjusting it in conjunction with real-time process parameters, precise synchronization between mechanical actions and pattern design is achieved. Auxiliary instructions are integrated and path planning and motion optimization are performed.
It improves the intelligence level of industrial sewing machines, ensures stitch quality and speed, and enhances the adaptability and production efficiency of the equipment.
Smart Images

Figure CN122105753A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sewing control technology, and in particular to a control method and system for industrial sewing machines. Background Technology
[0002] As the manufacturing industry transforms and upgrades towards intelligence and flexibility, industrial sewing equipment is evolving from traditional mechanized actuators into intelligent terminals that integrate precision motion control, complex data processing, and human-machine interaction. Especially in the fields of clothing, home textiles, and automotive interiors, the market demand for personalized and complex pattern sewing is growing. This requires sewing machines to not only execute preset patterns at high speed and accurately, but also to have strong file compatibility, process adaptability, and convenient remote management functions in order to achieve digital and networked control of the production process.
[0003] The core of achieving the above-mentioned intelligence lies in using an industrial sewing machine controller to accurately parse the pattern file and convert the data into high-precision mechanical movements. Most of the current mainstream controllers use microcontroller units (MCUs) or application processors with limited performance as the main control chip, and are equipped with dedicated or simplified real-time operating systems. In terms of pattern file processing, parsing programs for a single or a small number of fixed formats are usually used, and the execution process is mostly sequential reading and direct driving.
[0004] However, with the popularization of embroidery, complex quilting, and other techniques, pattern file formats are becoming increasingly diverse. Solutions based on the traditional architecture have the following drawbacks: First, traditional controllers lack a unified format recognition and robust parsing mechanism, resulting in low tolerance for non-standard or slightly damaged pattern files. They are prone to execution interruptions or pattern distortion due to format mismatches or header information errors. Furthermore, they struggle to handle mixed-encoded stitch data and auxiliary instructions within the file, leading to misaligned movements. Second, hardware computing power limitations make it difficult to perform overall path planning and motion optimization before sewing, affecting stitch quality at high speeds. Additionally, it is difficult to integrate real-time process parameter adaptation functions, relying on operator experience for adjustments. Therefore, the level of intelligence in industrial sewing machines is poor. Summary of the Invention
[0005] In view of the above-mentioned shortcomings in the existing technology, the purpose of this invention is to provide a control method for industrial sewing machines, which has the feature of improving the intelligence level of industrial sewing machines.
[0006] The above-mentioned objective of this invention is achieved through the following technical solution: A control method for industrial sewing machines, comprising: In response to a sewing request, read the target pattern file to be executed; Identify the format identifier of the target pattern file; Based on the format identifier, the target pattern file is parsed to obtain a stitch data sequence; The stitch data sequence is subjected to drive conversion processing to obtain motion control signals; Obtain auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information; The actuator that controls the industrial sewing machine performs sewing operations based on the control command queue.
[0007] By adopting the above technical solution, firstly, pattern files are automatically identified and adapted based on a unified format library, effectively solving the problems of execution interruption and pattern errors caused by poor format compatibility in traditional solutions. Then, by accurately decoding stitch data and converting it into smooth motion control signals, and integrating auxiliary instruction information into the control instruction queue under accurate timing, precise synchronous mapping between mechanical actions and pattern design is achieved, avoiding action misalignment and pattern distortion. Finally, overall path planning and motion optimization are performed before sewing, and dynamic adjustments are made in conjunction with real-time process parameters, thereby improving sewing speed while ensuring stitch consistency and quality, and thus improving the intelligence level, reliability, and production efficiency of industrial sewing machines.
[0008] Preferably, the method of identifying the format identifier of the target pattern file includes: The target pattern file is subjected to binary stream extraction to obtain the first N bytes of the target pattern file, which are used as the file header information, where N is a positive integer between 10 and 20; The file header information is subjected to byte feature extraction to obtain the file feature code; The file feature code is matched with a preset format feature library, wherein the format feature library stores standard feature codes corresponding to various file formats. If a standard feature code matching the file feature code is found in the preset format feature library, the format of the pattern file corresponding to the standard feature code is used to determine the format identifier of the target pattern file.
[0009] By adopting the above technical solution, the file type can be accurately determined by reading the file header features and matching them with a preset format feature library. This avoids parsing errors or execution interruptions caused by manual selection or format misjudgment in traditional solutions, thereby improving the adaptability and compatibility of industrial sewing machines.
[0010] Preferably, the step of parsing the target pattern file based on the format identifier to obtain the stitch data sequence includes: Based on the format identifier, the data decompression algorithm corresponding to the format identifier is invoked; Based on the data decompression algorithm, the stitch data segments in the target pattern file are decoded to obtain multiple pairs of relative displacements; Based on the preset mapping relationship, the coordinate axis direction of each of the relative displacement pairs is corrected to obtain the mechanical displacement value corresponding to the industrial sewing machine coordinate system; Obtain the pulse equivalent parameters of the industrial sewing machine, and convert each mechanical displacement value into a corresponding pulse coordinate based on the pulse equivalent parameters; The needle mark data sequence is constructed based on multiple pulse coordinates.
[0011] By adopting the above technical solution, the corresponding decompression algorithm is called according to the identified file format to accurately decode the compressed stitch data in the file, effectively restore the relative displacement relationship between stitches, and map the abstract file coordinates into pulse control signals that the sewing machine can directly execute through coordinate direction correction and pulse equivalent conversion, thus ensuring the physical consistency between the data parsing results and the mechanical actuator.
[0012] Preferably, the step of obtaining the pulse equivalent parameters of the industrial sewing machine and converting each mechanical displacement value into a corresponding pulse coordinate based on the pulse equivalent parameters includes: Obtain the pulse equivalent parameter of the actuator driving the industrial sewing machine, wherein the pulse equivalent parameter is the number of control pulses required to drive the actuator to generate a unit physical displacement; The theoretical number of pulses is obtained by multiplying the mechanical displacement value by the pulse equivalent parameter. The theoretical number of pulses is used as the pulse coordinate corresponding to the mechanical displacement value that drives the actuator to move.
[0013] By adopting the above technical solution and introducing the key mechanical parameter of pulse equivalent, a definite proportional relationship between displacement and control pulse is established, ensuring that every displacement command in the pattern file can be accurately quantified into a pulse signal that the sewing machine stepper motor can respond to. This fundamentally guarantees the dimensional accuracy and positional accuracy of the sewing pattern, avoids the problem of overall pattern scaling or deformation caused by unit mismatch or conversion error, and further improves the intelligence level of industrial sewing machines.
[0014] Preferably, the step of performing drive conversion processing on the stitch data sequence to obtain motion control signals includes: Based on the stitch data sequence, an initial motion path is generated; The motion segments formed by adjacent stitch points in the initial motion path are smoothed to obtain a smoothed continuous motion trajectory. Based on the continuous motion trajectory and combined with preset motion control parameters, a motion control signal is generated to drive the actuator of the industrial sewing machine.
[0015] By adopting the above technical solution, the discrete stitch point sequence is smoothed, which can effectively eliminate problems such as frequent motor start-stop and speed change caused by direct jumps between points. The motion path that may have been jerky is optimized into a continuous and smooth trajectory. This not only reduces mechanical vibration and noise and improves the stability of the sewing process, but also achieves more accurate needle positioning and more consistent stitch quality through the optimized motion control signal.
[0016] Preferably, the step of acquiring auxiliary instruction information from the target pattern file and generating a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information includes: The auxiliary instruction information in the target pattern file is parsed to obtain a structured auxiliary instruction set, wherein the structured auxiliary instruction set includes instruction type and associated trigger position; Based on the instruction type, the corresponding mechanical motion control instruction is determined from the preset mechanical motion instruction library; Based on the needle action timing in the motion control signal, and combined with the preset needle insertion and feeding coordination relationship, feed dog drive command and needle bar movement command are generated. Based on the feed dog drive command and the needle bar movement command, an initial sewing command sequence is constructed; Based on the associated trigger position, the mechanical motion control command is inserted into the corresponding timing position of the initial sewing command sequence to obtain the control command queue of the industrial sewing machine.
[0017] By adopting the above technical solution, the advanced auxiliary process instructions in the pattern file are accurately mapped and integrated into the underlying control instruction flow composed of basic sewing actions. This not only achieves seamless coordination between auxiliary actions and core sewing actions in terms of timing, ensuring the integrity and continuity of complex pattern execution, but also improves the industrial sewing machine's ability to process different instruction types and its execution reliability through a unified instruction library mapping mechanism.
[0018] Preferably, before the actuator controlling the industrial sewing machine performs the sewing operation based on the control command queue, it includes: Obtain process adaptation parameters, wherein the process adaptation parameters include suture tension parameters; Based on the suture tension parameters, the synchronization timing between the feed dog drive command and the needle bar movement command in the control command queue is offset compensation, and a timing-adapted collaborative control command is generated. The corresponding instruction in the control instruction queue is updated based on the cooperative control instruction.
[0019] By adopting the above technical solution and introducing process parameters such as thread tension, the timing of the coordinated action of the two core actions of needle bar needle insertion and feed dog feeding can be dynamically compensated. This can effectively eliminate quality problems such as skipped stitches, broken stitches, or uneven stitch tightness caused by different fabric characteristics and thread materials. It improves the adaptability to different sewing scenarios, enhances the consistency and reliability of sewing products while ensuring sewing efficiency, and thus improves the intelligence level of industrial sewing machines.
[0020] The second objective of this invention is to provide a control system for industrial sewing machines, which improves the intelligence level of industrial sewing machines.
[0021] The second objective of this invention is achieved through the following technical solution: A control system for industrial sewing machines, comprising: The file reading module is used to respond to sewing requests and read the target pattern file to be executed. The format recognition module is used to identify the format identifier of the target pattern file; The file parsing module is used to parse the target pattern file based on the format identifier to obtain the stitch data sequence; The drive conversion module is used to perform drive conversion processing on the stitch data sequence to obtain motion control signals; The instruction synthesis module is used to acquire auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information. The execution control module is used to control the actuator of the industrial sewing machine to perform sewing operations based on the control instruction queue.
[0022] By adopting the above technical solution, each module sequentially completes format recognition, data parsing, motion planning, and instruction synthesis, forming a clear and efficient processing link. This not only ensures the accuracy of pattern parsing and the reliability of execution, but also improves the response speed and overall intelligence level through software and hardware collaboration. This enables industrial sewing machines to flexibly adapt to various file formats and complex process requirements, enhancing the adaptability, stability, and production efficiency of the equipment in production.
[0023] The third objective of this invention is to provide an electronic device that improves the level of intelligence in industrial sewing machines.
[0024] The above-mentioned objective three of this invention is achieved through the following technical solution: An electronic device includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described above for the control method applied to an industrial sewing machine.
[0025] The fourth objective of this invention is to provide a computer-readable storage medium capable of storing corresponding programs, which facilitates the improvement of the intelligence level of industrial sewing machines.
[0026] The fourth objective of this invention is achieved through the following technical solution: A computer-readable storage medium storing a computer program that can be loaded by a processor and executed by any of the above-described control methods for industrial sewing machines.
[0027] In summary, the present invention has at least one of the following beneficial technical effects: This invention achieves precise synchronization between mechanical actions and pattern design by automatically recognizing file formats and accurately parsing data, effectively avoiding execution interruptions and pattern distortion. Through overall path planning and real-time process adjustment, it improves sewing efficiency while ensuring stitch quality, thereby enhancing the intelligence level and production reliability of sewing machines. This invention effectively overcomes the parsing difficulties caused by file size compression by decoding the compressed stitch data and accurately restoring it to relative displacement, ensuring the completeness and accurate extraction of pattern information. Furthermore, by converting logical coordinates to pulse coordinates and correcting the direction, it achieves precise alignment between the design data and the mechanical execution coordinate system, fundamentally guaranteeing the dimensional accuracy and positional consistency of the sewing pattern. This invention achieves automation and precise triggering of non-sewing actions in the sewing process by accurately extracting and synchronously executing various auxiliary instructions, effectively improving operational continuity and process integrity. At the same time, it dynamically maps process parameters such as speed adjustment into motor control signals, enabling the sewing machine to adaptively execute local process requirements in complex patterns, thereby improving the level of production intelligence and efficiency while ensuring sewing quality. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating the steps of a control method for an industrial sewing machine provided in Embodiment 1 of the present invention.
[0029] Figure 2 This is a structural block diagram of a control system for an industrial sewing machine provided in Embodiment 2 of the present invention.
[0030] Figure 3 This is a design block diagram of the core controller provided in Embodiment 2 of the present invention.
[0031] Figure 4 This is a schematic diagram of the main chip provided in Embodiment 2 of the present invention. Detailed Implementation
[0032] This invention provides a control method and system for industrial sewing machines, addressing the technical problems of existing technologies. Firstly, traditional controllers lack a unified format recognition and robust parsing mechanism, resulting in low tolerance for non-standard or slightly damaged pattern files. They are prone to execution interruptions or pattern distortion due to format mismatches or header information errors, and struggle to handle mixed-encoded stitch data and auxiliary instructions in files, leading to misaligned actions. Secondly, hardware computing power limitations hinder overall path planning and motion optimization before sewing, affecting stitch quality at high speeds. Furthermore, the system struggles to integrate real-time process parameter adaptation functions, relying on operator experience for adjustments. These issues contribute to the poor intelligence level of industrial sewing machines. This invention aims to improve the intelligence level of industrial sewing machines.
[0033] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0034] It should be noted that, in the embodiments of this invention, when the relevant object information and other related data are used in specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this invention involve data related to an object, it must be obtained with the object's authorization and consent, the authorization and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the individual's consent; if sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the object's authorization and consent.
[0035] It should be noted that the terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this disclosure.
[0036] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship. Example
[0037] Please see Figure 1 The present invention provides a control method for industrial sewing machines, comprising: Step 101: Respond to the sewing request and read the target pattern file to be executed.
[0038] A sewing request refers to a control instruction initiated by a user or host computer system to require an industrial sewing machine to perform a specific pattern sewing operation. This includes, but is not limited to, unique identifiers of the pattern file, such as file name and ID, as well as optional start parameters, such as sewing speed and origin offset.
[0039] The target pattern file refers to the specific pattern data file to be parsed and executed in this sewing operation. The file is a binary or specially encoded text file, including but not limited to the geometry of the sewing pattern, non-sewing actions during the sewing process, such as thread cutting, color changing, presser foot lifting and other auxiliary instructions, as well as the file's metadata, such as format identifier, total number of stitches, pattern size, version information, process reference parameters, total number of stitches, logical dimensions and ranges, etc.
[0040] In this embodiment of the invention, the user browses and selects a pattern file pre-stored locally or on an external device through a touch screen human-machine interface connected to the core controller, or receives a sewing task instruction issued by a remote production management system through an Ethernet / Wi-Fi network, responds to the instruction and generates a sewing request, and locates and loads the corresponding target pattern file from the local storage medium.
[0041] Step 102: Identify the format identifier of the target pattern file.
[0042] Furthermore, step 102 may include the following sub-steps: S11. Extract the binary stream from the target pattern file to obtain the first N bytes of the target pattern file as the file header information, where N is a positive integer between 10 and 20.
[0043] Binary stream extraction refers to the process of reading binary data from the original byte sequence of a target pattern file, without any interpretation or decoding, according to a specified starting position and length.
[0044] The file header information refers to a fixed-length data segment with a specific structure and meaning at the beginning of the target pattern file. It is used to identify the file format and store key metadata. The key metadata includes, but is not limited to, the total number of stitches in the pattern, which is used to determine the total number of sewing steps, the logical size of the pattern (maximum offset of the X / Y axis), which is used to determine whether it exceeds the sewing range of the sewing machine, process reference parameters such as default stitch density, sewing speed limit, and format version for adapting to different versions of compression algorithms (the old version of DST and the new version of DST have different compression rules).
[0045] It is worth mentioning that the header information of common DST format pattern files starts with a fixed byte "\x00\x00\x00", followed by metadata fields such as version number and pattern name.
[0046] It should be noted that the controller treats the target pattern file as a continuous byte stream. Through the file access interface, it directly obtains a binary data block of N bytes starting from the starting offset 0. Preferably, N=16 bytes. This operation does not involve any preset parsing of the file content format or encoding method. It only performs low-level data transfer to obtain the original data fragment containing key identifiers such as file header identifier and version information.
[0047] In this embodiment of the invention, after the controller completes the loading of the target pattern file, it reads the first N bytes of raw data from the starting position of the file from the memory buffer as the file header information.
[0048] It should be noted that after obtaining the file header information, a verification mechanism will be invoked to perform preliminary integrity verification on the header information. For example, the validity of the starting magic number (MagicNumber) will be verified, the length will be checked to ensure that the extracted header information data is basically complete and that no serious errors have occurred during transmission or reading.
[0049] If any of the verification conditions, such as mismatched magic number, insufficient length, or verification failure, are not met, it is determined that the file header information may be corrupted or have an incorrect format. The controller will then directly determine that the target pattern file is invalid and stop the subsequent parsing process. At the same time, it will return the corresponding error message to the user through the human-machine interface or network interface to avoid performing incorrect actions or causing equipment malfunction.
[0050] S12. Extract byte features from the file header information to obtain the file feature code.
[0051] Byte feature extraction refers to the process of extracting a specific byte sequence or structure from the binary file header information that can uniquely or strongly represent the corresponding fancy file format.
[0052] File signature refers to one or more segments of binary data obtained through the byte feature extraction process. This data serves as a unique identifier for the file format and is used to compare and match with a preset format feature library to determine the specific format type of the target pattern file.
[0053] It is worth mentioning that after the controller obtains the file header information, it performs byte feature extraction on the binary data block. The extraction rules are set according to the predefined format specifications. For example, for a file that needs to be identified as being in DST format, the controller can extract the first 3 bytes of its header information (i.e., "\x00\x00\x00") as the basic feature, and further extract several bytes in the subsequent offset position that identify the version number. These bytes are combined in a predetermined order to form the file feature code of the file in the current identification process.
[0054] It should be noted that the extraction rules can be set according to actual needs.
[0055] In this embodiment of the invention, byte features are extracted from the file header information to obtain a file feature code. This feature code will be used to match the file with the standard feature code in the format feature library to achieve automatic identification of the file type.
[0056] S13. Match the file feature code with the preset format feature library, which stores the standard feature codes corresponding to various file formats.
[0057] The format feature library refers to a database pre-stored in the controller. The database includes standard feature codes and associated format identifiers for various known fancy file formats, such as DST, EMB, PES, and EXP. The standard feature codes are byte feature sequences with high distinguishability, which are statistically derived from the official specifications of each format or actual files.
[0058] Standard signature codes refer to byte feature sequences that are predefined and stored in a format feature library during the identification of fancy file formats, representing the uniqueness or high typicality of a particular fancy file format.
[0059] Understandably, each standard signature is strictly bound to a known fancy file format. It is an abstraction of the official specification of the format or a large number of actual samples, located at a fixed position in the file header or conforming to a specific structure of binary pattern. For example, for the DST format, the standard signature can usually be described as the first three bytes of the file being \x00\x00\x00, and the 4th to nth bytes following it conforming to the version number encoding rules. The role of the standard signature is to serve as a comparison benchmark. When the file signature extracted from the target file is consistent with or highly similar to it, it can be determined that the target file belongs to that format.
[0060] In this embodiment of the invention, after generating the file feature code of the target pattern file, the controller uses it as a query key to perform a search and matching in the format feature library. The matching process can employ methods such as byte-by-byte comparison, hash lookup, or similarity calculation based on feature vectors.
[0061] S14. If a standard feature code that matches the file feature code is found in the preset format feature library, then the format of the pattern file corresponding to the standard feature code is used to determine the format identifier of the target pattern file.
[0062] A format identifier is a symbol or code used to uniquely identify a certain file format.
[0063] In this embodiment of the invention, if a standard feature code that is completely identical to the current file feature code or meets the preset similarity conditions is found in the database, the matching is determined to be successful, and the format identifier corresponding to the standard feature code is extracted as the final format identifier of the target pattern file.
[0064] It should be noted that if a standard feature code that is consistent with or similar to the file feature code cannot be matched in the preset format feature library, the controller determines that the target pattern file format is not supported or the file header may have a non-standard format or be seriously damaged. At this time, the controller will output an error message that the format is not supported or the file is damaged through the human-machine interface or network interface, and stop the subsequent parsing and execution process to avoid erroneous actions or device abnormalities due to format mismatch.
[0065] Step 103: Based on the format identifier, parse the target pattern file to obtain the stitch data sequence.
[0066] Furthermore, step 103 may include the following sub-steps: S21. Based on the format identifier, call the data decompression algorithm corresponding to the format identifier.
[0067] Data decompression algorithms refer to algorithms designed or adapted for specific pattern file formats, used to restore the compressed and encoded stitch data in a file to the original relative displacement sequence. The algorithm strictly corresponds to the format identifier. For example, the DST format corresponds to the differential encoding decompression algorithm, while the EMB format corresponds to the run-length decoding algorithm.
[0068] Understandably, after determining the format identifier of the target pattern file, the controller searches for and calls the data decompression algorithm uniquely bound to it from the preset algorithm library based on the identifier. The algorithm library stores decompression routines for different formats, such as DST, EMB, and PES, including specific decoding rules, byte parsing order, and displacement increment calculation methods. For example, if the format identifier is DST_V1, the algorithm applicable to DST version 1 is called. This algorithm knows that each byte in the DST data segment is divided into high 4 bits and low 4 bits, which represent the relative displacement increment in the X and Y directions (value range -7 to +7).
[0069] In this embodiment of the invention, based on the format identifier, the correct decompression algorithm is invoked to ensure that the compressed binary stitch data can be accurately restored into a meaningful sequence of displacement pairs according to the original encoding rules of the format.
[0070] S22. Based on the data decompression algorithm, decode the stitch data segment in the target pattern file to obtain multiple pairs of relative displacements.
[0071] The stitch data segment refers to the data area in the target pattern file that is specifically used to store compressed and encoded continuous stitch displacement information, following the file header information.
[0072] A relative displacement pair refers to a set of values representing the movement of a single stitch point relative to its preceding stitch point in a two-dimensional plane, typically expressed as: Its unit is the smallest logical displacement unit defined in the pattern file, such as 0.1 mm.
[0073] Understandably, after the controller invokes the data decompression algorithm corresponding to the format identifier, it locates the beginning of the stitch data segment in the target pattern file. The algorithm then decodes the compressed data according to the data organization method specified by the format, such as reading byte by byte or parsing block by block. Taking DST format as an example: Each byte of the stitch data segment is read sequentially. The high 4 bits of the byte are parsed as the relative displacement increment in the X direction, and the low 4 bits are parsed as the relative displacement increment in the Y direction. They are then converted into signed integer displacement values according to the encoding rules. Each byte is decoded to obtain a pair of relative displacement values. This pair of values represents the minimum logical displacement that the sewing machine actuator needs to complete on the X and Y axes to move from the previous point to the current point. The encoding rule can be to map a 4-bit binary number to an integer value from -7 to +7.
[0074] For example, if the binary representation of a read byte is 0x36 (corresponding to decimal 54, binary 00110110), then its high 4 bits 0011 correspond to decimal 3, and its low 4 bits 0110 correspond to decimal 6. According to the DST mapping rule, the high 4 bits of value 3 represent a relative displacement of +3 units in the X direction, and the low 4 bits of value 6 represent a relative displacement of -2 units in the Y direction (the mapping rule is usually: values 0-7 correspond to displacements of +0 to +7, values 8-15 correspond to displacements of -8 to -1, so 6 corresponds to -2). Therefore, the decoded relative displacement pair is ( =+3, =-2), which means that the stitch point should move 0.3 mm in the positive X direction and 0.2 mm in the negative Y direction relative to the previous point.
[0075] In this embodiment of the invention, by precisely calling and executing a decompression algorithm that matches the format identifier, the compressed stitch data stream in the target pattern file is restored bit by bit into a series of ordered pairs of relative displacements.
[0076] It is worth mentioning that during the decoding process, the controller implements a fault-tolerance mechanism. If a small number of invalid bytes that do not conform to the current format encoding rules are encountered in the stitch data segment, the controller will, according to the preset fault-tolerance strategy, such as skipping the invalid byte and attempting to resume decoding from the next byte, or using the previous valid displacement for interpolation, continue to execute the decoding of subsequent data while recording the error log, so as to complete the pattern parsing to the greatest extent. If the number of invalid bytes exceeds the preset threshold, or if a serious structural error that causes the decoding process to be unable to continue is encountered, the controller determines that the file is seriously corrupted, immediately stops the parsing process, and outputs an error message indicating that the file is corrupted through the human-machine interface or network interface, so as to avoid unpredictable mechanical actions caused by erroneous data.
[0077] S23. Based on the preset mapping relationship, the coordinate axis direction of each relative displacement pair is corrected to obtain the mechanical displacement value corresponding to the industrial sewing machine coordinate system.
[0078] Mapping relationship refers to a set of rules or parameters pre-configured in the controller to describe the corresponding transformation relationship between the logical coordinate system of the pattern file and the actual mechanical coordinate system of the industrial sewing machine. These include, but are not limited to, the direction correspondence of the coordinate axes, the scaling ratio, and possible origin offset correction. The mapping relationship can be stored in the configuration file or set by the user through the human-machine interface, such as reverse X-axis direction, reverse Y-axis direction, or swap X / Y axes.
[0079] Coordinate axis orientation correction refers to adjusting the sign of the relative displacement pairs obtained by decoding or exchanging the coordinate axes according to the mapping relationship, so as to match the actual X / Y axis stepper motor movement direction of the sewing machine.
[0080] Mechanical displacement value refers to the actual physical displacement required for the drive actuator to move in the sewing machine's own mechanical coordinate system after orientation correction. The unit is the absolute value in millimeters or logical units.
[0081] It should be noted that the X / Y axis direction of the pattern file may not be consistent with the mechanical axis direction of the sewing machine. The controller needs to perform direction reversal mapping through parameter configuration. For example, the X+ of the file corresponds to the X- of the machine to ensure that the sewing pattern is consistent with the design.
[0082] For example, if the mapping relationship is set to invert the X-axis direction, then each Multiply the value by -1; if set to swap X / Y axes, then and The values are interchanged.
[0083] After correction, the corrected displacement in the sewing machine's mechanical coordinate system is obtained. The correction displacement is the mechanical displacement value. Its magnitude and sign correspond perfectly with the positive and negative movement directions of the actual X and Y axis stepper motors of the sewing machine. This ensures that the design movement direction in the pattern file can be accurately mapped to the physical movement direction of the sewing machine's actuator, thereby ensuring that the sewing pattern does not exhibit unexpected geometric deformations such as mirroring or rotation.
[0084] In this embodiment of the invention, after acquiring a series of relative displacement pairs, the controller performs directional correction on each displacement pair according to a preset mapping relationship.
[0085] S24. Obtain the pulse equivalent parameters of the industrial sewing machine, and convert each mechanical displacement value into the corresponding pulse coordinate based on the pulse equivalent parameters.
[0086] Furthermore, step S24 may include the following sub-steps: S1. Obtain the pulse equivalent parameter of the actuator driving the industrial sewing machine, wherein the pulse equivalent parameter is the number of control pulses required to drive the actuator to generate a unit physical displacement.
[0087] Pulse equivalent parameter refers to the key mechanical-electrical conversion parameter in industrial sewing machines. It is defined as the number of control pulses required to drive the X-axis or Y-axis stepper motor to generate a unit physical displacement of the actuator, such as the feed dog or the sewing head. The unit is pulses / mm.
[0088] It should be noted that the pulse equivalent parameter is determined by the specific mechanical transmission structure of the sewing machine, such as the lead screw, gear reduction ratio, and the inherent characteristics of the motor itself. It can be determined by mechanical calibration before leaving the factory and can be finely adjusted by the user through the human-machine interface.
[0089] In this embodiment of the invention, the controller reads the pulse equivalent parameters set for the X-axis and Y-axis respectively from the configuration area pre-stored in the memory or set in real time from the human-machine interface. For example, the X-axis pulse equivalent parameter... Y-axis pulse equivalent This parameter, serving as a precise scale for converting physical displacement into control pulse count, is the core basis for ensuring that the sewing pattern size remains consistent with the actual physical size.
[0090] S2. Calculate the product of the mechanical displacement value and the pulse equivalent parameter to obtain the theoretical pulse number.
[0091] The theoretical number of pulses refers to the theoretical number of control pulses required to drive a stepper motor to move precisely to the target position, calculated based on the mechanical displacement value and pulse equivalent parameters. This value may be an integer or a decimal, representing the total number of pulse commands that the motor should receive under ideal conditions.
[0092] For a single mechanical displacement value obtained after directional correction, the controller multiplies it with the corresponding shaft pulse equivalent parameter, i.e., theoretical pulse number = mechanical displacement value × pulse equivalent parameter.
[0093] For example, if the X-axis mechanical displacement value obtained after direction correction It is +2.5 mm, that is, a 2.5 mm shift to the right, and the pulse equivalent parameter of the X-axis. If the pulse / mm is 100, then the theoretical pulse count along the X-axis is calculated. Similarly, if the mechanical displacement value of the Y-axis -1.2 mm, meaning a downward movement of 1.2 mm, Y-axis pulse equivalent. 100 pulses / mm, then the theoretical number of pulses along the Y-axis The negative sign indicates that the motor is reversing.
[0094] In this embodiment of the invention, the controller performs a multiplication operation on each mechanical displacement value converted from a relative displacement pair to obtain a one-to-one theoretical pulse number pair, which precisely quantifies the number and direction of pulse commands that the X-axis and Y-axis stepper motors of the sewing machine need to receive relative to the previous point for each stitch point.
[0095] S3. Use the theoretical number of pulses as the pulse coordinates corresponding to the mechanical displacement value of the driven actuator.
[0096] Pulse coordinates refer to discrete position commands in industrial sewing machines, used to directly drive stepper motors or servo motors, with the number of pulses as the basic unit. The pulse coordinate of each axis is the total number of pulses that the axis needs to accumulate or output, which directly corresponds to the absolute or relative position of the actuator in physical space.
[0097] It is worth mentioning that in actual motion control, the controller generates a corresponding number and direction of electrical pulse signals based on the value (determining the number of pulses) and sign (determining the direction of motor rotation) of the pulse coordinates through specific pulse output interfaces, such as GPIO or dedicated pulse generators. This drives the stepper motor to rotate, and then, through a mechanical transmission device, it drives the actuator to move precisely to the target position. In this embodiment of the invention, the controller will calculate the theoretical number of pulses, for example, the X-axis. =250 pulses, Y-axis =-120pulse is directly identified as the pulse coordinate required to drive each axis actuator to complete the needle displacement, ensuring the accuracy and unambiguity of the conversion between the design displacement and the motor drive command.
[0098] S25. Construct a needle stitch data sequence based on multiple pulse coordinates.
[0099] A stitch data sequence refers to an ordered data structure that is arranged in the stitch execution order of a pattern file and contains a series of pulse coordinate points, where each coordinate point corresponds to a stitch position and is used to directly drive the continuous movement of the sewing machine actuator.
[0100] In this embodiment of the invention, the controller collects and organizes the calculated pulse coordinates for each relative displacement. Each pulse coordinate typically represents the displacement command of a single stitch point relative to the previous stitch point in the form of a two-dimensional vector. The controller adds these pulse coordinates sequentially to a dynamic array or linked list according to the original order of the stitches in the pattern file, thereby constructing a complete stitch data sequence. For example, for a pattern containing M stitch points, the final constructed sequence S is... Where M is the total number of stitches. and These represent the pulse coordinates required for the k-th stitch point on the X and Y axes, respectively. This sequence not only contains the displacement information of all stitch points, but its order also strictly corresponds to the sequence of pattern sewing.
[0101] Step 104: Perform drive conversion processing on the stitch data sequence to obtain motion control signals.
[0102] Furthermore, step 104 may include the following sub-steps: S31. Generate an initial motion path based on the stitch data sequence.
[0103] The initial motion path refers to the unoptimized polyline trajectory formed by connecting the pulse coordinate points in the stitch data sequence end to end in the execution order. This trajectory represents the theoretical motion path of the sewing machine actuator in the XY plane.
[0104] Understandably, the controller relies on the stitch data sequence:
[0105] The path starts from the current mechanical origin of the sewing machine or the preset pattern starting point. Sequentially assign each pulse coordinate point As a path node The position is determined by the following formula:
[0106] In the internal coordinate system of the motion controller, the nodes Their sequence can be connected to form a continuous broken line consisting of M straight line segments.
[0107] In this embodiment of the invention, an initial motion path is generated based on the stitch data sequence, thereby achieving one-time parsing and path generation of all stitch points in the pattern file.
[0108] S32. Smooth the motion segments formed by adjacent needle points in the initial motion path to obtain a smoothed continuous motion trajectory.
[0109] Smoothing refers to optimizing the straight line segments or corner points of the initial motion path formed by directly connecting adjacent stitch points to generate a motion trajectory with continuous derivatives. This process reduces the frequent start-stop and speed changes of the motor at path inflection points, thereby improving the smoothness of the sewing process and the quality of the stitches.
[0110] A continuous motion trajectory refers to a motion path that is continuously differentiable in terms of position, velocity, and even acceleration after smoothing. It is usually described by mathematical methods such as spline curves, B-splines, Bézier curves, or circular transitions.
[0111] Understandably, the controller targets adjacent stitch points in the initial motion path. and The resulting linear motion segment has a smooth transition curve inserted at its connection point, i.e., at the path corner. Specifically: For each polygonal corner, the controller calculates a local smooth curve, such as an arc or cubic spline segment, based on preset smoothing parameters, such as the transition arc radius, spline fitting tolerance, and motion constraints, such as normal acceleration and steering acceleration conditions. This smooth curve replaces the original acute angle transition. The smooth curve ensures that the tangent direction of the path changes continuously before and after the corner, so that the speed command driving the X / Y axis stepper motor transitions smoothly at the inflection point, avoiding mechanical vibration and stitch misalignment caused by sudden changes in direction. After performing the above smoothing process on the motion segments between all adjacent stitch points, the original motion path composed of polygonal lines is transformed into a smooth, continuous, and differentiable motion trajectory.
[0112] For example, if adjacent stitch points and The angle between the line segments formed is The controller determines the arc transition radius based on the preset radius. R Calculate the position of the tangent point and insert a segment with that angle. Corresponding, radius is R The arc makes from The entire motion trajectory from the starting point of the arc, the arc path, to the ending point of the arc is tangentially continuous at the connection point, thereby achieving a smooth change in the speed direction. The preset arc transition radius can be dynamically set based on the mechanical characteristics of the sewing machine, the current sewing speed, and the stitch density, for example, set to 0.5mm to 2.0mm.
[0113] In this embodiment of the invention, the motion segment formed by adjacent stitch points in the initial motion path is smoothed to obtain a smoothed continuous motion trajectory, which not only maintains the geometric shape of the original pattern, but also improves the motion stability and control accuracy of the sewing machine actuator during high-speed operation.
[0114] S33. Based on the continuous motion trajectory and combined with preset motion control parameters, generate motion control signals for driving the actuator of the industrial sewing machine.
[0115] Motion control signals refer to electrical signals or digital command sequences used to directly drive the actuators of industrial sewing machines. Typical forms include pulse direction signals (PUL / DIR), analog voltage signals, or bus commands (such as CANopen, EtherCAT, etc.).
[0116] Motion control parameters refer to a set of preset or dynamically adjustable numerical parameters used in the motion control system of an industrial sewing machine to plan, adjust and constrain the motion characteristics of the actuator. These parameters include, but are not limited to, maximum speed, acceleration, synchronization relationship of each axis, speed-position curve planning mode, such as S-curve, trapezoidal curve and following error tolerance.
[0117] Understandably, after obtaining the smoothed continuous motion trajectory, the controller needs to perform motion planning on the trajectory based on the motion control parameters, converting it into a sequence of control commands that can directly drive the motor. This process mainly includes three stages: trajectory interpolation, speed planning, and synchronization calculation. First, the controller discretizes the continuous trajectory into a series of dense position points at fixed time intervals. Then, based on the preset maximum speed and acceleration, it uses an S-shaped speed curve to distribute the speed of each motion segment, ensuring that the speed and acceleration change continuously and smoothly during the motion. Next, based on the coordinates of each point on the trajectory, it calculates the number and direction of pulses that the X-axis and Y-axis stepper motors should output in each interpolation cycle and generates the corresponding pulse sequence. At the same time, based on the trajectory motion timing and sewing process requirements, it generates synchronous trigger signals for auxiliary actuators such as needle bar movement and feed dog feeding. The final generated motion control signal is a set of electrical signals or digital commands that are strictly synchronized in time and precisely modulated in amplitude and frequency.
[0118] In this embodiment of the invention, the continuous motion trajectory is combined with preset motion control parameters to generate a motion control signal for driving the actuator of the industrial sewing machine. This signal is sent to the driver of each actuator through the controller's pulse output interface, analog output interface or industrial bus, thereby driving the sewing machine to accurately and smoothly reproduce the pattern trajectory and complete a high-quality sewing operation.
[0119] It is worth mentioning that after receiving the motion control signal, the controller performs a rationality check: it obtains the mechanical travel limit parameters of each actuator axis of the industrial sewing machine, calculates the coordinates of all interpolation points on each axis based on the continuous motion trajectory planned by the motion control signal, and compares each coordinate value with the mechanical travel limit of the corresponding axis; if any coordinate value is found to exceed the mechanical travel limit, the trajectory is determined to be illegal, the controller stops the subsequent instruction generation process, and outputs an over-limit alarm message through the human-machine interface or network interface; if all coordinates are within the mechanical travel limit range, the subsequent steps continue to be executed.
[0120] Step 105: Obtain auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and auxiliary instruction information.
[0121] Furthermore, step 105 may include the following sub-steps: S41. Parse the auxiliary instruction information in the target pattern file to obtain a structured auxiliary instruction set, which includes instruction type and associated trigger position.
[0122] Auxiliary instruction information refers to instruction data embedded or stored in the pattern file to control non-direct sewing actions during the sewing process, such as controlling auxiliary operations like raising the presser foot, cutting threads, changing colors, backstitching, and adjusting speed.
[0123] A structured auxiliary instruction set refers to a collection of auxiliary instruction data that has been parsed and stored in a certain organized form, where each entry explicitly contains structured fields such as instruction type and associated trigger position.
[0124] The instruction type refers to the specific category of auxiliary operation indicated in the auxiliary instruction information. It is an identifier that distinguishes different mechanical actions, such as lifting the presser foot, cutting the thread, and changing the color.
[0125] The associated trigger position refers to the point of association between the auxiliary instruction and the main sewing process in terms of time or stitch sequence. Specifically, it refers to the stitch point after, before, or between which the instruction should be triggered, usually expressed in the form of stitch number, relative offset, etc.
[0126] The following table provides example instructions and key points for parsing: In this embodiment of the invention, the controller scans and decodes the binary stream of auxiliary instructions byte by byte according to the instruction encoding rules specified in the format specification, and extracts the instruction type and associated trigger position of each auxiliary instruction. For example, for the DST format, the controller identifies the auxiliary instruction type by parsing specific functional bytes in the stitch data segment, and extracts the associated stitch sequence number or position offset that the instruction should trigger from the sequential position of the functional byte or the several bytes immediately following it. After parsing, the controller organizes the extracted auxiliary instruction information into a structured list or dataset to obtain a structured auxiliary instruction set.
[0127] It should be noted that when the instruction type is received, the controller will perform an instruction validity check. This check is based on the actual hardware configuration of the sewing machine itself. The controller accesses the pre-stored device configuration information to determine whether the current sewing machine has the physical mechanism required to execute the instruction type. For example, if the parsed instruction type is a color change instruction, but the device configuration information indicates that the machine does not have a color change mechanism or a multi-head device installed, the controller determines that the instruction is invalid or cannot be executed for this device. For instructions that are determined to be invalid, the controller will ignore the instruction and will not insert its corresponding mechanical motion control instruction into the final control instruction queue. Optionally, the controller can record or prompt the ignoring operation through the human-machine interface to ensure that the generation and execution of the control instruction queue strictly conform to the actual capabilities of the equipment and avoid erroneous actions or execution interruptions due to mismatch between instructions and hardware.
[0128] S42. Based on the instruction type, determine the corresponding mechanical motion control instruction from the preset mechanical motion instruction library.
[0129] The pre-built mechanical motion instruction library refers to the pre-established database that stores the mapping relationship between various auxiliary instruction types and the underlying hardware control instructions required to drive the corresponding actuators of the sewing machine to perform actions.
[0130] Mechanical motion control commands refer to the low-level control signals or data commands that can be directly recognized and executed by the driver or controller of the sewing machine actuator to produce specific mechanical actions, such as presser foot lifting, scissor opening and closing, color change head movement, etc. They are usually in the form of pulse direction signals, PWM signals, switch signals or specific bus protocol messages.
[0131] In this embodiment of the invention, after obtaining the structured auxiliary instruction set, the controller performs a matching query in the pre-stored mechanical motion instruction library for each instruction type to determine and extract the corresponding mechanical motion control instruction. For example, when the instruction type is "lift presser foot", the controller will retrieve a set of predefined specific voltage / current signal sequences or digital control words from the library to drive the presser foot lifting electromagnet to be energized and de-energized; when the instruction type is "change color", it will retrieve a set of pulse sequences and direction signals to drive the color-changing stepper motor to rotate to a specified angle position. By looking up this mapping relationship, the controller converts the abstract instruction type into specific low-level control commands that the sewing machine hardware can recognize and execute, ensuring that the high-level process instructions parsed from the pattern file can be accurately translated into executable control code that drives the physical mechanical actuators.
[0132] S43. Based on the needle action timing in the motion control signal, and combined with the preset needle insertion and feeding coordination relationship, generate feed dog drive command and needle bar movement command.
[0133] Stitching action timing refers to defining a precise time sequence or sequential relationship corresponding to each stitch point in the motion control signal.
[0134] The preset needle bar ...
[0135] Feed dog drive commands refer to the underlying control signals or data commands used to directly control the actuator that drives the feed dog movement. They are used to precisely control the feed amount, feed speed, feed timing, and reset action of the feed dog.
[0136] Needle bar motion commands refer to the underlying control signals or data commands used to directly control the actuator that drives the needle bar to move up and down. They are used to precisely control parameters such as the needle bar's puncture depth, puncture and return speed, and dwell time in the upper position.
[0137] In this embodiment of the invention, the controller discretizes the continuous motion trajectory, dividing the trajectory into each actual needle insertion position. The needle bar movement command is generated based on the timing of these position points. Its core is to determine the downward insertion and upward reset times of the needle bar in each working cycle and the corresponding velocity / acceleration curves. At the same time, the generation of the feed dog drive command must be closely coordinated with the needle bar movement: when the needle bar inserts into the fabric, the feed dog should be in a low position or in an out-of-position state to avoid interference; when the needle bar is lifted and detached from the fabric, the feed dog completes the corresponding feed displacement within a preset feed window period based on the displacement of the next stitch point on the trajectory. Its displacement, speed, and timing are strictly matched with the displacement and time interval between adjacent stitch points in the stitch movement timing, ensuring strict synchronization and seamless connection of the insertion and feed actions during sewing, thereby forming continuous and uniform stitches.
[0138] S44. Based on the feed dog drive command and the needle bar movement command, construct the initial sewing command sequence.
[0139] The initial sewing instruction sequence refers to the set of underlying drive instructions generated by the controller and arranged in chronological order, including core sewing actions such as needle bar movement and feed dog movement. It reflects the complete mechanical control command flow required to complete a basic sewing stitch without considering special auxiliary actions.
[0140] In this embodiment of the invention, the controller uses time as the axis and interweaves the needle bar's downward insertion command and upper reset command with the feed dog's feed movement command and return preparation command within each stitch cycle according to a preset coordinated timing logic. For example, for a typical stitch cycle, the sequence may sequentially include: feed dog return to the preparation position command, needle bar start downward command, needle bar insert the lowest point command, feed dog execute feed movement command, needle bar start upward command, feed dog feed to the position and hold command, needle bar reset to the upper position command, and feed dog reset to the next cycle preparation position command. All stitch cycles are connected in sequence to form a complete, ordered command flow with precise time synchronization between the internal commands, i.e., the initial sewing command sequence.
[0141] S45. Based on the associated trigger position, insert the mechanical motion control command into the corresponding timing position of the initial sewing command sequence to obtain the control command queue of the industrial sewing machine.
[0142] The corresponding timing position refers to the associated trigger position of the auxiliary instruction in the initial sewing instruction sequence, such as the precise position that corresponds to a specific stitch number in logic and time. This position is the reference point for inserting the auxiliary action instruction.
[0143] The control instruction queue refers to the final set of executable instructions synthesized from all steps. This set contains the underlying control instruction sequence of all actions required for the entire sewing process from start to finish. It is the ultimate program that is directly issued to the actuators of each mechanism of the sewing machine to complete the entire pattern sewing.
[0144] In this embodiment of the invention, the controller traverses the structured auxiliary instruction set. For each auxiliary instruction, based on its associated trigger position, for example, after the 100th stitch is completed, the controller locates the precise time point or instruction node corresponding to the trigger position in the initial sewing instruction sequence, such as the instruction gap after the needle bar resets in the 100th stitch cycle. Then, the controller inserts the mechanical motion control instruction corresponding to the auxiliary instruction type, such as the control pulse sequence that drives the presser foot electromagnet to lift, as an independent instruction block after the positioning point. For complex auxiliary instructions involving multiple steps or requiring coordination with other actions, such as thread cutting instructions, the mechanical motion control instruction itself may contain multiple sub-instructions such as idle movement, scissor action, and reset. The controller ensures that its complete sub-instruction sequence is inserted as a whole into the correct position and handles the timing connection with the preceding and following basic sewing instructions. After all auxiliary instructions are inserted according to this rule, the resulting instruction set, which integrates the core sewing action and all auxiliary actions with a strict global timing sequence, is the final control instruction queue used to drive the industrial sewing machine to fully execute the pattern sewing task.
[0145] Step 106: Control the actuator of the industrial sewing machine to perform sewing operations based on the control command queue.
[0146] Sewing operation refers to the sum of a series of actions performed by an industrial sewing machine to complete a complete pattern sewing. It includes not only the core stitching and feeding action cycle, but also all necessary auxiliary actions, as well as initialization and reset actions.
[0147] In this embodiment of the invention, for each instruction in the queue, such as needle bar movement instructions, feed dog drive instructions, or various auxiliary mechanical action control instructions, the controller is triggered at a predetermined time node to generate and output precise pulse signals, level signals, or bus messages, thereby driving the X / Y axis stepper motor, needle bar motor, feed dog mechanism, presser foot electromagnet, thread trimming motor, color changing mechanism, and other actuators to work together. Throughout the execution process, the controller simultaneously monitors the feedback signals of each actuator, performs real-time closed-loop control and safety interlocking, and ensures that the mechanical actions strictly follow the trajectory, speed, and timing defined by the control instruction queue. Ultimately, it accurately and reliably reproduces the entire sewing process described in the target pattern file, completing the fully automated operation from start-up, sewing, auxiliary action triggering to end reset.
[0148] It is worth mentioning that, in the above-described feasible embodiments, the following sub-steps may be included before step 106: Obtain process adaptation parameters, including suture tension parameters.
[0149] A. Process adaptation parameters refer to a set of configurable or perceptible parameters used to adjust and control behavior based on specific sewing conditions, such as fabric type, thickness, thread material, needle size, etc., in order to optimize sewing quality and adaptability.
[0150] The suture tension parameter refers to...
[0151] In this embodiment of the invention, the controller obtains process adaptation parameters related to the current sewing task from real-time sensor feedback or settings input by the operator through the human-machine interface from a preset process parameter database.
[0152] B. Based on the suture tension parameter, offset compensation is performed on the synchronization timing between the feed dog drive command and the needle bar movement command in the control command queue, and a timing-adapted collaborative control command is generated.
[0153] Offset compensation refers to the process of purposefully adjusting predetermined instruction timing or values based on process parameters in order to counteract the adverse effects of the conditions or achieve better performance.
[0154] The timing-adapted collaborative control instructions refer to a new set of underlying control instructions obtained by re-coordinating and calibrating the relative execution timing of the original needle bar and feed dog control instructions based on real-time process parameters.
[0155] Understandably, this applies to different tensions: In high-tension scenarios, such as when using thick or tough thread or sewing thick materials: to prevent the fabric from being pulled by the tight thread during needle bar lifting, which could cause skipped stitches or thread breakage, the controller can slightly delay the timing of the feed dog starting to feed the fabric. This means increasing the time interval between needle bar lifting and feed start, or ending the feed action early to ensure that the thread is fully relaxed when the feed is completed. This is manifested by a positive offset of the trigger timestamp of the feed dog drive command.
[0156] In low-tension scenarios, such as when using fine thread or sewing thin materials: to prevent loose stitches or floating threads due to excessively loose thread, the controller can slightly advance the timing of the feed dog starting to feed the fabric, or fine-tune the overlapping segment of the feed and needle bar movements to optimize the take-up effect. This is manifested by negatively offsetting the trigger timestamp of the feed dog drive command.
[0157] In this embodiment of the invention, the controller dynamically calculates and offsets the relative triggering timing between the feed dog drive command and the needle bar movement command in the generated control command queue based on the acquired suture tension parameters, and accordingly re-plans each pair of related feed dog and needle bar commands in the original command queue to generate a set of coordinated control commands after timing fine-tuning.
[0158] C. Update the corresponding instructions in the control instruction queue based on the cooperative control instructions.
[0159] In this embodiment of the invention, the controller replaces the corresponding feed dog drive commands and needle bar movement commands in the control command queue that do not consider real-time tension compensation with the aforementioned timing-adapted collaborative control commands. This update operation is completed before the commands are finally issued and executed, ensuring that the core needle-feed collaborative timing of the entire queue has been optimized and adapted according to the current sewing tension conditions before it is about to run. The updated control command queue, while maintaining the original pattern trajectory and auxiliary action timing, has enhanced the synergy of its core stitch formation action, thereby enabling it to adaptively cope with the challenges brought by different sewing materials, effectively improve stitch quality, reduce the risk of skipped stitches and breakage, and further improve the intelligence and process adaptability of industrial sewing machines.
[0160] It is worth mentioning that the process adaptation parameters can also include the stitch density adaptation coefficient. For example, if the user sets a coefficient greater than 1.0 for thick fabric to increase the stitch length, the controller will scale all the command parameters in the control command queue that are directly related to the X / Y axis displacement according to this coefficient. That is, the controller traverses the command queue, identifies the pulse number parameter used to control the amount of fabric feed displacement in all feed dog drive commands, and the pulse coordinates of each axis displacement defined in the motion control signal or the displacement command derived from it. It multiplies each displacement amount (pulse number) by the stitch density adaptation coefficient to obtain the new displacement value after adaptation, thereby realizing the online adjustment of the stitch density of the overall sewing pattern. Without changing the shape of the pattern, the density of the stitches is adjusted to adapt to fabrics of different thicknesses or materials.
[0161] To clearly explain the above embodiments, the sewing machine execution flow is provided below: After parsing, generating, and adapting the target pattern file, the controller ultimately generates a queue of executable control instructions. The entire execution process of the sewing machine forms a precise segment-by-sew, stitch-by-stitch correspondence with the content of the pattern file. This process can be divided into five consecutive stages, each stage strictly corresponding to specific content or markings in the pattern file: The first stage is initialization and baseline alignment, which corresponds to the origin baseline in the pattern file. In this stage, the controller first drives the X / Y axis stepper motors back to the mechanical origin and calibrates the initial positions of the feed dog, presser foot, and other mechanisms. Then, the controller reads the pattern origin parameters defined in the pattern file, such as the pattern center point set in the file, calculates the offset between the logical origin and the sewing machine mechanical origin, and completes the alignment of the coordinate system. This ensures that all subsequent sewing actions start from the correct physical position, so that the actual position of the sewing pattern on the fabric is completely consistent with the design intention, such as accurately aligning the pattern center with the fabric center.
[0162] The second stage is pre-analysis and overall path planning, which corresponds to the overall outline described in the pattern file. In this stage, the controller does not start sewing immediately, but generates a complete motion path curve internally based on all the parsed stitch data. The controller will perform smooth interpolation processing on sharp corners or broken line segments in the path to optimize the discrete stitch point sequence into a continuous and smooth motion trajectory.
[0163] The third stage is stitch-by-stitch execution, which is the core of the sewing process. It forms a one-to-one direct mapping with each core stitch in the pattern file. Each stitch data drives a complete mechanical action cycle, specifically including three sub-steps: First, in the displacement stage, the controller outputs corresponding pulse signals to drive the X / Y axis stepper motors to move in tandem according to the relative X / Y axis displacement value of the current stitch, so that the machine head moves precisely to the target position. This action directly corresponds to the coordinate increment recorded in the pattern file. Second, in the sewing stage, after the movement is in place, the controller synchronously triggers the needle bar motor to descend and the feed dog to perform the feed action, jointly completing a valid stitch formation. This action corresponds to the valid stitch mark marked in the pattern file. Finally, in the reset stage, the needle bar moves upward to reset, and the feed dog also returns to the ready position, preparing for the next stitch action. This process corresponds to the stitch interval defined in the pattern file. Therefore, the Nth stitch coordinate data in the pattern file is strictly mapped to the Nth displacement and feed action performed by the sewing machine, and the execution order is completely consistent with the data order in the file.
[0164] The fourth stage is the triggering of auxiliary actions, which corresponds to various auxiliary instructions embedded in the pattern file. These auxiliary actions do not run independently, but are triggered in the timing intervals of specific stitch actions. For example, if the pattern file indicates that the presser foot lifting and color changing instructions are executed after the 100th stitch, the sewing machine will trigger the presser foot lifting and color changing mechanism actions in sequence during the subsequent timing intervals after accurately completing the 100th stitch, and then pause to wait for the color changing to be completed. As another example, the pattern file may contain backstitch reinforcement and thread cutting instructions at the end. Correspondingly, the sewing machine will perform backstitching in the last few stitches, then run a few steps to loosen the stitches, and finally accurately trigger the thread cutting electromagnet to cut the thread. The correspondence in this stage is reflected in the fact that the marked position of the auxiliary instruction in the pattern file determines its precise triggering time in the sewing action sequence, while the instruction type determines the specific mechanical action to be executed.
[0165] The fifth stage is the final processing, corresponding to the end marker of the pattern file, such as the end-of-file marker EOF. After all stitches and auxiliary actions have been completed, the controller drives the X / Y axis back to the mechanical origin, lifts the presser foot, and puts each motor into power-off or standby mode. The entire sewing task is completed, and it is ready to execute the next pattern. This stage marks the closed loop of the entire process from pattern file parsing to physical execution, realizing a complete and reliable automated conversion from design to finished product.
[0166] Through the meticulous division and strict execution of the above five stages, this embodiment achieves a high-fidelity and high-reliability mapping from digital pattern files to physical sewing actions, thereby improving the intelligence, precision, and automation level of industrial sewing machine execution. Example
[0167] Please see Figure 2-4 The present invention provides a control system for industrial sewing machines, comprising: The file reading module 201 is used to respond to sewing requests and read the target pattern file to be executed. Format recognition module 202 is used to recognize the format identifier of the target pattern file; The file parsing module 203 is used to parse the target pattern file based on the format identifier to obtain the stitch data sequence; The drive conversion module 204 is used to perform drive conversion processing on the stitch data sequence to obtain motion control signals; The instruction synthesis module 205 is used to acquire auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information. The execution control module 206 is used to control the actuator of the industrial sewing machine to perform sewing operations based on the control instruction queue.
[0168] Since the above is a system corresponding to a control method applied to an industrial sewing machine, and its implementation principle is the same as that of a control method applied to an industrial sewing machine, for the sake of convenience and brevity, those skilled in the art can clearly understand that the specific working process of the system and modules described above can be referred to the corresponding process in the aforementioned method embodiments, and will not be repeated here.
[0169] It should be noted that the control system and control method in the above embodiments can be integrated and deployed on a dedicated sewing machine core controller (CP02-01). The main chip in the core controller is a Rockchip RV1109, integrating a dual-core ARM Cortex-A7 32-bit CPU with NEON and FPU, an integrated NPU, 1.2 TOPS computing power, and supporting H.264 and H.265 encoding / decoding. It uses a single DDR3 chip, supports the EMMC 5.0 standard, and features an 8GB-64GB compatible design. Working principle of the core controller: The pattern file is imported into the core controller and saved via USB interface. The core controller drives the TFT LCD screen. The corresponding parameters are set and the pattern file to be executed is selected through the touch buttons on the LCD screen. The core controller transmits the data after parsing the executed pattern file to the main control board of the sewing machine via serial port. The core controller can also download pattern files via WIFI or Ethernet interface, and the core controller program can also be remotely upgraded via Ethernet interface.
[0170] The controller serves as the physical carrier and computing core of this invention, and its specific hardware configuration, software platform, and technical specifications are as follows: 1. Hardware platform: Core Processor: Utilizing the Rockchip RV1109 as the main control chip, this high-performance AI vision processor SoC is based on a dual-core ARM Cortex-A7 32-bit core, integrating NEON and an FPU. Each core has 32KB of I-cache, 32KB of D-cache, and 512KB of unified L2 cache. It also integrates a RISC-V MCU, and the built-in NPU supports mixed INT8 / INT16 operations, achieving a computing power of up to 1.2 TOPs. This enables efficient processing of deep convolutional neural networks, enhancing visual algorithm processing capabilities. It supports 32-bit DDR3 / DDR3L / LPDDR3 / DDR4 / LPDDR4, as well as eMMC4.51, SPI Flash, and Nand Flash, meeting diverse storage needs and ensuring fast data storage and retrieval. Equipped with MIPI-DSI / RGB interfaces, it supports 1080P@60FPS display output, meeting high-resolution display requirements. It supports rotation, x / y mirroring, alpha layer blending, and zooming, improving graphics processing efficiency and optimizing visual effects.
[0171] Interface resources: 1 100Mbps Ethernet port (RGMII interface, supports 10 / 100Mbps) for wired network connection and remote management; 1 Wi-Fi module supporting 802.11n protocol for wireless pattern file download and network access; 2 USB 2.0 ports for connecting storage devices such as USB flash drives for easy import of pattern files; 1 external UART and 2 CAN interfaces for reliable communication with the sewing machine's main control board, servo driver, sensors, etc.; several I2C, SPI, I2S, GPIO, and other interfaces for expanding the connection of touch screens, buttons, and other peripheral modules.
[0172] Human-machine interface: The controller is connected to a 7-inch capacitive touch, full-view IPS TFT LCD screen. The corresponding parameters can be set and the pattern file to be executed can be selected through the touch buttons on the LCD screen. The human-machine interface has bright colors and is simple and easy to use.
[0173] 2. Software Platform: Employing a license-free Linux operating system, the system performs real-time trimming, driver adaptation, and optimization of the Linux kernel to meet the stringent requirements of multi-task scheduling, interrupt response, and motor control timing during sewing. This ensures that the actuator can operate precisely according to preset parameters, achieving high-precision sewing operations. In the Linux operating system, pattern files are imported and saved via USB, Wi-Fi, or Ethernet interfaces. The system drives a TFTLCD touchscreen for users to set parameters and select files. The controller performs a parsing process of format recognition, data decoding, instruction mapping, and motion planning on the selected pattern file. After parsing, a stitch action queue is generated and transmitted to the sewing machine's main control board via the serial port (UART), driving the actuator to complete five stages of precise sewing.
[0174] It is worth mentioning that, relying on the network functions of the Linux system and the Ethernet and Wi-Fi interfaces integrated in the controller, industrial sewing machines can be remotely monitored and managed. By connecting to the factory network, managers can remotely view the operating status and production data, and can remotely adjust sewing parameters, issue production tasks, or upgrade the controller program, thereby achieving centralized and intelligent scheduling of the production process.
[0175] The core controller connects to the X / Y axis stepper motors, needle bar motors, presser foot electromagnets, thread cutting mechanisms, and various sensors in the sewing machine body through its rich interfaces. When working, the controller's specific workflow is consistent with the control method of the embodiment of this invention: it receives instructions through a touch screen or network, reads the pattern file, processes it step by step through various internal software modules, and finally generates a high-precision control instruction queue, which is then sent to the sewing machine actuator through interfaces such as CAN and UART to drive it to complete precise sewing.
[0176] 3. Technical Specifications: Electrical characteristics: Input power supply is DC5V±5%, maximum operating current ≤500mA; Environmental adaptability: Operating temperature range is -10℃ to 50℃ (humidity ≤85%, non-condensing), and storage temperature range is -20℃ to 60℃ (humidity ≤90%, non-condensing). Electromagnetic compatibility (EMC): Complies with GB9254-1998 (equivalent to CISPR22:1997) standard; radiated and conducted emissions reach Class B level; electrostatic discharge immunity meets GB / T17626.2-2006 (equivalent to IEC61000-4-2) Class B requirements; surge immunity meets GB / T17626.5-1999 (equivalent to IEC61000-4-5) Class B requirements. Safety insulation: Insulation resistance greater than 50MΩ; Physical dimensions: The external dimensions are 60mm×60mm×10mm, which facilitates integrated installation. Example
[0177] An electronic device according to an embodiment of the present invention includes: a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs a control method for an industrial sewing machine as described in any of the above embodiments.
[0178] The memory can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. The memory has storage space for program code used to perform any of the method steps described above. For example, the storage space for program code may include individual program codes for implementing the various steps in the methods described above. This program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact discs (CDs), memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the methods described above. Example
[0179] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the control method for industrial sewing machines according to any of the above embodiments.
[0180] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0181] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0182] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0183] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0184] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0185] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A control method for industrial sewing machines, characterized in that, include: In response to a sewing request, read the target pattern file to be executed; Identify the format identifier of the target pattern file; Based on the format identifier, the target pattern file is parsed to obtain a stitch data sequence; The stitch data sequence is subjected to drive conversion processing to obtain motion control signals; Obtain auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information; The actuator that controls the industrial sewing machine performs sewing operations based on the control command queue.
2. The control method for industrial sewing machines according to claim 1, characterized in that, The format identifier for identifying the target pattern file includes: The target pattern file is subjected to binary stream extraction to obtain the first N bytes of the target pattern file, which are used as the file header information, where N is a positive integer between 10 and 20; The file header information is subjected to byte feature extraction to obtain the file feature code; The file feature code is matched with a preset format feature library, wherein the format feature library stores standard feature codes corresponding to various file formats. If a standard feature code matching the file feature code is found in the preset format feature library, the format of the pattern file corresponding to the standard feature code is used to determine the format identifier of the target pattern file.
3. The control method for industrial sewing machines according to claim 1, characterized in that, The step of parsing the target pattern file based on the format identifier to obtain the stitch data sequence includes: Based on the format identifier, the data decompression algorithm corresponding to the format identifier is invoked; Based on the data decompression algorithm, the stitch data segments in the target pattern file are decoded to obtain multiple pairs of relative displacements; Based on the preset mapping relationship, the coordinate axis direction of each of the relative displacement pairs is corrected to obtain the mechanical displacement value corresponding to the industrial sewing machine coordinate system; Obtain the pulse equivalent parameters of the industrial sewing machine, and convert each mechanical displacement value into a corresponding pulse coordinate based on the pulse equivalent parameters; The needle mark data sequence is constructed based on multiple pulse coordinates.
4. The control method for industrial sewing machines according to claim 3, characterized in that, The step of obtaining the pulse equivalent parameters of the industrial sewing machine and converting each mechanical displacement value into a corresponding pulse coordinate based on the pulse equivalent parameters includes: Obtain the pulse equivalent parameter of the actuator driving the industrial sewing machine, wherein the pulse equivalent parameter is the number of control pulses required to drive the actuator to generate a unit physical displacement; The theoretical number of pulses is obtained by multiplying the mechanical displacement value by the pulse equivalent parameter. The theoretical number of pulses is used as the pulse coordinate corresponding to the mechanical displacement value that drives the actuator to move.
5. The control method for industrial sewing machines according to claim 1, characterized in that, The step of performing drive conversion processing on the stitch data sequence to obtain motion control signals includes: Based on the stitch data sequence, an initial motion path is generated; The motion segments formed by adjacent stitch points in the initial motion path are smoothed to obtain a smoothed continuous motion trajectory. Based on the continuous motion trajectory and combined with preset motion control parameters, a motion control signal is generated to drive the actuator of the industrial sewing machine.
6. The control method for industrial sewing machines according to claim 1, characterized in that, The step of acquiring auxiliary instruction information from the target pattern file and generating a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information includes: The auxiliary instruction information in the target pattern file is parsed to obtain a structured auxiliary instruction set, wherein the structured auxiliary instruction set includes instruction type and associated trigger position; Based on the instruction type, the corresponding mechanical motion control instruction is determined from the preset mechanical motion instruction library; Based on the needle action timing in the motion control signal, and combined with the preset needle insertion and feeding coordination relationship, feed dog drive command and needle bar movement command are generated. Based on the feed dog drive command and the needle bar movement command, an initial sewing command sequence is constructed; Based on the associated trigger position, the mechanical motion control command is inserted into the corresponding timing position of the initial sewing command sequence to obtain the control command queue of the industrial sewing machine.
7. The control method for industrial sewing machines according to claim 1, characterized in that, Before the actuator controlling the industrial sewing machine performs the sewing operation based on the control command queue, it includes: Obtain process adaptation parameters, wherein the process adaptation parameters include suture tension parameters; Based on the suture tension parameters, the synchronization timing between the feed dog drive command and the needle bar movement command in the control command queue is offset compensation, and a timing-adapted collaborative control command is generated. The corresponding instruction in the control instruction queue is updated based on the cooperative control instruction.
8. A control system for industrial sewing machines, characterized in that, include: The file reading module is used to respond to sewing requests and read the target pattern file to be executed. The format recognition module is used to identify the format identifier of the target pattern file; The file parsing module is used to parse the target pattern file based on the format identifier to obtain the stitch data sequence; The drive conversion module is used to perform drive conversion processing on the stitch data sequence to obtain motion control signals; The instruction synthesis module is used to acquire auxiliary instruction information from the target pattern file, and generate a control instruction queue for the industrial sewing machine based on the motion control signal and the auxiliary instruction information. The execution control module is used to control the actuator of the industrial sewing machine to perform sewing operations based on the control instruction queue.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 7 for use in an industrial sewing machine.
10. A computer-readable storage medium, characterized in that, The computer program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 7 for use in an industrial sewing machine.