WO2018120098A1 - Method for recording processing track with bitmap and numerical control apparatus - Google Patents

Method for recording processing track with bitmap and numerical control apparatus Download PDF

Info

Publication number
WO2018120098A1
WO2018120098A1 PCT/CN2016/113679 CN2016113679W WO2018120098A1 WO 2018120098 A1 WO2018120098 A1 WO 2018120098A1 CN 2016113679 W CN2016113679 W CN 2016113679W WO 2018120098 A1 WO2018120098 A1 WO 2018120098A1
Authority
WO
WIPO (PCT)
Prior art keywords
bitmap
recording
range
processing
recording range
Prior art date
Application number
PCT/CN2016/113679
Other languages
French (fr)
Chinese (zh)
Inventor
周国麟
Original Assignee
深圳配天智能技术研究院有限公司
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 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to PCT/CN2016/113679 priority Critical patent/WO2018120098A1/en
Priority to CN201680086650.XA priority patent/CN109496284B/en
Publication of WO2018120098A1 publication Critical patent/WO2018120098A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/19Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path

Definitions

  • the invention relates to the field of real-time recording of processing trajectories in the processing of numerically controlled machine tools, in particular to a method for recording trajectories by using bitmaps and a numerical control device.
  • the vector record records directly record the coordinates of the machining path in the data structure.
  • the track information in the data structure is drawn into the graphic by drawing. Since the recorded information is directly recorded in the data structure, it is drawn onto the screen when it needs to be displayed, so the displayed result is not distorted by the enlarged picture.
  • the numerical control machine tool needs to record the trajectory point at the time interval of the order of ten milliseconds, and the processing duration of the numerically controlled machining machine is generally long, sometimes even one or two days. In such a long period of time, the number of track points recorded by CNC machine tools will be very large, and it is difficult to record such track points by using a numerical control system with relatively large memory. Even if the machining path can be recorded, it will take a lot of computational efficiency in the subsequent process of drawing the machining path to the display screen.
  • the bitmap record is a picture file with a certain length and width of pixels, and the track point is changed from the actual machine coordinate to the length and width coordinates of the picture according to a certain conversion calculation, because all track points are saved in the same picture, and the number of points does not exist.
  • the reason for this problem is that the original setting of the picture should not be too small for the actual coordinate range, because at least it should cover the machine's machinable operating range; but in actual machining, the range of the path is mostly in the majority of cases. It may all be in a small range. In this case, when the small-scale trajectory map is enlarged and observed, it will be subject to the resolution limitation of the picture, and no clear result can be obtained.
  • the object of the present invention is to provide a method and a numerical control device for recording a processing trajectory by using a bitmap which can completely record a processing trajectory and clearly distinguish a processing trajectory.
  • the invention provides a method for recording a processing trajectory by using a bitmap, comprising: acquiring a recording range of a bitmap and a tool processing trajectory point; determining whether the acquired tool processing trajectory point is within a recording range of the bitmap; if the acquired tool If the machining track point is within the recording range of the bitmap, the tool processing track point is continuously acquired; if the acquired tool machining track point is not within the recording range of the bitmap, the recording range of the bitmap is adjusted, so that the acquired tool is obtained.
  • the machining track point is within the recording range of the bitmap.
  • the step of determining whether the processing track point is within the recording range of the bitmap comprises: determining, for each tool machining track point, whether the abscissa of the tool processing track point is within the abscissa range of the bitmap recording range, and Whether the ordinate of the tool machining path point is within the ordinate coordinate range of the bitmap recording range. If both are present, the tool machining path point is within the recording range of the bitmap. If one is not, the tool processing track point is located.
  • the bitmap is outside the scope of the record.
  • the step of acquiring the processing track point comprises: establishing a pre-storage queue, each acquiring a new tool processing track point, and placing the new tool processing track point into the pre-storage queue; each time acquiring N new tool processing track points, The N new tool processing track points are connected into a fold line according to the time sequence of adding the pre-storage queue; establishing a first rectangle just covering the N processing track points, determining whether the abscissas of the two diagonal vertices of the first rectangle are Both are within the abscissa range of the bitmap record range, and whether the ordinates of the two diagonal vertices of the first rectangle are within the ordinate range of the bitmap record range, and if all are, then N process track points are Within the record range of the bitmap, if one is not present, the N machining track points are outside the recording range of the bitmap.
  • the recording range of the bitmap is adjusted in real time according to the processing trajectory, so that the step of adapting the recording range of the bitmap to the processing trajectory comprises: scaling the recording range of the bitmap by proportional K.
  • the present invention also provides a numerical control apparatus including a processor and a memory for performing a method of recording a processing trajectory using a bitmap as described above.
  • the method for recording a processing trajectory by using the bitmap and the numerical control device provided by the present invention according to the prior art that the recording range of the bitmap is always the maximum motion range of the machine tool, by first setting a bitmap record with a small coverage area. Range, and then continuously adjust the recording range of the bitmap during the workpiece machining process, so that the recording range of the bitmap matches the coverage of the entire tool processing trajectory as much as possible, so that the entire machining trajectory is recorded and increased in the same storage amount.
  • the resolution of the graph is the resolution of the graph.
  • FIG. 2 is a step diagram of a second embodiment for determining whether a processing track point is within a recording range of a bitmap
  • Fig. 3 is a schematic block diagram of a numerical control apparatus to which an embodiment of the present invention is applied.
  • the embodiment provides a method for recording a processing trajectory by using a bitmap and a numerical control device, comprising the following steps:
  • S100 acquires the recording range of the bitmap and the tool processing track point
  • S200 determines whether the acquired tool processing track point is within the recording range of the bitmap
  • the recording range of the bitmap is rectangular, because most of the numerical control machine movements are synthesized by the translational motions of the three axes of X, Y, and Z, and the range of motion is also rectangular.
  • the recording range of the bitmap is initially selected as the minimum machining range of the machine.
  • the initial recording range of the bitmap can be adjusted according to the specific conditions of the workpiece to be machined.
  • step S200 There are two implementations of step S200, and the first implementation of step S200 is:
  • each time a tool machining track point is acquired it is determined whether the abscissa of the tool machining track point is within the abscissa range of the bitmap recording range, and whether the ordinate of the tool machining track point is within the ordinate range of the bitmap recording range. If all are, the tool processing track point is within the recording range of the bitmap. If one is not, the tool processing track point is outside the recording range of the bitmap.
  • the system since each time a new tool track point is acquired, the system immediately determines whether it is within the recording range of the bitmap, so that the system can know in time whether the newly acquired tool processing track point is in the bitmap. Within the scope of the record, but at the same time the computing burden of the system will be relatively heavy.
  • step S200 is:
  • S210 establishes a pre-storage queue, and each time a new tool processing track point is acquired, the new tool processing track point is put into the pre-storage queue;
  • N new tool processing track points are connected into a broken line according to the time sequence of joining the pre-storage queue.
  • S230 establishing a first rectangle that just covers the N processing track points, determining whether the abscissas of the two diagonal vertices of the first rectangle are all within the abscissa range of the bitmap recording range, and the first rectangle Whether the ordinates of the diagonal vertices are all within the ordinate range of the bitmap recording range, and if they are all, the N processing trajectory points are within the recording range of the bitmap, and if one is absent, the N The machining track points are outside the recording range of the bitmap.
  • the system determines whether the new tool processing track points are within the recording range of the bitmap after acquiring a certain number of new tool processing track points, although the system cannot know the new time as in the first embodiment. Whether the obtained tool processing track point is within the recording range of the bitmap, but if the value of N is controlled within a certain range, it is not only timely determined whether the newly acquired tool processing track points are within the recording range of the bitmap, It can also greatly reduce the computational burden of the system.
  • the value of N is generally in the range of 10 to 100.
  • the step of establishing a first rectangle that covers the N processing track points specifically includes: finding a minimum horizontal coordinate value, a minimum vertical coordinate value, a maximum horizontal coordinate value, and a maximum ordinate value, a first diagonal vertice is established according to a minimum horizontal coordinate value and a minimum ordinate value, and a second diagonal vertice is established according to the maximum horizontal coordinate value and the maximum ordinate value, according to the first diagonal vertices
  • the second diagonal vertex depicts a first rectangle.
  • Step S400 includes two embodiments.
  • the first embodiment is to adjust the center point of the recording range of the bitmap. If the first embodiment fails to meet the requirements, the size of the recording area of the bitmap is further adjusted.
  • step 400 is specifically: establishing a second rectangle that just covers the acquired tool processing track point, and shifting the center point of the bitmap recording range to coincide with the center point of the second rectangle.
  • the specific way of "establishing a second rectangle that just covers the acquired tool processing track point” is to find out the minimum horizontal coordinate value, the minimum vertical coordinate value, the maximum horizontal coordinate value and the maximum vertical coordinate value of the acquired tool processing track point, according to The minimum abscissa value and the smallest ordinate value establish a first diagonal vertice, and the second diagonal vertices are established according to the maximum abscissa value and the maximum ordinate value, according to the first diagonal vertices and the second diagonal The vertex draws the second rectangle.
  • the specific way of "acquiring the center point of the second rectangle” is: according to the sum of the sum of the abscissas of the first diagonal vertices and the second diagonal vertices, and the first diagonal vertices and the second diagonal vertices The half of the sum of the ordinates determines the abscissa and the ordinate of the center point of the second rectangle, respectively.
  • a second embodiment of step 400 is that scaling K will enlarge the recording range area of the bitmap.
  • the ratio K ranges from 1.5 to 2.5, typically 2.
  • the abscissa and the ordinate of the first diagonal vertices of the in-situ map recording range are respectively expanded by 2 times, and a new first diagonal vertice is established, and the second diagonal vertices of the in-situ map are recorded.
  • the abscissa and the ordinate are respectively expanded by 2 times, a new second diagonal vertex is established, and a new bitmap recording range is established according to the third rectangle determined by the new first diagonal vertex and the new second diagonal vertex.
  • step 400 As the workpiece processing progresses, if the subsequently acquired processing trajectory falls outside the new bitmap recording range, the first embodiment and the second embodiment of step 400 are repeatedly performed in order.
  • the method for recording a processing trajectory by using a bitmap provides a bitmap recording range with a smaller coverage area than the prior art in which the recording range of the bitmap is always the maximum motion range of the machine tool. Then, during the machining of the workpiece, the recording range of the bitmap is continuously adjusted so that the recording range of the bitmap matches the coverage of the entire tool processing trajectory as much as possible, so that the entire machining trajectory is recorded and the bitmap is improved under the same storage amount. Resolution.
  • the embodiment of the present invention further provides a numerical control device 30 for controlling the operation of the numerical control machine tool.
  • the numerical control device 30 includes at least a processor 310 and a memory 320.
  • the processor 310 and the memory 320 can be connected through the bus 330.
  • the processor 310 can be used to perform the method for recording the processing trajectory by using the bitmap described in the foregoing embodiment. For details of the related method, reference may be made to the description of the foregoing embodiment, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

Disclosed is a method for recording a processing track with a bitmap and a numerical control apparatus. The method comprises: acquiring a recording range of a bitmap and a processing track point of a cutting tool; determining whether the acquired processing track point of the cutting tool is located within the recording range of the bitmap, and if the acquired processing track point of the cutting tool is within the recording range of the bitmap, continuing acquiring a processing track point of the cutting tool; and if the acquired processing track point of the cutting tool is not within the recording range of the bitmap, adjusting the recording range of the bitmap so as to make the acquired processing track point of the cutting tool be within the recording range of the bitmap. By means of the method for recording a processing track with a bitmap, not only can a complete processing track be recorded, the resolution of a bitmap can also be increased where the storage amount is the same.

Description

一种用位图记录加工轨迹的方法及数控设备 Method for recording processing track by using bitmap and numerical control device
【技术领域】[Technical Field]
本发明涉及数控机床加工中实时记录加工轨迹的领域,尤其涉及一种用位图记录加工轨迹的方法及数控设备。The invention relates to the field of real-time recording of processing trajectories in the processing of numerically controlled machine tools, in particular to a method for recording trajectories by using bitmaps and a numerical control device.
【背景技术】 【Background technique】
数控机床可以根据事前编写好的加工代码自动完成加工工作,因此在加工效率、加工可重复性上具有无可比拟的优势。为了保证加工代码的正确性,以及进一步优化加工代码,高级的数控机床会在加工时实时的记录下刀具的加工轨迹,并在显示屏上描画出来,以便于技术人员分析加工代码是否符合设计的要求,以及是否需要做进一步的优化。由此可见,如何有效的记录、显示加工轨迹是数控系统的一个重要的功能。现有的数控机床记录加工轨迹的方法一般分为两大类,一类是位图记录,另一类是矢量图记录。CNC machine tools can automatically complete the machining according to the processing code written beforehand, so it has unparalleled advantages in processing efficiency and process repeatability. In order to ensure the correctness of the machining code and further optimize the machining code, the advanced CNC machine will record the machining path of the tool in real time during machining and draw it on the display screen so that the technician can analyze whether the machining code conforms to the design. Requirements, and whether further optimization is needed. It can be seen that how to effectively record and display the processing trajectory is an important function of the numerical control system. The existing methods for recording machining trajectories of CNC machine tools are generally divided into two categories, one is bitmap recording and the other is vector recording.
矢量图记录是将加工轨迹坐标直接记录在数据结构中,在要用图形显示时,用画图的方式把数据结构里面的轨迹信息画到图形中。由于记录的信息都是直接记录到数据结构中,在需要显示时再画到屏幕上,所以显示的结果不会因为放大图片而失真。但为了加工轨迹记录的准确,数控机床需要在十毫秒量级的时间间隔上记录一次轨迹点,而数控加工机床的加工持续时间一般又比较长,有时候甚至会达到一两天。在这么长的一个时间内,数控机床记录的轨迹点的数量就会非常庞大,采用内存比较大的数控系统也很难实现记录这么的轨迹点。即使能够将加工轨迹记录下来,在后续将加工轨迹画到显示屏过程中,也会耗费巨大的计算效率。The vector record records directly record the coordinates of the machining path in the data structure. When the graphic display is to be performed, the track information in the data structure is drawn into the graphic by drawing. Since the recorded information is directly recorded in the data structure, it is drawn onto the screen when it needs to be displayed, so the displayed result is not distorted by the enlarged picture. However, in order to accurately record the trajectory of the machining, the numerical control machine tool needs to record the trajectory point at the time interval of the order of ten milliseconds, and the processing duration of the numerically controlled machining machine is generally long, sometimes even one or two days. In such a long period of time, the number of track points recorded by CNC machine tools will be very large, and it is difficult to record such track points by using a numerical control system with relatively large memory. Even if the machining path can be recorded, it will take a lot of computational efficiency in the subsequent process of drawing the machining path to the display screen.
位图记录是用一定长宽像素点的图片文件,将轨迹点按照一定的转换计算从实际机床坐标变成图片的长宽坐标,因为所有轨迹点都会保存在同一个图片上,不存在点数越多需要的存储空间越大的问题,同样也不会有位图画到显示屏的效率的问题。由于系统存储空间和计算效率的限制,图片的大小一般不会很大,在将轨迹点画到图片上前,需要确定图片记录的机床坐标范围。在记录的过程中,轨迹点会转换为图片上的一个像素点。这里就会存在着问题:如果要显示比图片上一个像素点更小的内容,位图就无能为力了。造成这种问题的原因,是图片的原始设定实际坐标的记录范围不可能太小,因为起码要覆盖机床的可加工的运行范围;但实际的加工中,轨迹运行的范围绝大部分情况下可能都只在一个小范围中。这样的话,要对这种小范围轨迹图进行放大观察时,就会受制于图片的分辨率限制,得不到很清晰的结果。The bitmap record is a picture file with a certain length and width of pixels, and the track point is changed from the actual machine coordinate to the length and width coordinates of the picture according to a certain conversion calculation, because all track points are saved in the same picture, and the number of points does not exist. The problem of more storage space required, there is also no problem with the efficiency of the bitmap to the display. Due to the limitation of system storage space and computational efficiency, the size of the picture is generally not very large. Before drawing the track point onto the picture, it is necessary to determine the machine coordinate range of the picture record. During the recording process, the track point is converted to a pixel on the picture. There is a problem here: if you want to display something smaller than a pixel on the image, the bitmap will be powerless. The reason for this problem is that the original setting of the picture should not be too small for the actual coordinate range, because at least it should cover the machine's machinable operating range; but in actual machining, the range of the path is mostly in the majority of cases. It may all be in a small range. In this case, when the small-scale trajectory map is enlarged and observed, it will be subject to the resolution limitation of the picture, and no clear result can be obtained.
【发明内容】 [Summary of the Invention]
本发明的目的在于提供一种既能完整的记录加工轨迹又能清晰的分辨加工轨迹的用位图记录加工轨迹的方法及数控设备。The object of the present invention is to provide a method and a numerical control device for recording a processing trajectory by using a bitmap which can completely record a processing trajectory and clearly distinguish a processing trajectory.
本发明提供一种用位图记录加工轨迹的方法,包括:获取位图的记录范围和刀具加工轨迹点;判断所获取的刀具加工轨迹点是否在位图的记录范围内;如果所获取的刀具加工轨迹点在所述位图的记录范围内,则继续获取刀具加工轨迹点;如果所获取的刀具加工轨迹点不在位图的记录范围内,则调整位图的记录范围,使得所获取的刀具加工轨迹点位于位图的记录范围内。The invention provides a method for recording a processing trajectory by using a bitmap, comprising: acquiring a recording range of a bitmap and a tool processing trajectory point; determining whether the acquired tool processing trajectory point is within a recording range of the bitmap; if the acquired tool If the machining track point is within the recording range of the bitmap, the tool processing track point is continuously acquired; if the acquired tool machining track point is not within the recording range of the bitmap, the recording range of the bitmap is adjusted, so that the acquired tool is obtained. The machining track point is within the recording range of the bitmap.
优选的,判断加工轨迹点是否在位图的记录范围内的步骤包括:每获取一个刀具加工轨迹点,就判断该刀具加工轨迹点的横坐标是否在位图记录范围的横坐标范围内,以及该刀具加工轨迹点的纵坐标是否在位图记录范围的纵坐标范围内,如果都在,则该刀具加工轨迹点在位图的记录范围内,如果有一个不在,则该刀具加工轨迹点位于位图的记录范围外。Preferably, the step of determining whether the processing track point is within the recording range of the bitmap comprises: determining, for each tool machining track point, whether the abscissa of the tool processing track point is within the abscissa range of the bitmap recording range, and Whether the ordinate of the tool machining path point is within the ordinate coordinate range of the bitmap recording range. If both are present, the tool machining path point is within the recording range of the bitmap. If one is not, the tool processing track point is located. The bitmap is outside the scope of the record.
优选的,所述获取加工轨迹点的步骤包括:建立预存储队列,每获取一个新刀具加工轨迹点,将新刀具加工轨迹点放入预存储队列;每获取N个新刀具加工轨迹点,就按照加入预存储队列的时间顺序将所述N个新刀具加工轨迹点连成折线;建立刚好覆盖所述N个加工轨迹点的第一矩形,判断第一矩形两个对角顶点的横坐标是否均在位图记录范围的横坐标范围内,以及判断第一矩形两个对角顶点的纵坐标是否均在在位图记录范围的纵坐标范围内,如果都在,则N个加工轨迹点在位图的记录范围内,如果有一个不在,则N个加工轨迹点位于位图的记录范围外。Preferably, the step of acquiring the processing track point comprises: establishing a pre-storage queue, each acquiring a new tool processing track point, and placing the new tool processing track point into the pre-storage queue; each time acquiring N new tool processing track points, The N new tool processing track points are connected into a fold line according to the time sequence of adding the pre-storage queue; establishing a first rectangle just covering the N processing track points, determining whether the abscissas of the two diagonal vertices of the first rectangle are Both are within the abscissa range of the bitmap record range, and whether the ordinates of the two diagonal vertices of the first rectangle are within the ordinate range of the bitmap record range, and if all are, then N process track points are Within the record range of the bitmap, if one is not present, the N machining track points are outside the recording range of the bitmap.
优选的,根据加工轨迹实时调整位图的记录范围,使得位图的记录范围与加工轨迹相适配的步骤包括:建立刚好覆盖已获取加工轨迹的第二矩形,将所述位图记录范围的中心点平移至与所述第二矩形的中心点重合。Preferably, the recording range of the bitmap is adjusted in real time according to the processing trajectory, so that the step of adapting the recording range of the bitmap to the processing trajectory comprises: establishing a second rectangle that just covers the acquired processing trajectory, and recording the range of the bitmap The center point translates to coincide with the center point of the second rectangle.
优选的,根据加工轨迹实时调整位图的记录范围,使得位图的记录范围与加工轨迹相适配的步骤包括:按比例K将扩大所述位图的记录范围。Preferably, the recording range of the bitmap is adjusted in real time according to the processing trajectory, so that the step of adapting the recording range of the bitmap to the processing trajectory comprises: scaling the recording range of the bitmap by proportional K.
本发明还提供一种数控设备,所述数控设备包括处理器和存储器,所述处理器用于执行如前所述的用位图记录加工轨迹的方法。The present invention also provides a numerical control apparatus including a processor and a memory for performing a method of recording a processing trajectory using a bitmap as described above.
采用本发明提供的用位图记录加工轨迹的方法及数控设备,相对于位图的记录范围始终为机床最大运动范围的现有技术来说,通过先设定一个覆盖面积较小的位图记录范围,然后在工件加工过程中不断调整位图的记录范围,使得位图的记录范围与整个刀具加工轨迹的覆盖范围尽可能匹配,从而在相同的存储量的情况下记载整个加工轨迹并提高位图的分辨率。The method for recording a processing trajectory by using the bitmap and the numerical control device provided by the present invention, according to the prior art that the recording range of the bitmap is always the maximum motion range of the machine tool, by first setting a bitmap record with a small coverage area. Range, and then continuously adjust the recording range of the bitmap during the workpiece machining process, so that the recording range of the bitmap matches the coverage of the entire tool processing trajectory as much as possible, so that the entire machining trajectory is recorded and increased in the same storage amount. The resolution of the graph.
【附图说明】 [Description of the Drawings]
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是用位图记录加工轨迹的步骤图;Figure 1 is a step diagram of recording a processing trajectory using a bitmap;
图2是判断加工轨迹点是否在位图的记录范围内第二种实施方式的步骤图;2 is a step diagram of a second embodiment for determining whether a processing track point is within a recording range of a bitmap;
图3是应用本发明实施例的数控设备的示意框图。Fig. 3 is a schematic block diagram of a numerical control apparatus to which an embodiment of the present invention is applied.
【具体实施方式】【detailed description】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本实施例提供一种用位图记录加工轨迹的方法及数控设备,包括如下步骤:The embodiment provides a method for recording a processing trajectory by using a bitmap and a numerical control device, comprising the following steps:
S100 获取位图的记录范围和刀具加工轨迹点;S100 acquires the recording range of the bitmap and the tool processing track point;
S200 判断所获取的刀具加工轨迹点是否在位图的记录范围内;S200 determines whether the acquired tool processing track point is within the recording range of the bitmap;
S300 如果所获取的刀具加工轨迹点在位图的记录范围内,则继续获取刀具加工轨迹点;S300 If the acquired tool machining path point is within the recording range of the bitmap, continue to acquire the tool machining track point;
S400 如果所获取的刀具加工轨迹点不在位图的记录范围内,则调整位图的记录范围,使得所获取的刀具加工轨迹点位于位图的记录范围内。S400 If the acquired tool machining path point is not within the recording range of the bitmap, adjust the recording range of the bitmap so that the acquired tool machining path point is within the recording range of the bitmap.
步骤S100中,位图的记录范围形状为矩形,因为多数的数控机床运动都是由X、Y、Z三根轴的平移运动合成的,其运动范围也是矩形。位图的记录范围初始选择为机床的最小加工范围,当然也可以根据所加工工件尺寸的具体情况调整位图的初始记录范围。In step S100, the recording range of the bitmap is rectangular, because most of the numerical control machine movements are synthesized by the translational motions of the three axes of X, Y, and Z, and the range of motion is also rectangular. The recording range of the bitmap is initially selected as the minimum machining range of the machine. Of course, the initial recording range of the bitmap can be adjusted according to the specific conditions of the workpiece to be machined.
步骤S200有两种的实施方式,步骤S200的第一种实施方式是:There are two implementations of step S200, and the first implementation of step S200 is:
每获取一个刀具加工轨迹点,就判断该刀具加工轨迹点的横坐标是否在位图记录范围的横坐标范围内,以及该刀具加工轨迹点的纵坐标是否在位图记录范围的纵坐标范围内,如果都在,则该刀具加工轨迹点在位图的记录范围内,如果有一个不在,则该刀具加工轨迹点位于位图的记录范围外。Each time a tool machining track point is acquired, it is determined whether the abscissa of the tool machining track point is within the abscissa range of the bitmap recording range, and whether the ordinate of the tool machining track point is within the ordinate range of the bitmap recording range. If all are, the tool processing track point is within the recording range of the bitmap. If one is not, the tool processing track point is outside the recording range of the bitmap.
第一种实施方式中,由于每获取一个新的刀具轨迹点,系统就马上判断其是否在位图的记录范围内,因此系统能及时的得知新获取的刀具加工轨迹点是否在位图的记录范围内,但同时系统的计算负担也会比较重。In the first embodiment, since each time a new tool track point is acquired, the system immediately determines whether it is within the recording range of the bitmap, so that the system can know in time whether the newly acquired tool processing track point is in the bitmap. Within the scope of the record, but at the same time the computing burden of the system will be relatively heavy.
步骤S200的第二种实施方式是:The second implementation of step S200 is:
S210建立预存储队列,每获取一个新刀具加工轨迹点,就将新刀具加工轨迹点放入预存储队列;S210 establishes a pre-storage queue, and each time a new tool processing track point is acquired, the new tool processing track point is put into the pre-storage queue;
S220每获取N个新刀具加工轨迹点,就按照加入预存储队列的时间顺序将所述N个新刀具加工轨迹点连成折线。Each time S220 acquires N new tool processing track points, the N new tool processing track points are connected into a broken line according to the time sequence of joining the pre-storage queue.
S230建立刚好覆盖所述N个加工轨迹点的第一矩形,判断所述第一矩形两个对角顶点的横坐标是否均在位图记录范围的横坐标范围内,以及所述第一矩形两个对角顶点的纵坐标是否均在在位图记录范围的纵坐标范围内,如果都在,则所述N个加工轨迹点在位图的记录范围内,如果有一个不在,则所述N个加工轨迹点位于位图的记录范围外。S230: establishing a first rectangle that just covers the N processing track points, determining whether the abscissas of the two diagonal vertices of the first rectangle are all within the abscissa range of the bitmap recording range, and the first rectangle Whether the ordinates of the diagonal vertices are all within the ordinate range of the bitmap recording range, and if they are all, the N processing trajectory points are within the recording range of the bitmap, and if one is absent, the N The machining track points are outside the recording range of the bitmap.
采用第二种实施方式,系统在获取一定数量的新刀具加工轨迹点之后才判断这些新刀具加工轨迹点是否在位图的记录范围内,虽然系统不能像第一种实施方式那样及时得知新获取的刀具加工轨迹点是否在位图的记录范围内,但只要将N的值控制在一定范围内,就不仅能及时判断新获取的多个刀具加工轨迹点是否在位图的记录范围内,还能大大的减轻系统的计算负担。N的取值范围一般为10至100。With the second embodiment, the system determines whether the new tool processing track points are within the recording range of the bitmap after acquiring a certain number of new tool processing track points, although the system cannot know the new time as in the first embodiment. Whether the obtained tool processing track point is within the recording range of the bitmap, but if the value of N is controlled within a certain range, it is not only timely determined whether the newly acquired tool processing track points are within the recording range of the bitmap, It can also greatly reduce the computational burden of the system. The value of N is generally in the range of 10 to 100.
第二种实施方式中,建立刚好覆盖N个加工轨迹点的第一矩形的步骤具体包括:找出所述N个刀具加工轨迹点的最小横坐标值、最小纵坐标值、最大横坐标值和最大纵坐标值,根据最小的横坐标值和最小的纵坐标值建立第一对角顶点,根据最大横坐标值和最大纵坐标值建立第二对角顶点,根据所述第一对角顶点和所述第二对角顶点绘出第一矩形。In the second embodiment, the step of establishing a first rectangle that covers the N processing track points specifically includes: finding a minimum horizontal coordinate value, a minimum vertical coordinate value, a maximum horizontal coordinate value, and a maximum ordinate value, a first diagonal vertice is established according to a minimum horizontal coordinate value and a minimum ordinate value, and a second diagonal vertice is established according to the maximum horizontal coordinate value and the maximum ordinate value, according to the first diagonal vertices The second diagonal vertex depicts a first rectangle.
步骤S400包括两种实施方式。第一种实施方式是调整位图的记录范围中心点,在第一种实施方式还不能满足要求的情况下,再继续调整位图的记录范围面积大小。Step S400 includes two embodiments. The first embodiment is to adjust the center point of the recording range of the bitmap. If the first embodiment fails to meet the requirements, the size of the recording area of the bitmap is further adjusted.
具体而言,步骤400的第一种实施方式具体为:建立刚好覆盖已获取刀具加工轨迹点的第二矩形,将位图记录范围的中心点平移至与第二矩形的中心点重合。Specifically, the first embodiment of step 400 is specifically: establishing a second rectangle that just covers the acquired tool processing track point, and shifting the center point of the bitmap recording range to coincide with the center point of the second rectangle.
“建立刚好覆盖已获取刀具加工轨迹点的第二矩形”的具体方式为:找出已获取刀具加工轨迹点的最小横坐标值、最小纵坐标值、最大横坐标值和最大纵坐标值,根据最小的横坐标值和最小的纵坐标值建立第一对角顶点,根据最大横坐标值和最大纵坐标值建立第二对角顶点,根据所述第一对角顶点和所述第二对角顶点绘出第二矩形。The specific way of "establishing a second rectangle that just covers the acquired tool processing track point" is to find out the minimum horizontal coordinate value, the minimum vertical coordinate value, the maximum horizontal coordinate value and the maximum vertical coordinate value of the acquired tool processing track point, according to The minimum abscissa value and the smallest ordinate value establish a first diagonal vertice, and the second diagonal vertices are established according to the maximum abscissa value and the maximum ordinate value, according to the first diagonal vertices and the second diagonal The vertex draws the second rectangle.
相应的,“获取所述第二矩形的中心点”的具体方式为:根据第一对角顶点和第二对角顶点横坐标之和的一半,以及第一对角顶点和第二对角顶点纵坐标之和的一半分别确定第二矩形中心点的横坐标和纵坐标。Correspondingly, the specific way of "acquiring the center point of the second rectangle" is: according to the sum of the sum of the abscissas of the first diagonal vertices and the second diagonal vertices, and the first diagonal vertices and the second diagonal vertices The half of the sum of the ordinates determines the abscissa and the ordinate of the center point of the second rectangle, respectively.
步骤400的第二种实施方式是:按比例K将扩大所述位图的记录范围面积。比例K的范围为1.5至2.5,一般为2。具体而言,将原位图记录范围的第一对角顶点的横坐标和纵坐标分别扩大2倍,建立新的第一对角顶点,将原位图记录范围的第二对角顶点的的横坐标和纵坐标分别扩大2倍,建立新的第二对角顶点,再根据新的第一对角顶点和新的第二对角顶点确定的第三矩形建立新的位图记录范围。A second embodiment of step 400 is that scaling K will enlarge the recording range area of the bitmap. The ratio K ranges from 1.5 to 2.5, typically 2. Specifically, the abscissa and the ordinate of the first diagonal vertices of the in-situ map recording range are respectively expanded by 2 times, and a new first diagonal vertice is established, and the second diagonal vertices of the in-situ map are recorded. The abscissa and the ordinate are respectively expanded by 2 times, a new second diagonal vertex is established, and a new bitmap recording range is established according to the third rectangle determined by the new first diagonal vertex and the new second diagonal vertex.
随着工件加工的进行,如果后续获取的加工轨迹又落在新的位图记录范围外,则按照顺序重复执行步骤400的第一种实施方式和第二种实施方式。As the workpiece processing progresses, if the subsequently acquired processing trajectory falls outside the new bitmap recording range, the first embodiment and the second embodiment of step 400 are repeatedly performed in order.
采用本实施例提供的用位图记录加工轨迹的方法,相对于位图的记录范围始终为机床最大运动范围的现有技术来说,通过先设定一个覆盖面积较小的位图记录范围,然后在工件加工过程中不断调整位图的记录范围,使得位图的记录范围与整个刀具加工轨迹的覆盖范围尽可能匹配,从而在相同的存储量的情况下记载整个加工轨迹并提高位图的分辨率。The method for recording a processing trajectory by using a bitmap provided by the embodiment provides a bitmap recording range with a smaller coverage area than the prior art in which the recording range of the bitmap is always the maximum motion range of the machine tool. Then, during the machining of the workpiece, the recording range of the bitmap is continuously adjusted so that the recording range of the bitmap matches the coverage of the entire tool processing trajectory as much as possible, so that the entire machining trajectory is recorded and the bitmap is improved under the same storage amount. Resolution.
本发明实施例还提供一种数控设备30,该数控设备30用于控制数控机床的运行,该数控设备30至少包括处理器310和存储器320,其中,处理器310和存储器320可通过总线330连接,该处理器310可用于执行前述实施例所描述的用位图记录加工轨迹的方法,相关方法的具体内容可参考前述实施例的描述,在此不再赘述。The embodiment of the present invention further provides a numerical control device 30 for controlling the operation of the numerical control machine tool. The numerical control device 30 includes at least a processor 310 and a memory 320. The processor 310 and the memory 320 can be connected through the bus 330. The processor 310 can be used to perform the method for recording the processing trajectory by using the bitmap described in the foregoing embodiment. For details of the related method, reference may be made to the description of the foregoing embodiment, and details are not described herein again.
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。 The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (11)

  1. 一种用位图记录加工轨迹的方法,其特征在于,包括如下步骤:A method for recording a processing track by using a bitmap, comprising the steps of:
    获取位图的记录范围和刀具加工轨迹点;Obtain the recording range of the bitmap and the tool processing track point;
    判断所获取的刀具加工轨迹点是否在所述位图的记录范围内;Determining whether the acquired tool processing track point is within the recording range of the bitmap;
    如果所获取的刀具加工轨迹点在所述位图的记录范围内,则继续获取刀具加工轨迹点;If the acquired tool processing track point is within the recording range of the bitmap, the tool processing track point is continuously acquired;
    如果所获取的刀具加工轨迹点不在所述位图的记录范围内,则调整所述位图的记录范围,使得所获取的刀具加工轨迹点位于所述位图的记录范围内。If the acquired tool machining trajectory point is not within the recording range of the bitmap, the recording range of the bitmap is adjusted such that the acquired tool processing trajectory point is within the recording range of the bitmap.
  2. 根据权利要求1所述的用位图记录加工轨迹的方法,其特征在于,A method of recording a processing trajectory using a bitmap according to claim 1, wherein
    所述位图记录范围的形状为矩形。The shape of the bitmap recording range is a rectangle.
  3. 根据权利要求2所述的用位图记录加工轨迹的方法,其特征在于,所述判断加工轨迹点是否在位图的记录范围内的步骤包括:The method of recording a processing track by using a bitmap according to claim 2, wherein the step of determining whether the processing track point is within a recording range of the bitmap comprises:
    每获取一个刀具加工轨迹点,就判断该刀具加工轨迹点的横坐标是否在位图记录范围的横坐标范围内,以及该刀具加工轨迹点的纵坐标是否在位图记录范围的纵坐标范围内,如果都在,则该刀具加工轨迹点在位图的记录范围内,如果有一个不在,则该刀具加工轨迹点位于位图的记录范围外。Each time a tool machining track point is acquired, it is determined whether the abscissa of the tool machining track point is within the abscissa range of the bitmap recording range, and whether the ordinate of the tool machining track point is within the ordinate range of the bitmap recording range. If all are, the tool processing track point is within the recording range of the bitmap. If one is not, the tool processing track point is outside the recording range of the bitmap.
  4. 根据权利要求2所述的用位图记录加工轨迹的方法,其特征在于,所述判断加工轨迹点是否在位图的记录范围内的步骤包括:The method of recording a processing track by using a bitmap according to claim 2, wherein the step of determining whether the processing track point is within a recording range of the bitmap comprises:
    建立预存储队列,每获取一个新刀具加工轨迹点,将所述新刀具加工轨迹点放入预存储队列;Establishing a pre-storage queue, each time acquiring a new tool processing track point, placing the new tool processing track point into a pre-storage queue;
    每获取N个新刀具加工轨迹点,就按照加入预存储队列的时间顺序将所述N个新刀具加工轨迹点连成折线;Each time N new tool machining track points are acquired, the N new tool machining track points are connected into a fold line according to the time sequence of joining the pre-stored queue;
    建立刚好覆盖所述N个加工轨迹点的第一矩形,判断所述第一矩形两个对角顶点的横坐标是否均在位图记录范围的横坐标范围内,以及判断所述第一矩形两个对角顶点的纵坐标是否均在在位图记录范围的纵坐标范围内,如果都在,则所述N个加工轨迹点在位图的记录范围内,如果有一个不在,则所述N个加工轨迹点位于位图的记录范围外。Establishing a first rectangle that just covers the N processing track points, determining whether the abscissas of the two diagonal vertices of the first rectangle are all within the abscissa range of the bitmap recording range, and determining the first rectangle Whether the ordinates of the diagonal vertices are all within the ordinate range of the bitmap recording range, and if they are all, the N processing trajectory points are within the recording range of the bitmap, and if one is absent, the N The machining track points are outside the recording range of the bitmap.
  5. 根据权利要求4所述的用位图记录加工轨迹的方法,其特征在于,所述建立刚好覆盖所述N个加工轨迹点的第一矩形的步骤包括:The method of recording a processing track by using a bitmap according to claim 4, wherein the step of establishing a first rectangle that just covers the N processing track points comprises:
    找出所述N个刀具加工轨迹点的最小横坐标值、最小纵坐标值、最大横坐标值和最大纵坐标值,根据最小的横坐标值和最小的纵坐标值建立第一对角顶点,根据最大横坐标值和最大纵坐标值建立第二对角顶点,根据所述第一对角顶点和所述第二对角顶点绘出第一矩形。Finding a minimum abscissa value, a minimum ordinate value, a maximum abscissa value, and a maximum ordinate value of the N tool machining trajectory points, and establishing a first diagonal vertices according to the minimum abscissa value and the minimum ordinate value, A second diagonal vertex is established according to the maximum abscissa value and the maximum ordinate value, and the first rectangle is drawn according to the first diagonal vertex and the second diagonal vertex.
  6. 根据权利要求4所述的用位图记录加工轨迹的方法,其特征在于,所述N的范围为10至100。A method of recording a processing trajectory using a bitmap according to claim 4, wherein said N has a range of 10 to 100.
  7. 根据权利要求1所述的用位图记录加工轨迹的方法,其特征在于,所述调整所述位图的记录范围,使得所获取的刀具加工轨迹点位于所述位图的记录范围内的步骤包括:A method of recording a processing trajectory using a bitmap according to claim 1, wherein said step of adjusting a recording range of said bitmap so that the acquired tool processing trajectory point is within a recording range of said bitmap include:
    建立刚好覆盖已获取刀具加工轨迹点的第二矩形,将所述位图的记录范围中心点平移至与所述第二矩形的中心点重合。A second rectangle is formed that just covers the acquired tool machining track point, and the recording range center point of the bitmap is translated to coincide with the center point of the second rectangle.
  8. 根据权利要求7所述的用位图记录加工轨迹的方法,其特征在于,所述将所述位图的记录范围中心点平移至与所述第二矩形的中心点重合的步骤之后还包括:按比例K将扩大所述位图的记录范围的面积。The method of recording a processing trajectory by using a bitmap according to claim 7, wherein the step of translating a recording range center point of the bitmap to coincide with a center point of the second rectangle further comprises: Proportioning K will enlarge the area of the recording range of the bitmap.
  9. 根据权利要求8所述的用位图记录加工轨迹的方法,其特征在于,所述比例K的范围为1.5至2.5。A method of recording a processing trajectory using a bitmap according to claim 8, wherein said ratio K ranges from 1.5 to 2.5.
  10. 根据权利要求1所述的用位图记录加工轨迹的方法,其特征在于, 所述位图记录范围的初始值为机床的最小加工范围。A method of recording a processing trajectory using a bitmap according to claim 1, wherein The initial value of the bitmap recording range is the minimum processing range of the machine tool.
  11. 一种数控设备,其特征在于,所述数控设备包括处理器和存储器,所述处理器用于执行如权利要求1-10任一项所述的用位图记录加工轨迹的方法。A numerical control apparatus, characterized in that the numerical control apparatus comprises a processor and a memory, the processor for performing the method of recording a processing track with a bitmap as claimed in any one of claims 1-10.
PCT/CN2016/113679 2016-12-30 2016-12-30 Method for recording processing track with bitmap and numerical control apparatus WO2018120098A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/113679 WO2018120098A1 (en) 2016-12-30 2016-12-30 Method for recording processing track with bitmap and numerical control apparatus
CN201680086650.XA CN109496284B (en) 2016-12-30 2016-12-30 Method for recording machining track by bitmap and numerical control equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/113679 WO2018120098A1 (en) 2016-12-30 2016-12-30 Method for recording processing track with bitmap and numerical control apparatus

Publications (1)

Publication Number Publication Date
WO2018120098A1 true WO2018120098A1 (en) 2018-07-05

Family

ID=62707815

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113679 WO2018120098A1 (en) 2016-12-30 2016-12-30 Method for recording processing track with bitmap and numerical control apparatus

Country Status (2)

Country Link
CN (1) CN109496284B (en)
WO (1) WO2018120098A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023124288A1 (en) * 2021-12-30 2023-07-06 深圳市创客工场科技有限公司 Motion control method and apparatus in desktop smart laser device, and device
CN114115118B (en) * 2022-01-24 2022-06-10 广州中望龙腾软件股份有限公司 Tool path generation method and equipment for automatically identifying groove characteristics and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216706A (en) * 2007-12-28 2008-07-09 西安交通大学 Tool bit effective machining area calculation based on three scan line and cutter path creation method
WO2009149812A1 (en) * 2008-06-12 2009-12-17 Gebr. Heller Maschinenfabrik Gmbh Rotary milling with special start-up strategy
CN101733678A (en) * 2009-12-04 2010-06-16 北京数码大方科技有限公司 Graphical control system of numerical control machine and method
CN102608954A (en) * 2012-03-26 2012-07-25 西安交通大学 Method for directly generating tool path based on measured data
CN104698971A (en) * 2015-02-10 2015-06-10 杰克缝纫机股份有限公司 Operation track obtaining method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216706A (en) * 2007-12-28 2008-07-09 西安交通大学 Tool bit effective machining area calculation based on three scan line and cutter path creation method
WO2009149812A1 (en) * 2008-06-12 2009-12-17 Gebr. Heller Maschinenfabrik Gmbh Rotary milling with special start-up strategy
CN101733678A (en) * 2009-12-04 2010-06-16 北京数码大方科技有限公司 Graphical control system of numerical control machine and method
CN102608954A (en) * 2012-03-26 2012-07-25 西安交通大学 Method for directly generating tool path based on measured data
CN104698971A (en) * 2015-02-10 2015-06-10 杰克缝纫机股份有限公司 Operation track obtaining method and device

Also Published As

Publication number Publication date
CN109496284A (en) 2019-03-19
CN109496284B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US9760987B2 (en) Guiding method and information processing apparatus
CN104238863B (en) Circle based on Android selects Zoom method and system
CN105407259B (en) Virtual image capture method
JP3574170B2 (en) Distributed image processing device
CN111914819A (en) Multi-camera fusion crowd density prediction method and device, storage medium and terminal
WO2018120098A1 (en) Method for recording processing track with bitmap and numerical control apparatus
CN111246181B (en) Robot monitoring method, system, equipment and storage medium
CN111710032B (en) Method, device, equipment and medium for constructing three-dimensional model of transformer substation
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN107911388B (en) Method and system for supervising mobile terminal application
WO2014104660A1 (en) Device and method for toolpath generation
CN107784132A (en) CAD Mapping Systems based on body-sensing technology
JP2854174B2 (en) Enlargement drawing method in numerical controller
JPH0772850A (en) Device for displaying moving image
JPS61107289A (en) Virtual screen display control system
WO2024036764A1 (en) Image processing method and apparatus, device, and medium
CN113111870A (en) 5G remote central control system and method for multiple metal processing devices
JPS62232004A (en) Nc system
JPH10247136A (en) Information processor and information processing method
JPH04247581A (en) Arranging method for graphic in computer graphics
CN117541219A (en) Visual maintenance auxiliary system based on augmented reality
CN110018773A (en) The number of writing method, system, device and readable storage medium storing program for executing
JPH01184526A (en) Window setting method
JPH0559471B2 (en)
JPH03136173A (en) Graphic editing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16925014

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16925014

Country of ref document: EP

Kind code of ref document: A1