Method for off-line marking serial numbers with laser control card
By using a laser control card to offline mark serial numbers, and utilizing fixed and variable index modules and register dynamic parameters, the problem of wasted resources and limited production speed in marking serial numbers for cable products has been solved, achieving an efficient and accurate marking process.
Patent Information
- Application Number
- CN202511332004.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-09-18
AI Technical Summary
In existing technologies, serial number marking of cable products requires computer calculation and download, which leads to resource waste and limited production speed. Furthermore, offline marking cannot be achieved, resulting in low resource utilization.
By employing an offline laser control card to mark serial numbers, the marking template and character data are obtained, and fixed and variable index modules are set up. Combined with register dynamic parameters, laser processing data is generated to achieve precise processing of fixed and variable characters.
It improves marking efficiency, reduces resource waste, ensures process continuity and data accuracy, enhances system compatibility and product traceability, avoids misalignment and overlap errors, and increases production speed.
Smart Images

Figure CN120848380B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laser marking, in particular to a method for offline marking serial numbers by laser control card. BACKGROUND
[0002] In the prior art, when producing cable products, a specific serial number needs to be marked on the shell of the cable as a meter mark. However, because the serial number is variable, the computer usually calculates the content of the new serial number and the relative position of each bit in the serial number and transmits it to the laser control card. However, the computer only calculates the serial number during production, resulting in a lot of resource waste. Moreover, the speed of the transmission also affects the speed of the cable production or the transmission of all serial number contents to the laser control card in advance. In this way, when the serial number has many digits or needs to be filled, the storage space of the control card is also required.
[0003] A laser marking method is disclosed in Chinese Patent No. CN107554112A. The method includes: placing a plurality of locked products in a tray, the tray being provided with a storage module; placing the tray at a predetermined position of a base, and reading the serial numbers corresponding to the plurality of locked products pre-stored in the storage module through a reading module on the base; transmitting the serial numbers to a laser marking machine; moving the tray to a first position of the base so that a predetermined number of locked products are located in the marking area of the laser marking machine for serial number marking; and moving the tray to a second position of the base so that the remaining locked products in the plurality of locked products are located in the marking area of the laser marking machine for serial number marking. However, this scheme cannot perform offline marking and has low resource utilization. SUMMARY
[0004] Therefore, the present application provides a method for offline marking serial numbers by laser control card to overcome the problem of low resource utilization and inability to perform offline marking in the prior art.
[0005] To achieve the above-mentioned purpose, the present application provides a method for offline marking serial numbers by laser control card, which comprises the following steps:
[0006] Step S1: acquiring a marking template and character data;
[0007] Step S2: acquiring character content attributes according to the character bit sequence in the character data and the marking template, and setting a fixed index module according to the character content attributes and the marking template;
[0008] Step S3: acquiring a variable character quantity according to the character content attributes, setting a register according to the variable character quantity, and setting a variable index module according to the register;
[0009] Step S4, according to the fixed index module and the fixed character bit sequence set, the fixed character processing position set is obtained, and according to the variable index module and the variable character bit sequence set, the variable character processing position set is obtained, and the fixed character processing position set and the variable character processing position set are output as the first laser processing data;
[0010] Step S5, according to the current marking serial number and the register set, the marking content is obtained, and the second laser processing data is obtained;
[0011] Step S6, the first laser processing data and the second laser processing data are taken as the final laser processing data to control the laser control card to perform laser processing.
[0012] Further, in the step S2, when the character content attribute is obtained according to the character bit sequence Wt in the character data and the marking template, the character bit sequence Wt is compared with each single item in the fixed character bit sequence set WM={WM1, WM2, WM3,..., WMf-1, WMf} in the marking template respectively, the bit sequence matching is judged according to the comparison result, the character content attribute is output according to the judgment result, and t is a positive integer, wherein:
[0013] When Wt is consistent with one of the single items in the fixed character bit sequence set WM, it is determined that the bit sequence matching is matched, the fixed character is taken as the character content attribute, and the character bit sequence of all character content attributes as the fixed character is stored to obtain the fixed character bit sequence set;
[0014] When Wt is inconsistent with all single items in the fixed character bit sequence set WM, it is determined that the bit sequence matching is not matched, the variable character is taken as the character content attribute, and the character bit sequence of all character content attributes as the variable character is stored to obtain the variable character bit sequence set.
[0015] Further, in the step S2, when the fixed index module is set according to the character attribute and the marking template, the fixed character to be marked is scaled according to the marking character height in the marking template and the ratio of the marking character width to the marking character height, and the first marking template character is obtained, and the current width A i of the first marking template character is obtained, the fixed character deviation SF i is calculated according to the current width A i of the first marking template character and the template serial number character width AM in the marking template, SF i is set as SF i =A -AM, the fixed character deviation includes the first fixed character deviation SF1, the second fixed character deviation SF2, the third fixed character deviation SF3,..., the i-1 fixed character deviation SFi-1 and the i-th fixed character offset SF i and the fixed character as a fixed index, and the fixed character offset corresponding to the fixed character and the marking position corresponding to the fixed character position in the marking template as an index result, to obtain a fixed index module, the fixed index module includes a first fixed index module DF1, a second fixed index module DF2, a third fixed index module DF3,..., an i-1th fixed index module DF i-1 and the i-th fixed index module DF i , the marking position corresponding to the fixed character position in the marking template includes a fixed character starting machining position RF1, a first fixed character machining position TF1, a second fixed character machining position TF2, a third fixed character machining position TF3,..., a t-th fixed character machining position TFt.
[0016] Further, in the step S3, the number of variable characters is obtained according to the character content attribute, and when the register is set according to the number of variable characters, the bit sequence number m of the variable character in the variable character bit sequence set is obtained, and the number of registers is set according to the bit sequence number m of the variable character, to obtain m registers, the m registers include: register B m , register B m-1 , register B m-2 ,..., register B2 and register B1, and the content of the variable character in each register in the m registers is set according to the demand base, to obtain the content of all variable characters involved in the demand base, and the increment of the register variable character is set to G.
[0017] Further, in the step S3, when the variable index module is set according to the register, the content of all variable characters involved in the demand base is scaled according to the marking character height in the marking template and the ratio of the marking character height to the marking character width, to obtain a second marking template character, and the current width Q n of the second marking template character is obtained, the variable character offset SQ n is calculated according to the current width Q n of the second marking template character and the template sequence number character width AM in the marking template, SQ n = Q n - AM, the variable character offset includes a first variable character offset SQ1, a second variable character offset SQ2, a third variable character offset SQ3,..., an n-1th variable character offset SQ n-1 and an n-th variable character offset SQ n, n is a base number of a demand base, and the contents of all variable characters involved in the demand base are taken as variable indexes, and the variable character deviations corresponding to the contents of all variable characters involved in the demand base and the marking positions of the corresponding variable character positions in the marking template are taken as index results, to obtain a variable index module, the variable index module includes a first variable index module DQ1, a second variable index module DQ2, a third variable index module DQ3,..., an (n-1)th variable index module DQ n-1 , and an nth variable index module DQ n The marking positions of the corresponding variable character positions in the marking template include a variable character starting machining position RQ1, a first variable character machining position TQ1, a second fixed character machining position TQ2, a third fixed character machining position TQ3, and a tth fixed character machining position TQt.
[0018] Further, the step S4 obtains the fixed character machining position set according to the fixed index module and the fixed character bit sequence set when the fixed character bit sequence is the first character.
[0019] When the character bit sequence of the fixed character is the first character, the fixed index module corresponding to the first character is matched, the first fixed character machining position TF1 in the fixed index module is obtained, and the fixed character starting machining position RF1 and the first fixed character deviation SF 1, The current cumulative character deviation is set as L1, L1=0, the base deviation is set as X1, X1=0, and the character deviation S1=SF 1, The starting machining position R1 of the first character in the marking template is obtained, the marking template and index module deviation R is set as R=R1-RF1, and the current character machining position P1 is calculated, and P1=R+TF1+L1+X1 is set.
[0020] When the character bit sequence of the fixed character is the second character, the fixed index module corresponding to the second character is matched, the second fixed character machining position TF2 in the fixed index module is obtained, and the second fixed character deviation SF 2, The current cumulative character deviation is set as L2, L2=S1, the base deviation is set as X2, X2=(2-1)xD, D is the character spacing, and the character deviation S2=SF 2, The current character machining position P2 is calculated, and P2=R+TF2+L2+X2 is set.
[0021] When the character bit sequence of the fixed character is the third character, the fixed index module corresponding to the third character is matched, the third fixed character machining position TF3 in the fixed index module is obtained, and the third fixed character deviation SF 3, The current cumulative character deviation is set as L3, L3=S1+S2, the base deviation is set as X3, X3=(3-1)xD, and the character deviation S3=SF3, The current character processing position P3 is calculated, and P3 is set as R+TF3+L3+X3;
[0022] …
[0023] When the character position of the fixed character is the tth character, the fixed index module corresponding to the tth character is matched, the tth fixed character processing position TFt in the fixed index module is obtained, the fixed character deviation SF t, The current cumulative character deviation is set as Lt, Lt=S1+S2+...+St-1, the base deviation is set as Xt, Xt=(t-1)xD, and the character deviation S t =SF t, The current character processing position Pt is calculated, and Pt is set as R+TFt+Lt+Xt.
[0024] Until the character processing positions of all fixed characters are calculated, the fixed character processing position set is obtained.
[0025] Further, the step S4 is performed when the variable character processing position set is obtained according to the variable index module and the variable character position set, and the fixed character processing position set and the variable character processing position set are output as the first laser processing data, wherein:
[0026] When the character position of the variable character is the first character, the register B1 corresponding to the variable character with the first character position is read, the jth variable index module corresponding to the contents of all variable characters involved in the demand base of the register B1 is matched, the first variable character processing position TQ1 in the jth variable index module is obtained, the variable character starting processing position RQ1, and the jth variable character deviation SQ j j is the order of the contents of all variable characters involved in the demand base, j=1, 2, 3,..., n, the current cumulative character deviation is set as L1, L1=0, the base deviation is set as X1, X1=0, and the character deviation S1=SQ j, The starting processing position R1 of the first character in the marking template is obtained, the marking template and index module deviation R is set as R1-RQ1, the current character processing position P1 is calculated, and P1 is set as R+TQ1+L1+X1.
[0027] When the character position of the variable character is the second character, the register B2 corresponding to the variable character with the second character position is read, the jth variable index module corresponding to the contents of all variable characters involved in the demand base of the register B2 is matched, the second character processing position TQ2 in the jth variable index module is obtained, and the second variable character deviation SQ 2,Let the current cumulative character deviation be L2, L2=S1, let the base deviation be X2, X2=(2-1)×D, and let the character deviation S2=SQ. j, Calculate the current character processing position P2, and set P2 = R + TQ2 + L2 + X2;
[0028] When the character position of the variable character is the third character, read register B3 corresponding to the variable character with the third character position, match the content of all variable characters involved in the required base of register B3 with the j-th variable index module, obtain the processing position TQ3 of the third character in the j-th variable index module, and the deviation SQ of the third variable character. 3, Set the current cumulative character deviation to L3, L3 = S1 + S2, set the base deviation to X3, X3 = (3-1) × D, and set the character deviation S3 = SQ. j, Calculate the current character processing position P3, and set P3 = R + TQ3 + L3 + X3;
[0029] ...
[0030] When the character position of the variable character is the t-th character, read the register Bm corresponding to the variable character with the t-th character position, match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register Bm, obtain the processing position TQt of the t-th character in the j-th variable index module, and the deviation SQ of the t-th variable character. t, Let the current cumulative character deviation be Lt, where Lt = S1 + S2 + S3 + ... + S t Let the base deviation be Xt, where Xt = (t-1) × D, and let the character deviation be S. t =SQ j, Calculate the current character processing position Pt, and set Pt = R + TQt + Lt + Xt;
[0031] The process continues until the processing positions of all variable characters are calculated, resulting in a set of variable character processing positions. The set of fixed character processing positions and the set of variable character processing positions are then output as the first laser processing data.
[0032] Further, in step S5, when acquiring the marking content based on the current marking serial number and register set, the value of register B1 is incremented, and the value of register B1 during the incrementing process is processed by a base to obtain the second laser processing data. The value R1 of register B1 is incremented to obtain the incremented value V1 of register B1, V1 = R1 + G. The incremented value V1 of register B1 is compared with the carry value V2 in base N. Based on the comparison result, the validity of the incremented value V1 of register B1 is determined, and based on the determination result, the incremented value V1 of register B1 is processed by a base, wherein:
[0033] When V1 < V2, the value V1 of register B1 after increment processing is determined to be valid. No radix processing is performed on the value V1 of register B1 after increment processing, and increment processing continues.
[0034] When V1≥V2, the value V1 of register B1 after increment processing is determined to be invalid, and the value V1 of register B1 after increment processing is processed by base.
[0035] Furthermore, the number base processing includes:
[0036] Set the value of register B1 after base processing to V1`, where V1` = V1 - V2. Increment the value of register B2 by 1, and obtain the values of subsequent registers. Perform base processing on the values of subsequent registers one by one, and set the value of register B1 to the i-th bit. i The value is R i The value of the i-th bit register after base conversion is Vi, where Vi = R i +1, compare the value Vi of the i-th register after base processing with the carry value V2 in base N, determine whether the base processing endpoint has been reached based on the comparison result, and control the base processing process accordingly, where:
[0037] When Vi < V2, it is determined that the base processing end point has been reached, and the base processing process is controlled by terminating the subsequent registers one by one for base processing.
[0038] When Vi ≥ V2, it is determined that the base processing endpoint has not been reached. The control method for the base processing process is to continue processing the subsequent registers one by one, and to obtain the base-processed register B in real time. B The value Vmax will be transferred to register B. B The value Vmax is compared with the carry value V2 in base N, and the register B is adjusted based on the comparison result. BThe validity of the value Vmax is determined, and the number system is corrected based on the determination result, where:
[0039] When Vmax < V2, the decision register B B The value Vmax is valid if it is valid, and no correction is made for the number system.
[0040] When Vmax ≥ V2, the decision register B is used. B If the value of Vmax is invalid, the radix processing is corrected, the loop flag is set, the register value is reset, and the loop restarts to add increment and radix processing.
[0041] Furthermore, in step S6, when the first laser processing data and the second laser processing data are used as the final laser processing data to control the laser control card for laser processing, the laser control card controls the laser marking machine according to the first laser processing data and the second laser processing data to complete the laser processing.
[0042] Compared with existing technologies, the beneficial effects of this invention are as follows: Step S1, by acquiring basic data such as marking templates and character data, can, on the one hand, avoid subsequent processing interruptions due to missing data, ensuring process continuity; on the other hand, by standardizing data input, it reduces calculation errors caused by inconsistent formats, and complete data also provides a reliable basis for subsequent problem tracing; Step S2, based on character position and marking template, determines fixed character attributes and sets a fixed index module, which clarifies the processing benchmark of fixed characters, ensuring consistent processing of fixed characters in the same batch of products; it also reduces repetitive parsing calculations, improving efficiency; and it can quickly reset the module by matching new templates, enhancing adaptability to different scenarios; Step S3, by setting registers and variable index modules according to the number of variable characters, can dynamically adapt to variable content of different lengths, avoiding character truncation or padding errors; the provided dynamic position calculation rules ensure that variables and fixed characters... The layout is coordinated; only register values need to be modified when updating variables, significantly reducing update costs; step S4 calculates the positions of fixed and variable characters separately and integrates the output to ensure accurate coordination of the two types of character positions and avoid misalignment and overlap; standardized position data can be directly connected to the laser control card, reducing format conversion errors; adjusting the position only requires modifying module parameters, facilitating rapid optimization; step S5 combines the current serial number and register to generate marking content, ensuring that the marking content is synchronized with the latest variables in real time, avoiding information lag errors; content is bound to processing parameters to ensure clear and qualified characters; associated serial numbers and other data also enhance the traceability of the entire product lifecycle; step S6 integrates position and content data to control laser processing, avoiding waste products caused by position and content mismatch; one-time data distribution reduces control card waiting time and improves processing efficiency; it is compatible with multiple control cards, and only minor format adjustments are needed when changing equipment, enhancing system compatibility. Attached Figure Description
[0043] Figure 1 This is a flowchart illustrating the offline serial number marking method for the laser control card in this embodiment. Detailed Implementation
[0044] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0045] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0046] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.
[0047] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0048] Please see Figure 1 As shown, this is a method for offline marking of serial numbers on a laser control card in this embodiment. The method includes:
[0049] Step S1: Obtain the marking template and character data;
[0050] Step S2: Obtain the character content attributes based on the character position and marking template in the character data, and set the fixed index module based on the character content attributes and marking template;
[0051] Step S3: Obtain the number of variable characters based on the character content attribute, set the register based on the number of variable characters, and set the variable index module based on the register;
[0052] Step S4: Obtain the fixed character processing position set according to the fixed index module and the fixed character position set, and obtain the variable character processing position set according to the variable index module and the variable character position set, and output the fixed character processing position set and the variable character processing position set as the first laser processing data;
[0053] Step S5: Obtain the marking content based on the current marking serial number and register set to obtain the second laser processing data;
[0054] Step S6: Use the first laser processing data and the second laser processing data as the final laser processing data to control the laser control card to perform laser processing.
[0055] Specifically, this embodiment is applied to a laser control card operating terminal. By modularly separating fixed and variable content and setting fixed and variable index modules, combined with dynamic parameter settings of registers, it achieves efficient parsing of serial number marking data and rapid generation of laser processing instructions. This significantly improves marking efficiency, enhances format flexibility, reduces hardware resource consumption, and ensures marking accuracy and consistency, enabling offline serial number marking. Step S1, by acquiring basic data such as marking templates and character data, avoids subsequent processing interruptions due to data loss, ensuring process continuity. Furthermore, by standardizing data input, it reduces calculation errors caused by inconsistent formats, and complete data provides a reliable basis for subsequent problem tracing. Step S2, based on character position and marking template, determines fixed character attributes and sets a fixed index module. This clarifies the processing benchmark for fixed characters, ensuring consistent processing of fixed characters in the same batch of products. It also reduces repetitive parsing calculations, improving efficiency. Additionally, it allows for rapid module reset by matching new templates, enhancing adaptability to different scenarios. Step S3, based on… The variable character quantity setting register and variable index module can dynamically adapt to variable content of different lengths, avoiding character truncation or padding errors. The provided dynamic position calculation rules ensure that variable and fixed character layouts are coordinated. Variable updates only require modifying register values, significantly reducing update costs. Step S4 calculates and integrates the positions of fixed and variable characters, ensuring precise coordination between the two types of character positions and avoiding misalignment or overlap. Standardized position data can be directly interfaced with the laser control card, reducing format conversion errors. Adjusting the position only requires modifying module parameters, facilitating rapid optimization. Step S5 combines the current serial number and register to generate marking content, ensuring real-time synchronization between the marking content and the latest variables, avoiding information lag errors. Content is bound to processing parameters, ensuring clear and qualified characters. Associated serial numbers and other data enhance the traceability of the entire product lifecycle. Step S6 integrates position and content data to control laser processing, avoiding waste products caused by position and content mismatches. One-time data delivery reduces control card waiting time, improving processing efficiency. It adapts to multiple control cards, requiring only minor format adjustments when changing equipment, enhancing system compatibility.
[0056] Specifically, in step S1, when acquiring the marking template and character data, the marking template includes the marking font height, the ratio of the marking font width to the height, the marking character spacing, the marking position corresponding to the variable character position, the marking position corresponding to the fixed character position, and a fixed character position set. The marking character spacing refers to the distance between characters during laser marking. The marking character height refers to the height of the serial number character to be marked. The ratio of the marking character width to the marking character height refers to the ratio of the width to the height of the serial number character to be marked. The marking position corresponding to the variable character position refers to the marking position of the variable character in the marking template. The marking position corresponding to the fixed character position refers to the marking position of the fixed character in the marking template. The character position sequence set is the set of position sequences of all fixed characters in the marking template within the marked sequence. The character data includes fixed characters to be marked, variable characters to be marked, and character position sequence. In step S1, the computer selects the marking template and obtains the marking font height, the ratio of marking font width to height, the width of the template sequence number character, the marking character spacing, the marking position of the corresponding variable character position, the marking position of the corresponding fixed character position, and the fixed character position sequence set. The fixed characters to be marked refer to the fixed characters that need to be marked, the variable characters to be marked refer to the variable characters that need to be marked, and the character position sequence refers to the position sequence of all characters that need to be marked. In step S1, the user inputs character data in advance to obtain the fixed characters to be marked, the variable characters to be marked, and the character position sequence.
[0057] Specifically, step S1 involves loading a template into a computer to acquire the marking template and character data, thereby enabling the computer to accurately acquire serial number marking data, significantly improving serial number marking efficiency and ensuring format consistency.
[0058] Specifically, in step S2, when obtaining character content attributes based on the character position Wt in the character data and the marking template, the character position Wt is compared with each individual item in the fixed character position set WM={WM1,WM2,WM3,...,WMf-1,WMf} in the marking template, and the position matching is judged based on the comparison result. The character content attributes are then output based on the judgment result, where t is the character order and t is a positive integer.
[0059] When Wt matches one of the individual items in the fixed character position set WM, the position matching is determined to be a match, the fixed character is output as a character content attribute, and all character positions with the fixed character content attribute are stored to obtain the fixed character position set;
[0060] When Wt is inconsistent with all individual items in the fixed character position set WM, the position matching is determined to be mismatched. The variable character is output as a character content attribute, and the position of all characters whose character content attribute is the variable character is stored to obtain the variable character position set.
[0061] Specifically, the character position order refers to the positional order of the characters in the marking content. The fixed character position order set in the marking template is the sum of the positional orders of the fixed characters in the marking template. WM1 refers to the positional order of the first fixed character in the marking template, WM2 refers to the positional order of the second fixed character in the marking template, WM3 refers to the positional order of the second fixed character in the marking template, WMf-1 refers to the positional order of the (f-1)th fixed character in the marking template, and WMf refers to the positional order of the fth fixed character in the marking template. The positional order matching refers to whether the character position order of the marking content matches the character position order of the fixed characters in the marking template, based on the character position order in the character data and each individual item in the fixed character position order set in the marking template. The positional order matching includes matching and non-matching.
[0062] Specifically, step S2 involves using a computer to identify character data in the marking template, dividing the character data by character attributes to obtain fixed and variable parts, thereby improving the accuracy of the character data and thus improving character processing efficiency.
[0063] Specifically, in step S2, when setting the fixed index module according to character attributes and marking template, the characters to be marked are scaled according to the height of the marked characters in the marking template and the ratio of the width of the marked characters to the height of the marked characters, to obtain the first marking template character, and the current width A of the first marking template character is set. i To retrieve the value, the current width A of the first marked template character is determined. i The template serial number character width AM in the marking template is offset from the fixed character SF. i Perform calculations and set SF. i =A i -AM, the fixed character deviation includes a first fixed character deviation SF1, a second fixed character deviation SF2, a third fixed character deviation SF3, ..., the (i-1)th fixed character deviation SF i-1 and the deviation of the i-th fixed character SF i The system uses fixed characters as fixed indices, and takes the fixed character deviation corresponding to the fixed character and the marking position of the corresponding fixed character position in the marking template as the index result to obtain a fixed index module. The fixed index module includes a first fixed index module DF1, a second fixed index module DF2, a third fixed index module DF3, ..., an (i-1)th fixed index module DF i-1and the i-th fixed index module DF i The marking positions corresponding to the fixed character positions in the marking template include the fixed character starting processing position RF1, the first fixed character processing position TF1, the second fixed character processing position TF2, the third fixed character processing position TF3, ..., the t-th fixed character processing position TFt.
[0064] Specifically, this embodiment does not limit the method for obtaining the current width of the first marking template character. Those skilled in the art can set it according to actual needs, such as directly measuring the current width of the first marking template character using a computer. The first fixed character deviation refers to the fixed character deviation of the first fixed character among the fixed characters; the second fixed character deviation refers to the fixed character deviation of the second fixed character among the fixed characters; the third fixed character deviation refers to the fixed character deviation of the third fixed character among the fixed characters; the (i-1)th fixed character deviation refers to the fixed character deviation of the (i-1)th fixed character among the fixed characters; the i-th fixed character deviation refers to the fixed character deviation of the i-th fixed character among the fixed characters; the fixed index module refers to the unit that sets the identifier and storage location for the fixed character deviation; the first fixed index module refers to the index module corresponding to the first fixed character. The second fixed index module refers to the index module corresponding to the second fixed character, the third fixed index module refers to the index module corresponding to the third fixed character, the (i-1)th fixed index module refers to the index module corresponding to the (i-1)th fixed character, the ith fixed index module refers to the index module corresponding to the ith fixed character, where i is the order of the fixed characters and i is a positive integer, the fixed character starting processing position RF1 refers to the initial marking position of the fixed character in the marking template, the first fixed character processing position TF1 refers to the marking position of the first fixed character in the marking template, the second fixed character processing position TF2 refers to the marking position of the second fixed character in the marking template, the third fixed character processing position TF3 refers to the marking position of the third fixed character in the marking template, and the t-th fixed character processing position TFt refers to the marking position of the t-th fixed character in the marking template.
[0065] Specifically, step S2 sets the character attributes and marking template for the fixed index module to quickly find the required fixed character deviations, thereby improving data processing efficiency.
[0066] Specifically, in step S3, the number of variable characters is obtained based on the character content attributes. When setting the registers based on the number of variable characters, the position number m of the variable characters in the variable character position set is obtained, and the number of registers is set according to the position number m, resulting in m registers. The m registers include: Register B mRegister B m-1 Register B m-2 Registers B2 and B1 are used, and the variable character content of each of the m registers is set according to the required base, so as to obtain the content of all variable characters involved in the required base. The increment of the register variable characters is set to G.
[0067] Specifically, this embodiment does not limit the specific value of G. Those skilled in the art can set it according to the actual situation. For example, when the required number base is decimal, G is set to 1. The register refers to a high-speed, small-capacity storage unit. Register B1 refers to the register with the first variable character in the variable character sequence set as the first variable character. Register B2 refers to the register with the second variable character in the variable character sequence set as the second variable character. Register B3 refers to the register with the third variable character in the variable character sequence set as the third variable character. m-1 This refers to the register B, which is the (m-1)th variable character in the set of variable characters. m This refers to the register whose variable characters are in the m-th order of the variable character set. This embodiment does not limit the specific implementation method of setting the variable character content of each of the m registers according to the required base. Those skilled in the art can set it according to the actual situation. For example, when the required base is decimal, the content of all variable characters involved in the required base includes 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The content of all variable characters involved in the required base refers to the character content of the variable characters set by the register according to the required base.
[0068] Specifically, step S3 uses the number m of variable characters in the variable character position set and sets the variable character content of each of the m registers according to the required base to achieve systematic storage of the serial number variable content, thereby significantly improving the efficiency of serial number marking and optimizing the configuration of register resources.
[0069] Specifically, in step S3, when setting the variable index module according to the register, the content of all variable characters involved in the required base is scaled according to the height of the marked characters in the marked template and the ratio of the marked character width to the marked character height, to obtain the second marked template character, and the current width Q of the second marked template character is set. n To obtain the value, based on the current width Q of the second marking template character. n The template serial number character width AM in the marking template is compared with the variable character deviation SQ. n Perform calculations and set SQ n =Q n-AM, the variable character deviation includes the first variable character deviation SQ1, the second variable character deviation SQ2, the third variable character deviation SQ3, ..., the (n-1)th variable character deviation SQ n-1 And the character deviation of the nth variable SQ n Let n be the base of the required number system. The content of all variable characters involved in the required number system is used as the variable index. The deviation of the variable characters corresponding to the content of all variable characters involved in the required number system and the marking position of the corresponding variable character in the marking template are used as the index result to obtain the variable index module. The variable index module includes: a first variable index module DQ1, a second variable index module DQ2, a third variable index module DQ3, ..., an (n-1)th variable index module DQ n-1 and the nth variable index module DQ n The marking positions of the corresponding variable characters in the marking template include the variable character starting processing position RQ1, the first variable character processing position TQ1, the second fixed character processing position TQ2, the third fixed character processing position TQ3, ..., the t-th fixed character processing position TQt.
[0070] Specifically, this embodiment does not limit the method for obtaining the current width of the second marking template character. Those skilled in the art can set it according to actual needs, such as directly measuring the current width of the second marking template character using a computer. The first variable character deviation refers to the variable character deviation of the first variable character in the variable characters; the second variable character deviation refers to the variable character deviation of the second variable character in the variable characters; the third variable character deviation refers to the variable character deviation of the third variable character in the variable characters; the (n-1)th variable character deviation refers to the variable character deviation of the (n-1)th variable character in the variable characters; and the nth variable character deviation refers to the variable character deviation of the nth variable character in the variable characters. The variable index module refers to the unit that sets an identifier and storage location for the variable character deviation. The first variable index module refers to the index module set according to the first variable character deviation; the second variable index module refers to the index module set according to the first variable character deviation; and the second variable index module refers to the index module set according to the first variable character deviation. The index module for setting the deviation of two variable characters, the third variable index module refers to the index module set according to the deviation of the third variable character, the (n-1)th variable index module refers to the index module set according to the (n-1)th variable character deviation, the nth variable index module refers to the index module set according to the deviation of the nth variable character, the required base refers to the base of the register set according to the marking requirements, such as decimal and hexadecimal, the variable character starting processing position RQ1 refers to the initial marking position of the variable character in the marking template, the first variable character processing position TQ1 refers to the marking position of the first variable character in the marking template, the second variable character processing position TQ2 refers to the marking position of the second variable character in the marking template, the third variable character processing position TQ3 refers to the marking position of the third variable character in the marking template, and the tth variable character processing position TQt refers to the marking position of the tth variable character in the marking template.
[0071] Specifically, step S2 sets the variable index module through character attributes and marking templates to facilitate quick finding of the required variable character deviations, thereby improving data processing efficiency.
[0072] Specifically, in step S4, when obtaining the fixed character processing position set based on the fixed index module and the fixed character position set, the following applies:
[0073] When the character position of the fixed character is the first character, match the fixed index module corresponding to the first character, obtain the first fixed character processing position TF1, the fixed character starting processing position RF1, and the first fixed character deviation SF in the fixed index module. 1, Set the current cumulative character deviation to L1, L1=0, set the base deviation to X1, X1=0, and set the character deviation S1=SF. 1,Get the starting processing position R1 of the first character in the marking template, set the deviation between the marking template and the index module to R, R=R1-RF1, calculate the current character processing position P1, and set P1=R+TF1+L1+X1;
[0074] When the character position of the fixed character is the second character, match the fixed index module corresponding to the second character, obtain the processing position TF2 of the second fixed character in the fixed index module, and the deviation SF of the second fixed character. 2, Let the current cumulative character deviation be L2, L2=S1, let the base deviation be X2, X2=(2-1)×D, where D is the character spacing, and let the character deviation S2=SF. 2, Calculate the current character processing position P2, and set P2 = R + TF2 + L2 + X2;
[0075] When the character position of the fixed character is the third character, match the fixed index module corresponding to the third character, obtain the processing position TF3 of the third fixed character in the fixed index module, and the deviation SF of the third fixed character. 3, Let the current cumulative character deviation be L3, where L3 = S1 + S2. Let the base deviation be X3, where X3 = (3-1) × D. Let the character deviation S3 = SF. 3, Calculate the current character processing position P3, and set P3 = R + TF3 + L3 + X3;
[0076] ...
[0077] When the character position of the fixed character is the t-th character, match the fixed index module corresponding to the t-th character, obtain the processing position TFt of the t-th fixed character in the fixed index module, and the fixed character deviation SF. t, Let the current cumulative character deviation be Lt, where Lt = S1 + S2 + ... + St-1; let the base deviation be Xt, where Xt = (t-1) × D; and let the character deviation S be... t =SF t, Calculate the current character processing position Pt, and set Pt = R + TFt + Lt + Xt;
[0078] The process continues until the processing positions of all fixed characters are calculated, resulting in a set of fixed character processing positions.
[0079] When the variable character is the first character, read register B1 corresponding to the variable character with the first character position. Match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register B1. Obtain the processing position TQ1 of the first variable character and the starting processing position RQ1 of the variable character in the j-th variable index module, and the deviation SQ of the j-th variable character. j,j represents the order of all variable characters involved in the required base, j=1, 2, 3, n, set the current cumulative character deviation to L1, L1=0, set the base deviation to X1, X1=0, and set the character deviation S1=SQ j, Get the starting processing position R1 of the first character in the marking template, set the deviation between the marking template and the index module to R, R=R1-RQ1, calculate the current character processing position P1, and set P1=R+TQ1+L1+X1;
[0080] When the character position of the variable character is the second character, read register B2 corresponding to the variable character with the second character position, match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register B2, obtain the processing position TQ2 of the second character in the j-th variable index module, and the deviation SQ of the second variable character. 2, Let the current cumulative character deviation be L2, L2=S1, let the base deviation be X2, X2=(2-1)×D, and let the character deviation S2=SQ. j, Calculate the current character processing position P2, and set P2 = R + TQ2 + L2 + X2;
[0081] When the character position of the variable character is the third character, read register B3 corresponding to the variable character with the third character position, match the content of all variable characters involved in the required base of register B3 with the j-th variable index module, obtain the processing position TQ3 of the third character in the j-th variable index module, and the deviation SQ of the third variable character. 3, Set the current cumulative character deviation to L3, L3 = S1 + S2, set the base deviation to X3, X3 = (3-1) × D, and set the character deviation S3 = SQ. j, Calculate the current character processing position P3, and set P3 = R + TQ3 + L3 + X3;
[0082] ...
[0083] When the character position of the variable character is the t-th character, read the register Bm corresponding to the variable character with the t-th character position, match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register Bm, obtain the processing position TQt of the t-th character in the j-th variable index module, and the deviation SQ of the t-th variable character. t, Let the current cumulative character deviation be Lt, where Lt = S1 + S2 + S3 + ... + S t Let the base deviation be Xt, where Xt = (t-1) × D, and let the character deviation be S. t =SQ j, Calculate the current character processing position Pt, and set Pt = R + TQt + Lt + Xt;
[0084] The process continues until the processing positions of all variable characters are calculated, resulting in a set of variable character processing positions. The set of fixed character processing positions and the set of variable character processing positions are then output as the first laser processing data.
[0085] Specifically, the first laser processing data refers to the processing position data of the characters in the sequence to be marked.
[0086] Specifically, step S4 determines the laser processing position through a fixed index module and a variable index module to obtain the first laser processing data, so as to determine the processing position of the current marking serial number, thereby improving the accuracy of laser processing and the utilization of production resources.
[0087] Specifically, in step S5, when acquiring the marking content based on the current marking serial number and register set, the value of register B1 is incremented, and the value of register B1 during the increment process is processed by a base to obtain the second laser processing data. The value R1 of register B1 is incremented to obtain the incremented value V1 of register B1, V1 = R1 + G. The incremented value V1 of register B1 is compared with the carry value V2 in base N. Based on the comparison result, the validity of the incremented value V1 of register B1 is determined, and based on the determination result, the incremented value V1 of register B1 during the increment process is processed by a base, wherein:
[0088] When V1 < V2, the value V1 of register B1 after increment processing is determined to be valid. No radix processing is performed on the value V1 of register B1 after increment processing, and increment processing continues.
[0089] When V1 ≥ V2, the value V1 of register B1 after increment processing is determined to be invalid. The value V1 of register B1 after increment processing is then processed by base, and the value of register B1 after base processing is set to V1`, where V1` = V1 - V2. The value of register B2 is then incremented by 1, and the values of subsequent registers are retrieved. The values of subsequent registers are processed by base processing one by one, and the value of the m-th register B is set... m The value is R m The value of the m-th bit register after base processing is Vm, where Vm = R m +1, compare the value Vm of the m-th bit register after base processing with the carry value V2 in base N, determine whether the base processing endpoint has been reached based on the comparison result, and control the base processing process accordingly.
[0090] When Vm < V2, it is determined that the base processing end point has been reached, and the base processing process is controlled by terminating the subsequent registers one by one for base processing.
[0091] When Vm ≥ V2, it is determined that the base processing endpoint has not been reached. The base processing process is controlled by continuing to process subsequent registers one by one, and the base-processed register B is obtained in real time. B The value Vmax will be transferred to register B. B The value Vmax is compared with the carry value V2 in base N, and the register B is adjusted based on the comparison result. B The validity of the value Vmax is determined, and the number system is corrected based on the determination result, where:
[0092] When Vmax < V2, the decision register B B The value Vmax is valid if it is valid, and no correction is made for the number system.
[0093] When Vmax ≥ V2, the decision register B is used. B If the value of Vmax is invalid, the radix processing is corrected, the loop flag is set, the register value is reset, and the loop restarts to add increment and radix processing.
[0094] Specifically, the increment processing refers to adding an increment A to the value of register B1 according to the current marking sequence number. The base processing refers to carrying over the value of the register according to the carry value in base N. The second laser processing data refers to the character to be laser-processed for the current marking sequence number. The value of register B1 in the increment process refers to the value of register B1 after each increment A. The carry value in base N refers to the value that needs to be carried over to the higher digit, i.e., N, if the carry condition is met. The carry condition is that the value reaches the base of the current base and carries over to the higher digit. The valid state of the value V1 of register B1 refers to the case where the value V1 of register B1 reaches the carry value in base N and needs to be carried over, and the case where the value V1 of register B1 does not reach the carry value in base N and does not need to be carried over. The value of the subsequent register refers to the value of the register excluding register B1 according to the register arrangement order. The m-th register refers to the register that needs to be processed in base N. The end point of base processing refers to the node where base processing of the register value stops. B The valid value of Vmax refers to the value of register B. B The value Vmax reaches the carry value in base N and register B BThe value Vmax has not reached the carry value in base N. The cycle flag refers to the flag indicating that the cycle of increment and base processing has restarted. The value of the reset register refers to restoring the value of the register to the value when the increment and base processing started for the first time.
[0095] Specifically, step S5 obtains the marking content through the current marking serial number and register set, increments the value of register B1, and performs radix processing on the value of register B1 during the increment process to obtain the second laser processing data, so as to save computer computing resources and achieve the purpose of offline marking serial number.
[0096] Specifically, in step S6, when the first laser processing data and the second laser processing data are used as the final laser processing data to control the laser control card for laser processing, the laser control card controls the laser marking machine according to the first laser processing data and the second laser processing data to complete the laser processing.
[0097] Specifically, the laser marking machine refers to a precision processing device that uses a high-energy laser beam to make permanent marks on the surface of a material, and completing the laser processing refers to completing the laser processing target on the marked material.
[0098] Specifically, step S6 controls the laser control card to perform laser processing by using the first laser processing data and the second laser processing data as the final laser processing data, so as to improve the accuracy and efficiency of laser processing and thus save production costs.
[0099] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A method for offline marking of serial numbers on a laser control card, characterized in that, The method includes: Step S1: Obtain the marking template and character data; Step S2: Obtain the character content attributes based on the character position and marking template in the character data, and set the fixed index module based on the character content attributes and marking template; Step S3: Obtain the number of variable characters based on the character content attribute, set the register based on the number of variable characters, and set the variable index module based on the register; Step S4: Obtain the fixed character processing position set according to the fixed index module and the fixed character position set, and obtain the variable character processing position set according to the variable index module and the variable character position set, and output the fixed character processing position set and the variable character processing position set as the first laser processing data; Step S5: Obtain the marking content based on the current marking serial number and register set to obtain the second laser processing data; Step S6: Use the first laser processing data and the second laser processing data as the final laser processing data to control the laser control card to perform laser processing; In step S2, when obtaining character content attributes based on the character position Wt in the character data and the marking template, the character position Wt is compared with each individual item in the fixed character position set WM={WM1,WM2,WM3,...,WMf-1,WMf} in the marking template. The position matching is judged based on the comparison results, and the character content attributes are output based on the judgment results. Here, t represents the character order, and t is a positive integer. When Wt matches one of the individual items in the fixed character position set WM, the position matching is determined to be a match, the fixed character is output as a character content attribute, and all character positions with the fixed character content attribute are stored to obtain the fixed character position set; When Wt is inconsistent with all individual items in the fixed character position set WM, the position matching is determined to be mismatched. The variable character is output as a character content attribute, and the position of all characters whose character content attribute is the variable character is stored to obtain the variable character position set.
2. The method for offline marking of serial numbers on a laser control card according to claim 1, characterized in that, In step S2, when setting the fixed index module according to character attributes and marking template, the characters to be marked are scaled according to the height of the marked characters in the marking template and the ratio of the width of the marked characters to the height of the marked characters, to obtain the first marking template character, and the current width A of the first marking template character is set. i To retrieve the value, the current width A of the first marked template character is determined. i The template serial number character width AM in the marking template is offset from the fixed character SF. i Perform calculations and set SF. i =A i -AM, the fixed character deviation includes a first fixed character deviation SF1, a second fixed character deviation SF2, a third fixed character deviation SF3, ..., the (i-1)th fixed character deviation SF i-1 and the deviation of the i-th fixed character SF i The system uses fixed characters as fixed indices, and takes the fixed character deviation corresponding to the fixed character and the marking position of the corresponding fixed character position in the marking template as the index result to obtain a fixed index module. The fixed index module includes a first fixed index module DF1, a second fixed index module DF2, a third fixed index module DF3, ..., an (i-1)th fixed index module DF i-1 and the i-th fixed index module DF i The marking positions corresponding to the fixed character positions in the marking template include the fixed character starting processing position RF1, the first fixed character processing position TF1, the second fixed character processing position TF2, the third fixed character processing position TF3, ..., the t-th fixed character processing position TFt.
3. The method for offline marking of serial numbers on a laser control card according to claim 2, characterized in that, Step S3 involves obtaining the number of variable characters based on the character content attributes. When setting the registers based on the number of variable characters, the number m of the position sequence of the variable characters in the variable character position sequence set is obtained, and the number of registers is set according to the number m of the position sequence of the variable characters, resulting in m registers. The m registers include: Register B m Register B m-1 Register B m-2 Registers B2 and B1 are used, and the variable character content of each of the m registers is set according to the required base, so as to obtain the content of all variable characters involved in the required base. The increment of the register variable characters is set to G.
4. The method for offline marking of serial numbers on a laser control card according to claim 3, characterized in that, In step S3, when setting the variable index module according to the register, the content of all variable characters involved in the required base is scaled according to the height of the marked characters in the marked template and the ratio of the marked character width to the marked character height, to obtain the second marked template character, and the current width Q of the second marked template character is set. n To obtain the value, based on the current width Q of the second marking template character. n The template serial number character width AM in the marking template is compared with the variable character deviation SQ. n Perform calculations and set SQ n =Q n -AM, the variable character deviation includes the first variable character deviation SQ1, the second variable character deviation SQ2, the third variable character deviation SQ3, ..., the (n-1)th variable character deviation SQ n-1 Deviation SQ from the nth variable character n Let n be the base of the required number system. The content of all variable characters involved in the required number system is used as the variable index. The deviation of the variable characters corresponding to the content of all variable characters involved in the required number system and the marking position of the corresponding variable character in the marking template are used as the index result to obtain the variable index module. The variable index module includes: a first variable index module DQ1, a second variable index module DQ2, a third variable index module DQ3, ..., an (n-1)th variable index module DQ n-1 and the nth variable index module DQ n The marking positions of the corresponding variable characters in the marking template include the variable character starting processing position RQ1, the first variable character processing position TQ1, the second fixed character processing position TQ2, the third fixed character processing position TQ3, ..., the t-th fixed character processing position TQt.
5. The method for offline marking of serial numbers on a laser control card according to claim 4, characterized in that, In step S4, when obtaining the fixed character processing position set based on the fixed index module and the fixed character position set, the following is stated: When the character position of the fixed character is the first character, match the fixed index module corresponding to the first character, obtain the first fixed character processing position TF1, the fixed character starting processing position RF1, and the first fixed character deviation SF in the fixed index module. 1, Set the current cumulative character deviation to L1, L1=0, set the base deviation to X1, X1=0, and set the character deviation S1=SF. 1, Get the starting processing position R1 of the first character in the marking template, set the deviation between the marking template and the index module to R, R=R1-RF1, calculate the current character processing position P1, and set P1=R+TF1+L1+X1; When the character position of the fixed character is the second character, match the fixed index module corresponding to the second character, obtain the processing position TF2 of the second fixed character in the fixed index module, and the deviation SF of the second fixed character. 2, Let the current cumulative character deviation be L2, L2=S1, let the base deviation be X2, X2=(2-1)×D, where D is the character spacing, and let the character deviation S2=SF. 2, Calculate the current character processing position P2, and set P2 = R + TF2 + L2 + X2; When the character position of the fixed character is the third character, match the fixed index module corresponding to the third character, obtain the processing position TF3 of the third fixed character in the fixed index module, and the deviation SF of the third fixed character. 3, Let the current cumulative character deviation be L3, where L3 = S1 + S2. Let the base deviation be X3, where X3 = (3-1) × D. Let the character deviation S3 = SF. 3, Calculate the current character processing position P3, and set P3 = R + TF3 + L3 + X3; …… When the character position of the fixed character is the t-th character, match the fixed index module corresponding to the t-th character, obtain the processing position TFt of the t-th fixed character in the fixed index module, and the fixed character deviation SF. t, Let the current cumulative character deviation be Lt, where Lt = S1 + S2 + ... + St-1; let the base deviation be Xt, where Xt = (t-1) × D; and let the character deviation S be... t =SF t, Calculate the current character processing position Pt, and set Pt = R + TFt + Lt + Xt; The process continues until the processing positions of all fixed characters are calculated, resulting in a set of fixed character processing positions.
6. The method for offline marking of serial numbers on a laser control card according to claim 5, characterized in that, In step S4, when the variable character processing position set is obtained based on the variable index module and the variable character position set, and the fixed character processing position set and the variable character processing position set are output as the first laser processing data, the following is stated: When the variable character is the first character, read register B1 corresponding to the variable character with the first character position. Match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register B1. Obtain the processing position TQ1 of the first variable character and the starting processing position RQ1 of the variable character in the j-th variable index module, and the deviation SQ of the j-th variable character. j ,j represents the order of all variable characters involved in the required base, j=1, 2, 3, n, set the current cumulative character deviation to L1, L1=0, set the base deviation to X1, X1=0, and set the character deviation S1=SQ j, Get the starting processing position R1 of the first character in the marking template, set the deviation between the marking template and the index module to R, R=R1-RQ1, calculate the current character processing position P1, and set P1=R+TQ1+L1+X1; When the character position of the variable character is the second character, read register B2 corresponding to the variable character with the second character position, match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register B2, obtain the processing position TQ2 of the second character in the j-th variable index module, and the deviation SQ of the second variable character. 2, Let the current cumulative character deviation be L2, L2=S1, let the base deviation be X2, X2=(2-1)×D, and let the character deviation S2=SQ. j, Calculate the current character processing position P2, and set P2 = R + TQ2 + L2 + X2; When the character position of the variable character is the third character, read register B3 corresponding to the variable character with the third character position, match the content of all variable characters involved in the required base of register B3 with the j-th variable index module, obtain the processing position TQ3 of the third character in the j-th variable index module, and the deviation SQ of the third variable character. 3, Set the current cumulative character deviation to L3, L3 = S1 + S2, set the base deviation to X3, X3 = (3-1) × D, and set the character deviation S3 = SQ. j, Calculate the current character processing position P3, and set P3 = R + TQ3 + L3 + X3; …… When the character position of the variable character is the t-th character, read the register Bm corresponding to the variable character with the t-th character position, match the j-th variable index module corresponding to the content of all variable characters involved in the required base of register Bm, obtain the processing position TQt of the t-th character in the j-th variable index module, and the deviation SQ of the t-th variable character. t, Let the current cumulative character deviation be Lt, where Lt = S1 + S2 + S3 + ... + S t Let the base deviation be Xt, where Xt = (t-1) × D, and let the character deviation be S. t =SQ j, Calculate the current character processing position Pt, and set Pt = R + TQt + Lt + Xt; The process continues until the processing positions of all variable characters are calculated, resulting in a set of variable character processing positions. The set of fixed character processing positions and the set of variable character processing positions are then output as the first laser processing data.
7. The method for offline marking of serial numbers on a laser control card according to claim 6, characterized in that, In step S5, when acquiring the marking content based on the current marking serial number and register set, the value of register B1 is incremented, and the value of register B1 during the incrementing process is processed by a base to obtain the second laser processing data. The value R1 of register B1 is incremented to obtain the incremented value V1, where V1 = R1 + G. The incremented value V1 of register B1 is compared with the carry value V2 in base N. Based on the comparison result, the validity of the incremented value V1 of register B1 is determined, and based on the determination result, the incremented value V1 of register B1 during the incrementing process is processed by a base, wherein: When V1 < V2, the value V1 of register B1 after increment processing is determined to be valid. No radix processing is performed on the value V1 of register B1 after increment processing, and increment processing continues. When V1≥V2, the value V1 of register B1 after increment processing is determined to be invalid, and the value V1 of register B1 after increment processing is processed by base.
8. The method for offline marking of serial numbers on a laser control card according to claim 7, characterized in that, The number base processing includes: Set the value of register B1 after base processing to V1`, where V1` = V1 - V2. Increment the value of register B2 by 1, and obtain the values of subsequent registers. Perform base processing on the values of subsequent registers one by one, and set the value of register B1 to the i-th bit. i The value is R i The value of the i-th bit register after base conversion is Vi, where Vi = R i +1, compare the value Vi of the i-th register after base processing with the carry value V2 in base N, determine whether the base processing endpoint has been reached based on the comparison result, and control the base processing process accordingly, where: When Vi < V2, it is determined that the base processing end point has been reached, and the base processing process is controlled by terminating the subsequent registers one by one for base processing. When Vi ≥ V2, it is determined that the base processing endpoint has not been reached. The control method for the base processing process is to continue processing the subsequent registers one by one, and to obtain the base-processed register B in real time. B The value Vmax will be transferred to register B. B The value Vmax is compared with the carry value V2 in base N, and the register B is adjusted based on the comparison result. B The validity of the value Vmax is determined, and the number system is corrected based on the determination result, where: When Vmax < V2, the decision register B B The value Vmax is valid if it is valid, and no correction is made for the number system. When Vmax ≥ V2, the decision register B is used. B If the value of Vmax is invalid, the radix processing is corrected, the loop flag is set, the register value is reset, and the loop restarts to add increment and radix processing.
9. The method for offline marking of serial numbers on a laser control card according to claim 8, characterized in that, In step S6, when the first laser processing data and the second laser processing data are used as the final laser processing data to control the laser control card for laser processing, the laser control card controls the laser marking machine according to the first laser processing data and the second laser processing data to complete the laser processing.
Citation Information
Patent Citations
Time information identification method and device
CN104951508A
Laser engraving method
CN107554112A