[go: up one dir, main page]

CN119129615B - Method for configuring coding position of workpiece - Google Patents

Method for configuring coding position of workpiece

Info

Publication number
CN119129615B
CN119129615B CN202411118544.8A CN202411118544A CN119129615B CN 119129615 B CN119129615 B CN 119129615B CN 202411118544 A CN202411118544 A CN 202411118544A CN 119129615 B CN119129615 B CN 119129615B
Authority
CN
China
Prior art keywords
workpiece
coding
plate
rotation angle
standard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411118544.8A
Other languages
Chinese (zh)
Other versions
CN119129615A (en
Inventor
赵佳峰
赵欣
陈忠
张艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Puda Software Technology Co Ltd
Original Assignee
Tianjin Puda Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Puda Software Technology Co Ltd filed Critical Tianjin Puda Software Technology Co Ltd
Priority to CN202411118544.8A priority Critical patent/CN119129615B/en
Publication of CN119129615A publication Critical patent/CN119129615A/en
Application granted granted Critical
Publication of CN119129615B publication Critical patent/CN119129615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41MPRINTING, DUPLICATING, MARKING, OR COPYING PROCESSES; COLOUR PRINTING
    • B41M5/00Duplicating or marking methods; Sheet materials for use therein
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/407Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for marking on special material
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41MPRINTING, DUPLICATING, MARKING, OR COPYING PROCESSES; COLOUR PRINTING
    • B41M1/00Inking and printing with a printer's forme
    • B41M1/26Printing on other surfaces than ordinary paper
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K5/00Methods or arrangements for verifying the correctness of markings on a record carrier; Column detection devices
    • G06K5/04Verifying the alignment of markings
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Manufacturing & Machinery (AREA)
  • Numerical Control (AREA)

Abstract

The invention relates to a method for configuring a coding position of a workpiece, which comprises the following steps of configuring coding parameters according to coding requirements of clients, establishing a workpiece coordinate system, establishing a plate coordinate system if a plate workpiece is coded before plate cutting, analyzing a workpiece drawing, acquiring a coding frame area according to a coding display mode, calculating a coding area of a standard workpiece, calculating an optimal coding position of the standard workpiece in the coding area of the standard workpiece, and calculating the optimal coding position of the plate workpiece if the plate workpiece is coded before plate cutting.

Description

Method for configuring coding position of workpiece
Technical Field
The invention is oriented to the field of intelligent manufacturing, relates to a digital processing technology of workpiece coding, and provides a novel method for automatically and rapidly configuring a workpiece coding position.
Background
When the work piece is required to be traced back, the production line of the modern factory is an effective mode for coding and identifying the work piece by scanning. The coding process is performed before the plate is cut, and after the individual workpieces are sanded or leveled. The code content can be plain code, graphic code or both. The coding mode can be laser coding or ink-jet coding. In order to improve coding efficiency and reduce manual intervention, the method can be used for automatically configuring a relatively optimal coding position according to the pose and the size of each workpiece, and providing technical support for automatic coding through coding equipment.
Disclosure of Invention
The invention aims at the intelligent manufacturing field and provides a method for automatically and rapidly configuring a workpiece coding position. The technical scheme of the invention is as follows:
A method for configuring a workpiece coding position, comprising the steps of:
Step 1, configuring coding parameters according to coding requirements of clients;
Step 2, establishing a workpiece coordinate system;
Step 3, if the plate workpiece is coded before the plate is cut, a plate coordinate system is established;
step 4, analyzing a workpiece drawing;
step 5, acquiring a code frame printing area according to a code printing display mode;
step 6, calculating a code-bearable area of the standard workpiece, wherein the method comprises the following steps:
(1) According to the coding safety distance, the outer outline of the coding frame area is expanded outwards at equal distance to obtain a new area formed after the coding frame is expanded outwards;
(2) Calculating the radius R of a circumscribed circle of a new area formed after the code printing frame is expanded;
(3) The outer contours of the standard workpiece are contracted inwards at equal intervals, all the inner contours of the standard workpiece are expanded outwards at equal intervals, and the inward contraction and outward expansion distances are the radius R of the circumscribed circle obtained in the last step;
(4) Redundancy processing is carried out on the new outline of the standard workpiece after the outer outline is contracted and the new outline of the standard workpiece after the inner outline is expanded, so that a code-bearable area of the standard workpiece is obtained;
Step 7, calculating the optimal coding position of the standard workpiece in the coding region of the standard workpiece;
Step 8, if the plate workpiece is coded before the plate is cut, calculating the optimal coding position of the plate workpiece
(1) According to the coding sequence of the plate workpieces and the setting value of the coding machine in the preferential axial direction, sequencing all the plate workpieces needing to be configured with coding positions according to the positions;
(2) Circularly traversing the ordered plate workpiece list, executing the following steps (3) - (5), and configuring the optimal coding position for each plate workpiece in sequence;
(3) Calculating the rotation angle of the coding machine according to the rotation angle of the plate workpiece;
(4) If the rotation angle of the coding machine of the plate workpiece is in the rotatable range of the coding machine, indicating that the coding position configuration of the standard workpiece is suitable for the current plate workpiece, and calculating the coding position coordinates of the plate workpiece based on the plate coordinate system according to the coding position coordinates of the standard workpiece;
(5) If the rotation angle of the coding machine of the plate workpiece is not in the rotatable range of the coding machine, the coding position needs to be reconfigured for the current plate workpiece;
And 8, automatically coding the workpiece.
Further, in step 1, the coding parameters mainly include:
(1) The selectable items comprise graphic codes, plain codes, up-and-down typesetting of the graphic codes and the plain codes, and left-and-right typesetting of the graphic codes and the plain codes;
(2) Configuring the graphic code size, wherein the configuration items comprise graphic code length and graphic code width, and the graphic code length and the graphic code width are preferably used for attempting to configure the workpiece coding position by using the large graphic code size;
(3) Configuring the size of the plain code, wherein the configuration items comprise a plain code length and a plain code width, and preferentially attempting to configure the coding position of the workpiece by using the large plain code size;
(4) The method comprises the following steps of searching a starting point of a workpiece coding position, wherein selectable items comprise a center point, an upper left corner, a lower left corner, an upper right corner and a lower right corner;
(5) Configuring a coding safety distance;
(6) If coding is carried out on the plate workpiece before cutting the plate, configuring a rotatable range of a coding machine;
(7) If the plate workpiece is coded before the plate is cut, configuring coding sequence of each workpiece;
(8) If the plate workpiece is coded before the plate is cut, the preferential axial direction is configured.
Further, step 4, analyzing the workpiece drawing, including:
If the plate workpiece is coded before cutting, a nesting chart needs to be analyzed, a workpiece nesting filling chart including a standard workpiece, coordinates and rotation angles of the workpiece on the plate are generated, and the length and width of the nesting workpiece, the size type of the workpiece and the gravity center information are calculated;
if the plate workpiece is coded after the plate is cut, a single workpiece diagram needs to be analyzed, a standard workpiece filling diagram is generated, and the length and width of the workpiece, the size type of the workpiece and the gravity center information are calculated.
Further, in step 7, the mode of searching the best coding position from the "center point" of the standard workpiece is as follows:
(1) Calculating the coordinate of the center point of the minimum circumscribed rectangle of the standard workpiece;
(2) Setting an angle step length, namely drawing a ray at intervals of the angle step length from 0 DEG by taking a center point of a standard workpiece as a circle center;
(3) Acquiring intersection points of each ray and a code-ready area of a standard workpiece:
If the 'center point' of the standard workpiece is above or outside the new outer contour of the code-ready area of the standard workpiece, all intersection points of each ray and the new outer contour of the code-ready area of the standard workpiece are obtained;
If the 'center point' of the standard workpiece is on or in the new inner outline of the code-ready area of the standard workpiece, all intersection points of each ray and the new inner outline of the code-ready area of the standard workpiece are obtained;
(4) And calculating the distance between all the intersection points and the center point of the standard workpiece, and sequencing from small to large, wherein the intersection point with the smallest distance is the optimal coding position of the standard workpiece.
Further, in step 8, the method for calculating the rotation angle of the coding machine according to the rotation angle of the plate workpiece
The following are provided:
① Acquiring a rotatable range of a coding machine;
② If the rotatable range of the coding machine is-180 degrees, adjusting according to the rotation angle of the plate workpiece:
If the rotation angle range of the plate workpiece is 0-180 degrees and does not contain 180 degrees, the rotation angle of the coding machine is the rotation angle of the plate workpiece, namely the rotation angle range of 0-180 degrees;
If the rotation angle range of the plate workpiece is 180-360 degrees and 180 degrees are included, the rotation angle of the coding machine is obtained by subtracting 360 degrees from the rotation angle of the plate workpiece, namely the rotation angle is-180-0 degrees;
③ If the rotatable range of the coding machine is-90 degrees to 90 degrees, adjusting according to the rotation angle of the plate workpiece:
If the rotation angle range of the plate workpiece is 0-90 degrees and does not contain 90 degrees, the rotation angle of the coding machine is the rotation angle of the plate workpiece, namely the rotation angle range of 0-90 degrees;
if the rotation angle range of the plate workpiece is 90-270 degrees and 270 degrees are not included, subtracting 180 degrees from the rotation angle of the plate workpiece, namely-90 degrees;
If the rotation angle range of the plate workpiece is 270-360 degrees and 270 degrees are included, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 360 degrees, namely the rotation angle is minus 90-0 degrees.
Further, in step 8, a method for calculating the coding position coordinates of the plate workpiece based on the plate coordinate system
The method is as follows:
① Obtaining coding position coordinates of a standard workpiece;
② Calculating coordinates of coding positions when the standard workpiece rotates around the gravity center by a specified angle, namely the coding machine rotation angle of the plate workpiece is overlapped with the gravity center of the plate workpiece;
③ Acquiring the barycenter coordinates of the plate workpiece based on a plate coordinate system;
④ When the center of gravity of the standard workpiece is calculated to be coincident with the center of gravity of the plate workpiece, the coding position is based on the coordinates of the plate coordinate system.
Further, in the case of requiring a spray assembly line on the board, in the processing of the step (4) and the step (5) in the step 8, it is necessary to increase the judgment of whether the coding position intersects with the assembly line, and if so, it is necessary to find a new position again.
Drawings
FIG. 1 is a diagram of an example of a graphic code;
FIG. 2 illustrates an example diagram;
FIG. 3 is a diagram of an example of an up-down layout of graphic codes and plain codes;
FIG. 4 is a diagram of an example left-right typesetting of graphic codes and plain codes;
FIG. 5 is a diagram of an example of the size of a graphic code;
FIG. 6 illustrates an example of a size of a code;
FIG. 7 is a diagram illustrating an example of a starting point for finding a workpiece coding position;
FIG. 8 is an exemplary diagram of a workpiece coordinate system;
FIG. 9 is an exemplary diagram of a sheet coordinate system;
FIG. 10 is a diagram of an example of a framed area with a top-bottom typeset of graphic codes and plain codes;
FIG. 11 is a diagram of an example of a framed area of a left-right typeset of graphic codes and plain codes;
FIG. 12 is a diagram of an example of a new region formed after frame expansion;
FIG. 13 is a graph illustrating the radius of the circumscribed circle of the new region formed after the expansion of the code frame;
FIG. 14 is a diagram of an exemplary new profile after the standard workpiece profile is scaled in and out;
FIG. 15 is a diagram of an example after a new profile redundancy process after a standard workpiece profile is scaled in and out;
FIG. 16 is a diagram of an exemplary center point of a master workpiece;
FIG. 17 illustrates an example of all intersections of rays with redundant processed outer contours
FIG. 18 illustrates an example of all intersections of rays with redundant processed inner contours
FIG. 19 is an example of an optimal code location for a standard workpiece
FIG. 20 is an exemplary diagram of automatic coding of a sheet workpiece
Detailed Description
The invention will be described with reference to examples.
1. Configuring coding parameters
And configuring coding parameters according to coding requirements of clients. The coding parameters mainly comprise:
(1) And (5) coding display mode. As shown in figures 1-4, the selectable items comprise graphic codes, plain codes, up-and-down typesetting of the graphic codes and the plain codes, and left-and-right typesetting of the graphic codes and the plain codes.
(2) Graphic code size. As shown in fig. 5, the configuration items include a graphic code length and a graphic code width. The large, medium and small graphic code sizes can be configured according to the requirements, and the workpiece coding position is preferably configured by using the large graphic code size.
(3) The size of the plain code. As shown in fig. 6, the configuration items include a plaintext length and a plaintext width. The large, medium and small size can be configured according to the requirement, and the workpiece coding position is configured by preferentially attempting to use the large size.
(4) Searching for a starting point of a coding position of the workpiece. The alternatives shown in fig. 7 include a center point (most commonly used), an upper left corner, a lower left corner, an upper right corner, and a lower right corner.
(5) Coding a safe distance. And allowing the minimum distance between the outer contour of the code printing frame and the inner contour and the outer contour of the workpiece. The proper coding safety distance can be configured according to the mechanical precision.
(6) The encoder can rotate the range. The parameter is only suitable for coding scenes of the plate workpiece before plate cutting.
(7) Coding sequence. The parameter is only suitable for coding scenes of the plate workpiece before plate cutting. The selectable items include top to bottom and left to right, left to right and top to bottom, bottom to top and left to right, left to right and bottom to top, right to left and top to bottom, right to left and bottom to top, finding the next nearest workpiece, Y-direction increment.
(8) Preferably axial. The parameter is only suitable for coding scenes of the plate workpiece before plate cutting. The X-axis and Y-axis of the coding machine have very different moving speeds, and in order to improve coding efficiency, the coding machine moves along the axial direction with high moving speed as much as possible. The selectable items include none, preferential X-axis parallel movement coding and preferential Y-axis parallel movement coding.
2. And establishing a workpiece coordinate system. The workpiece coordinate system takes the lower left corner of the minimum circumscribed rectangle of the workpiece as an original point, the horizontal right direction is the X-axis forward direction, and the vertical upward direction is the Y-axis forward direction.
An example of a workpiece coordinate system is shown in fig. 8.
3. And establishing a plate coordinate system. The plate coordinate system takes the lower left corner of the plate as an origin, the horizontal right direction is the X-axis forward direction, and the vertical upward direction is the Y-axis forward direction.
An example of a plate coordinate system is shown in fig. 9.
4. Analyzing workpiece drawing
Analyzing the workpiece drawing is the basis for configuring the coding position of the workpiece.
For the scene of coding before cutting the plate, the overprinting graph needs to be analyzed. The analysis result can generate a workpiece jacking filling map, coordinates and rotation angles of the workpiece on the plate (if the workpiece jacking map is analyzed), and information such as the length and width of the workpiece jacking, the size type of the workpiece, the gravity center and the like is calculated.
For the scenario where the coding is performed after the workpiece is sanded or leveled, it is necessary to resolve a single workpiece map. And the analysis result can generate a standard workpiece filling diagram, and calculate the length and width of the workpiece, the size type and the gravity center of the workpiece and other information.
The workpiece sleeve filling pattern and the workpiece filling pattern are black backgrounds, and the surface of the workpiece is filled with white.
The drawing parsing algorithm is complex and is not described in this document. See patent CN202310276738.X for an analytical method for a sheet-like workpiece nesting drawing.
5. And acquiring a code frame printing area.
(1) If the code display mode is the graphic code, the rectangular area framed by the length and the width of the graphic code is taken as the code frame area.
(2) If the coding display mode is 'clear', the rectangular area framed by 'clear length and width' is taken as 'coding frame area'.
(3) If the code printing display mode is the pattern code and the plain code up-and-down typesetting, the rectangular area framed by the pattern code length and width and the rectangular area framed by the plain code length and width are subjected to up-and-down seamless connection and left alignment to form a new area which is used as the code printing frame area. As shown in fig. 10.
(4) If the coding display mode is the typesetting of the graphic code and the plain code left and right, the rectangular area framed by the length and the width of the graphic code and the rectangular area framed by the length and the width of the plain code are subjected to left and right seamless connection and top alignment to form a new area which is used as the coding frame area. As shown in fig. 11.
6. And (3) expanding the outer outline of the code frame region equidistantly, wherein the expansion distance is the code safety distance, and a new region formed after the code frame is expanded is obtained. As shown in fig. 12.
7. And calculating the radius R of the circumscribed circle of the new area formed after the code frame is expanded. As shown in fig. 13.
8. The outer contours of the standard workpiece are contracted inwards at equal intervals, and then all the inner contours of the standard workpiece are expanded outwards at equal intervals, wherein the inward contraction and outward expansion distances are the circumscribed circle radius R obtained in the last step. As shown in fig. 14.
9. And carrying out redundancy treatment on the new profile after the outer profile of the standard workpiece is contracted and the inner profile is expanded, wherein the steps are as follows:
and removing all redundant contours except the new contour after the outer contour is retracted.
And removing all redundant contours inside the new contour after the inner contour is expanded.
According to practical experience, the workpiece size is far larger than the code frame size, and the method for calculating the code-bearable area of the standard workpiece is improved in order to save calculation time. Firstly, the code frame is subjected to outward expansion according to the code safety distance, the circumcircle radius R of a new area formed after the code frame is subjected to outward expansion is calculated, all contours of a standard workpiece are subjected to equidistant outward expansion or inward contraction distance according to the circumcircle radius R, and then the new contours formed after the inward contraction and outward expansion are subjected to redundancy treatment. As shown in fig. 15.
10. And calculating the optimal coding position of the standard workpiece.
Taking the case of searching the optimal coding position from the center point of the standard workpiece, other implementations of searching the starting point of the coding position of the workpiece are similar, and the center point in the following steps is replaced by the upper left corner, the lower left corner, the upper right corner or the lower right corner. The method comprises the following specific steps:
(1) The standard workpiece "center point" coordinates are calculated. The "center point" of the standard workpiece is the intersection of the minimum bounding rectangle diagonals of the standard workpiece. As shown in fig. 16.
(2) Setting the angle step length to be 10 degrees, taking the center point of a standard workpiece as the center of a circle, and drawing a ray every 10 degrees from 0 degrees clockwise, wherein 36 rays are drawn in total.
(3) And acquiring the intersection points of the 36 rays and the redundant processed outer contour or inner contour.
① If the standard workpiece "center point" is on or off the redundant "outer contour", all the intersections of the 36 rays with the redundant "outer contour" are taken. If no intersection point exists, the best coding position of the standard workpiece is not found. As shown in fig. 17.
② If the standard workpiece "center point" is on or within the redundant "inner contour," all the intersections of the 36 rays with the redundant "inner contour" are taken. If no intersection point exists, the best coding position of the standard workpiece is not found. As shown in fig. 18.
(4) And calculating the distance between all the intersection points and the center point of the standard workpiece, and sequencing from small to large, wherein the intersection point with the smallest distance is the optimal coding position of the standard workpiece. As shown in fig. 19.
11. Calculating the optimal coding position of the plate workpiece
(1) And sorting all the plate workpieces needing to be configured with the coding positions according to the coding sequence of the plate workpieces and the setting value of the coding machine in the preferential axial direction.
(2) And circularly traversing the ordered plate workpiece list, and carrying out the following steps to configure the optimal coding position for each plate workpiece in turn.
(3) And calculating the rotation angle of the coding machine according to the rotation angle of the plate workpiece.
① A rotatable range of the code printer is acquired.
② If the rotatable range of the coding machine is-180 degrees, adjusting according to the rotation angle of the plate workpiece:
If the rotation angle range of the plate workpiece is 0-180 degrees and does not contain 180 degrees, the rotation angle of the coding machine is the rotation angle of the plate workpiece, namely, the rotation angle range of 0-180 degrees.
If the rotation angle range of the plate workpiece is 180-360 degrees and 180 degrees are included, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 360 degrees, namely the rotation angle is minus 180-0 degrees.
③ If the rotatable range of the coding machine is-90 degrees to 90 degrees, adjusting according to the rotation angle of the plate workpiece:
If the rotation angle range of the plate workpiece is 0-90 degrees and does not contain 90 degrees, the rotation angle of the coding machine is the rotation angle of the plate workpiece, namely, the rotation angle range of 0-90 degrees.
If the rotation angle range of the plate workpiece is 90-270 degrees and 270 degrees are not included, the rotation angle of the coding machine is 180 degrees subtracted from the rotation angle of the plate workpiece, namely the rotation angle is-90 degrees.
If the rotation angle range of the plate workpiece is 270-360 degrees and 270 degrees are included, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 360 degrees, namely the rotation angle is minus 90-0 degrees.
(4) If the rotation angle of the coding machine of the plate workpiece is within the rotatable range of the coding machine, the coding position configuration of the standard workpiece is indicated to be suitable for the current plate workpiece. According to the coding position coordinates of the standard workpiece, calculating the coding position coordinates of the plate workpiece based on the plate coordinate system:
① And obtaining the coding position coordinates of the standard workpiece.
② And calculating coordinates of the coding position when the standard workpiece rotates around the gravity center by a specified angle (namely the coding machine rotation angle of the plate workpiece) and the gravity center of the plate workpiece is overlapped.
③ And acquiring the barycenter coordinates of the plate workpiece based on the plate coordinate system.
④ When the center of gravity of the standard workpiece is calculated to be coincident with the center of gravity of the plate workpiece, the coding position is based on the coordinates of the plate coordinate system.
(5) If the plaiting machine rotation angle of the sheet workpiece is not within the rotatable range of the plaiting machine, the plaiting position needs to be reconfigured for the current sheet workpiece.
(6) In the case where the spray assembly line is required on the sheet material, in the above processing in the steps (4) and (5), judgment as to whether the coding position intersects the assembly line is added. If so, a new location needs to be found again.
12. Automatic coding of workpieces
And generating a template file of the outline of the single workpiece according to the drawing analysis result, and identifying the workpiece according to the workpiece template by machine vision. And the manipulator provided with the coding head codes the workpiece according to the optimal coding position coordinates of the workpiece. As shown in fig. 20.

Claims (6)

1.一种用于配置工件打码位置的方法,包括下列步骤:1. A method for configuring a workpiece coding position, comprising the following steps: 步骤1,根据客户的打码要求配置打码参数;Step 1: Configure the coding parameters according to the customer's coding requirements; 步骤2,建立工件坐标系;Step 2, establish the workpiece coordinate system; 步骤3,若在板材切割前对板材工件进行打码,建立板材坐标系;Step 3: If the sheet workpiece is coded before cutting, establish the sheet coordinate system; 步骤4,解析工件图纸;Step 4, parsing the workpiece drawing; 步骤5,根据打码显示方式,获取打码框区域;Step 5: Get the coding frame area according to the coding display mode; 步骤6,计算标准工件的可打码区域,方法如下:Step 6: Calculate the printable area of the standard workpiece as follows: (1)根据打码安全距离,将打码框区域的外轮廓等距离外扩,得到打码框外扩后形成的新区域;(1) According to the coding safety distance, the outer contour of the coding frame area is expanded at equal distances to obtain a new area formed by the expansion of the coding frame; (2)计算打码框外扩后形成的新区域的外接圆半径R;(2) Calculate the radius R of the circumscribed circle of the new area formed after the coding frame is expanded; (3)将标准工件的外轮廓等距离内缩;将标准工件的所有内轮廓等距离外扩,内缩和外扩距离均为上一步取得的外接圆半径R;(3) The outer contour of the standard workpiece is retracted at equal distances; all the inner contours of the standard workpiece are expanded at equal distances, and the retraction and expansion distances are both the circumscribed circle radius R obtained in the previous step; (4)将标准工件外轮廓内缩后的新轮廓和内轮廓外扩后的新轮廓进行冗余处理,获取标准工件的可打码区域;(4) Redundant processing is performed on the new contour after the outer contour of the standard workpiece is shrunk inward and the new contour after the inner contour is expanded outward to obtain the coding area of the standard workpiece; 步骤7,在标准工件的可打码区域内,从标准工件“中心点”开始寻找最佳打码位置,具体步骤如下:Step 7: Find the best coding position starting from the center point of the standard workpiece within the coding area of the standard workpiece. The specific steps are as follows: (1)计算标准工件最小外接矩形“中心点”坐标;(1) Calculate the coordinates of the “center point” of the minimum circumscribed rectangle of the standard workpiece; (2)设定角度步长,以标准工件“中心点”为圆心,从0°开始,每隔角度步长画一条射线;(2) Set the angle step, take the "center point" of the standard workpiece as the center of the circle, start from 0°, and draw a ray every angle step; (3)取得各条射线与标准工件的可打码区域的交点:(3) Obtain the intersection of each ray and the coding area of the standard workpiece: 如果标准工件“中心点”在标准工件的所述可打码区域的外轮廓之上或之外,取得各条射线与标准工件的可打码区域的新的外轮廓的所有交点;如果没有交点,表示没有找到标准工件最佳打码位置;If the "center point" of the standard workpiece is above or outside the outer contour of the codeable area of the standard workpiece, all intersection points of each ray with the new outer contour of the codeable area of the standard workpiece are obtained; if there is no intersection point, it means that the optimal coding position of the standard workpiece has not been found; 如果标准工件“中心点”在标准工件的所述可打码区域的内轮廓之上或之内,取得各条射线与标准工件的可打码区域的新的内轮廓的所有交点;如果没有交点,表示没有找到标准工件最佳打码位置;If the "center point" of the standard workpiece is above or within the inner contour of the codeable area of the standard workpiece, all intersections of each ray and the new inner contour of the codeable area of the standard workpiece are obtained; if there is no intersection, it means that the optimal coding position of the standard workpiece has not been found; (4)计算所有交点与标准工件“中心点”的距离并从小到大排序,距离最小的交点即为标准工件最佳打码位置;(4) Calculate the distance between all intersection points and the “center point” of the standard workpiece and sort them from small to large. The intersection point with the smallest distance is the best coding position for the standard workpiece; 步骤8,若在板材切割前对板材工件进行打码,计算板材工件最佳打码位置,方法如下:Step 8: If the sheet metal workpiece is coded before cutting, calculate the optimal coding position for the sheet metal workpiece as follows: (1)根据板材工件的“打码顺序”和打码机“优先轴向”设定值,对需要配置打码位置的所有板材工件按位置进行排序;(1) According to the "coding order" of the plate workpiece and the "priority axis" setting value of the coding machine, all the plate workpieces that need to be configured with coding positions are sorted by position; (2)循环遍历排序后的板材工件列表,执行以下步骤(3)-(5),依次为每一个板材工件配置最佳打码位置;(2) Loop through the sorted sheet workpiece list and execute the following steps (3)-(5) to configure the best coding position for each sheet workpiece in turn; (3)根据板材工件旋转角度计算打码机的旋转角度;(3) Calculate the rotation angle of the coding machine according to the rotation angle of the plate workpiece; (4)如果板材工件的打码机旋转角度在打码机的可旋转范围内,则表示标准工件的打码位置配置适用于当前板材工件,根据标准工件的打码位置坐标,计算基于板材坐标系的板材工件的打码位置坐标;(4) If the rotation angle of the coding machine of the plate workpiece is within the rotation range of the coding machine, it means that the coding position configuration of the standard workpiece is applicable to the current plate workpiece. According to the coding position coordinates of the standard workpiece, the coding position coordinates of the plate workpiece based on the plate coordinate system are calculated; (5)如果板材工件的打码机旋转角度不在打码机的可旋转范围内,则需要为当前板材工件重新配置打码位置;(5) If the rotation angle of the coding machine of the plate workpiece is not within the rotation range of the coding machine, it is necessary to reconfigure the coding position for the current plate workpiece; 步骤9,工件自动打码。Step 9: Automatically code the workpiece. 2.根据权利要求1所述的用于配置工件打码位置的方法,其特征在于,步骤1中,打码参数主要包括:2. The method for configuring the coding position of a workpiece according to claim 1, wherein in step 1, the coding parameters mainly include: (1)选择打码显示方式:可选项包括:图形码、明码、图形码和明码上下排版、图形码和明码左右排版;(1) Select the code display mode: the options include: graphic code, plain code, graphic code and plain code arranged top to bottom, graphic code and plain code arranged left to right; (2)配置图形码尺寸:配置项包括:图形码长度、图形码宽度;(2) Configure the graphic code size: Configuration items include: graphic code length, graphic code width; (3)配置明码尺寸:配置项包括:明码长度、明码宽度;(3) Configure the size of the plain code: Configuration items include: plain code length and plain code width; (4)寻找工件打码位置的起点:可选项包括:中心点、左上角、左下角、右上角、右下角;(4) Find the starting point of the workpiece coding position: the options include: center point, upper left corner, lower left corner, upper right corner, lower right corner; (5)配置打码安全距离;(5) Configure the coding safety distance; (6)若在板材切割前对板材工件进行打码,配置打码机可旋转范围;(6) If the sheet metal workpiece is to be coded before cutting, the coding machine should be configured with a rotation range; (7)若在板材切割前对板材工件进行打码,配置各个工件的打码顺序;(7) If the sheet metal workpieces are coded before cutting, configure the coding order for each workpiece; (8)若在板材切割前对板材工件进行打码,配置优先轴向。(8) If the sheet metal workpiece is coded before cutting, the axial direction shall be given priority. 3.根据权利要求1所述的用于配置工件打码位置的方法,其特征在于,步骤4解析工件图纸,包括:3. The method for configuring a workpiece coding position according to claim 1, wherein step 4 of parsing the workpiece drawing comprises: 若在板材切割前对板材工件进行打码,需要解析套料图,生成包括标准工件在内的工件套料填充图、工件在板材上的坐标和旋转角度,计算套料工件的长度和宽度、工件的尺寸类型和重心信息;If the sheet metal workpiece is to be coded before cutting, it is necessary to analyze the nesting diagram, generate the workpiece nesting filling diagram including the standard workpiece, the coordinates and rotation angle of the workpiece on the sheet metal, and calculate the length and width of the nested workpiece, the size type and center of gravity information of the workpiece; 若在板材切割后对板材工件进行打码,需要解析单个工件图,生成标准工件填充图,计算工件的长度和宽度、工件的尺寸类型和重心信息。If the sheet metal workpiece is to be coded after cutting, it is necessary to parse the single workpiece image, generate a standard workpiece filling image, and calculate the length and width of the workpiece, the size type and center of gravity information of the workpiece. 4.根据权利要求1所述的用于配置工件打码位置的方法,其特征在于,步骤8的(3)中,根据板材工件旋转角度计算打码机的旋转角度的方法如下:4. The method for configuring a workpiece coding position according to claim 1, wherein in step 8 (3), the method for calculating the rotation angle of the coding machine according to the rotation angle of the plate workpiece is as follows: 1)获取打码机的可旋转范围;1) Obtain the rotation range of the coding machine; 2)如果打码机的可旋转范围是-180°~180°,则根据板材工件的旋转角度做调整:2) If the rotation range of the coding machine is -180°~180°, make adjustments based on the rotation angle of the plate workpiece: 如果板材工件旋转角度范围是0~180°,不包含180°,则打码机的旋转角度为板材工件的旋转角度,即0°~180°范围;If the rotation angle range of the plate workpiece is 0~180°, excluding 180°, the rotation angle of the coding machine is the rotation angle of the plate workpiece, that is, the range of 0°~180°; 如果板材工件旋转角度范围是180~360°,包含180°,则打码机的旋转角度为板材工件的旋转角度减去360°,即-180°~0°范围;If the rotation angle range of the plate workpiece is 180~360°, including 180°, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 360°, that is, the range of -180°~0°; 3)如果打码机的可旋转范围是 -90°~90°,则根据板材工件的旋转角度做调整:3) If the printer's rotation range is -90° to 90°, adjust it according to the rotation angle of the workpiece: 如果板材工件旋转角度范围是0~90°,不包含90°,则打码机的旋转角度为板材工件的旋转角度,即0°~90°范围;If the rotation angle range of the plate workpiece is 0~90°, excluding 90°, the rotation angle of the coding machine is the rotation angle of the plate workpiece, that is, the range of 0°~90°; 如果板材工件旋转角度范围是90°~270°,不包含270°,则打码机的旋转角度为板材工件的旋转角度减去180°,即-90°~90°范围;If the rotation angle range of the plate workpiece is 90°~270°, excluding 270°, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 180°, that is, the range of -90°~90°; 如果板材工件旋转角度范围是270°~360°,包含270°,则打码机的旋转角度为板材工件的旋转角度减去360°,即-90°~0°范围。If the rotation angle range of the plate workpiece is 270°~360°, including 270°, the rotation angle of the coding machine is the rotation angle of the plate workpiece minus 360°, that is, the range of -90°~0°. 5.根据权利要求1所述的用于配置工件打码位置的方法,其特征在于,步骤8的(4)中,计算基于板材坐标系的板材工件的打码位置坐标的方法如下:5. The method for configuring the coding position of a workpiece according to claim 1, wherein in step 8 (4), the method for calculating the coding position coordinates of the plate workpiece based on the plate coordinate system is as follows: 1)获取标准工件的打码位置坐标;1) Obtain the coding position coordinates of the standard workpiece; 2)计算标准工件绕重心旋转指定角度即板材工件的打码机旋转角度与板材工件重心重合时,打码位置的坐标;2) Calculate the coordinates of the coding position when the standard workpiece rotates around the center of gravity by a specified angle, that is, the rotation angle of the coding machine of the plate workpiece coincides with the center of gravity of the plate workpiece; 3)获取板材工件基于板材坐标系的重心坐标;3) Obtain the coordinates of the center of gravity of the plate workpiece based on the plate coordinate system; 4)计算标准工件重心与板材工件重心重合时,打码位置基于板材坐标系的坐标。4) When the center of gravity of the standard workpiece is calculated to coincide with the center of gravity of the plate workpiece, the coding position is based on the coordinates of the plate coordinate system. 6.根据权利要求1所述的用于配置工件打码位置的方法,其特征在于,对于板材上要求喷涂装配线的情况,在步骤8的第(4)步和第(5)步的处理中,需要增加打码位置是否与装配线相交的判断;如果相交,需要重新查找新位置。6. The method for configuring the coding position of a workpiece according to claim 1 is characterized in that, in the case where a spray assembly line is required on the plate, in the processing of steps (4) and (5) of step 8, it is necessary to add a judgment on whether the coding position intersects with the assembly line; if so, a new position needs to be found again.
CN202411118544.8A 2024-08-15 2024-08-15 Method for configuring coding position of workpiece Active CN119129615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411118544.8A CN119129615B (en) 2024-08-15 2024-08-15 Method for configuring coding position of workpiece

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411118544.8A CN119129615B (en) 2024-08-15 2024-08-15 Method for configuring coding position of workpiece

Publications (2)

Publication Number Publication Date
CN119129615A CN119129615A (en) 2024-12-13
CN119129615B true CN119129615B (en) 2025-09-19

Family

ID=93759339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411118544.8A Active CN119129615B (en) 2024-08-15 2024-08-15 Method for configuring coding position of workpiece

Country Status (1)

Country Link
CN (1) CN119129615B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792361A (en) * 2021-09-17 2021-12-14 合肥艾克斯特智能科技有限公司 Part marking method and device based on DXF file and storable medium
CN114549423A (en) * 2022-01-26 2022-05-27 环旭电子股份有限公司 Label integrity self-adaptive detection method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3350324B2 (en) * 1995-10-27 2002-11-25 ブラザー工業株式会社 Character output device
US7296747B2 (en) * 2004-04-20 2007-11-20 Michael Rohs Visual code system for camera-equipped mobile devices and applications thereof
CN116668653A (en) * 2022-12-09 2023-08-29 吉猪信息科技(深圳)有限公司 Interactive projection method, system and device for moving objects
CN116627006A (en) * 2023-05-26 2023-08-22 中国科学院光电技术研究所 A Novel Intelligent Image Alignment Method for Lithographic Equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792361A (en) * 2021-09-17 2021-12-14 合肥艾克斯特智能科技有限公司 Part marking method and device based on DXF file and storable medium
CN114549423A (en) * 2022-01-26 2022-05-27 环旭电子股份有限公司 Label integrity self-adaptive detection method and system

Also Published As

Publication number Publication date
CN119129615A (en) 2024-12-13

Similar Documents

Publication Publication Date Title
CN110434671B (en) Cast member surface machining track calibration method based on characteristic measurement
CN113751824B (en) Automatic generation method and device for groove cutting track, computer equipment and medium
CN106536128B (en) Method, processing machine and computer program product for based on image positioning workpiece process
EP1901059B1 (en) Method for forming master data for inspecting protruding and recessed figure
CN111496789A (en) An offline complex surface spraying trajectory planning system and control method
CN110968039A (en) Graph cutting and sorting processing method applied to laser cutting numerical control machining
CN108480859B (en) Cutting method of wide multifunctional laser machine
CN114111624B (en) Handheld three-dimensional scanning method, equipment and medium with mark point projection device
CN113971661A (en) Machining control method, device and equipment
CN105666274A (en) Dinner plate edging method based on vision control
CN117853742A (en) Welding seam groove feature extraction method based on structured light and welding robot
CN107507177A (en) Processing of robots object localization method and device based on 3-D scanning
CN119129615B (en) Method for configuring coding position of workpiece
CN108465946B (en) Cutting and splicing method of wide multifunctional laser machine
US11230062B2 (en) Method and apparatus for additive manufacturing
CN104599267A (en) Cutting track generating method and device
CN113634915A (en) Cutting device based on vision and cutting method thereof
WO2014096412A2 (en) Method for determining the workpiece location
US20250005878A1 (en) Processing control method and apparatus, and device
CN117086878A (en) Groove cutting method, system, electronic equipment, storage medium and product
CN116695342A (en) Robot-assisted sewing feed track planning method based on curvature segmentation
KR100803525B1 (en) Cadastral restoration method
JPH11327619A (en) Method for creating NC program for sequential molding, method for sequential molding, and recording medium
JPS62221003A (en) Method for producing locus of 2-dimensional tool
JPS58159106A (en) processing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant