CNC time axis alignment method

文档序号:67383 发布日期:2021-10-01 浏览:20次 中文

阅读说明:本技术 Cnc时间轴对正的方法 (CNC time axis alignment method ) 是由 郭先强 何长安 彭伟 于 2021-07-15 设计创作,主要内容包括:本发明公开了一种CNC时间轴对正的方法,包括:S1、获取当前的即时进给倍率r;S2、若r>t-(进给),则进入下一步,否则跳转至S6;S3、计算可提取并累计的最长时间:Δt←min{1.0-t-(插补),r-t-(进给)},并分别累加:t-(插补)←t-(插补)+Δt,t-(进给)←t-(进给)+Δt,V-(进给)←V-(进给)+V-(插补)*Δt;S4、若t-(插补)=1.0成立,则令t-(插补)←0,然后从插补序列指令中继续顺序读取,直到V-(插补)被读取完毕为止,否则进入下一步;S5、若t-(进给)=r成立,则进入下一步,否则跳转至步骤S1;S6、向设备输出累加的V-(进给),然后清零:t-(进给)←0,V-(进给)←0,之后返回步骤S1。根据本发明将进给调节器的时间轴原点与插补器的时间轴原点对正,从而不存在新的轮廓误差,CNC可按插补器输出的插补位置输出,并且即使用户在加工过程中曾调整过进给倍率,CNC也能自动恢复按插补器输出的插补位置输出。(The invention discloses a CNC time shaft alignment method, which comprises the following steps: s1, acquiring the current instant feeding multiplying power r; s2, if r > t Feeding in Then go to the next step, otherwise go to S6; s3, calculating the maximum time which can be extracted and accumulated: Δ t ← min { 1.0-t) Interpolation ,r‑t Feeding in And respectively adding: t is t Interpolation ←t Interpolation +Δt,t Feeding in ←t Feeding in +Δt,V Feeding in ←V Feeding in +V Interpolation Δ t; s4, if t Interpolation If 1.0 is true, let t Interpolation Oid 0, then continue sequential reads from the interpolation sequence instruction until V Interpolation If the reading is finished, the next step is carried out; s5, if t Feeding in If r is true, the next step is carried out, otherwise, the step goes to step S1; s6, outputting the accumulated V to the device Feeding in And then zero clearing is carried out: t is t Feeding in ←0,V Feeding in Step S1 is then returned to step S890. According to the invention, the time axis origin of the feed regulator is aligned with the time axis origin of the interpolator, so that no time axis origin existsThe new contour error is outputted by the CNC at the interpolation position outputted by the interpolator, and even if the user adjusts the feed magnification during the machining process, the CNC can automatically restore the interpolation position outputted by the interpolator.)

1. A method of CNC timeline alignment comprising:

s1, acquiring the current instant feeding multiplying power r;

s2, if r > tFeeding inGo to the next step, otherwise go to S6, where tFeeding inThe number of cycles that have been extracted for the feed conditioner;

s3, calculating the maximum time which can be extracted and accumulated: Δ t ← min { 1.0-t)Interpolation,r-tFeeding inAnd respectively adding: t is tInterpolation←tInterpolation+Δt,tFeeding in←tFeeding in+Δt,VFeeding in←VFeeding in+VInterpolationΔ t, wherein tInterpolationNumber of cycles extracted for the interpolator, VFeeding inFor the amount of movement extracted by the feed regulator, VInterpolationThe original motion amount in the current period of the interpolator;

s4, if tInterpolationIf 1.0 is true, let tInterpolationOid 0, then continue sequential reads from the interpolation sequence instruction until VInterpolationIf the reading is finished, the next step is carried out;

s5, if tFeeding inIf r is true, the next step is carried out, otherwise, the step goes to step S1;

s6, outputting the accumulated V to the deviceFeeding inAnd then zero clearing is carried out: t is tFeeding in←0,VFeeding inStep S1 is returned to, after that, to proceed to the next cycle.

2. The CNC time axis aligning method of claim 1 wherein in the step S4, if it is at VInterpolationHas been readIf the in-process reads the alignment instruction, let tFeeding in←r。

3. The method of CNC timeline alignment of claim 1 wherein said step S4 is preceded by the further step of: the interpolator reads the tool path file and performs speed planning, and outputs an alignment command at the moment when the speed is zero.

4. The CNC timeline aligning method of claim 3 wherein the "time when the speed is zero" is set at a start-stop point, a corner, or a forced pause point.

Technical Field

The present invention relates to time axis alignment, and more particularly, to a method for CNC time axis alignment.

Background

In modern CNC, the interpolator generally outputs interpolation positions according to a specified interpolation period (e.g., 1 ms); the interpolation needed by the feed multiplying factor link is the re-sampling interpolation on the interpolation output by the interpolator, and a time axis exists, which is equivalent to the time scale of the feedforward interpolation being scaled, for example, if the feed multiplying factor is set to be 50%, the time for reaching the specified position is twice as long as the feed multiplying factor is 100%.

Even if the feed multiplying factor is 100%, the time axes are at the same interval, and there may be a problem of inconsistent beats, for example, a section of circular arc, the interpolator outputs 100 points, and these points are on the circular arc, if the beats of the two sections are staggered by half a cycle, the other 100 points will be obtained after interpolation by the feed multiplying factor link, and these points are not on the circular arc, but are approximately close to the center of the circle.

The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.

Disclosure of Invention

The invention aims to provide a method for aligning a CNC time shaft, which can eliminate the relative dislocation of the time shaft of a feed regulator and the time shaft of an interpolator.

To achieve the above object, an embodiment of the present invention provides a method for CNC timeline alignment, including:

s1, acquiring the current instant feeding multiplying power r;

s2, if r > tFeeding inGo to the next step, otherwise go to S6, where tFeeding inThe number of cycles that have been extracted for the feed conditioner;

s3, calculating the maximum time which can be extracted and accumulated: Δ t ← min { 1.0-t)Interpolation,r-tFeeding inAnd respectively adding: t is tInterpolation←tInterpolation+Δt,tFeeding in←tFeeding in+Δt,VFeeding in←VFeeding in+VInterpolationΔ t, wherein tInterpolationNumber of cycles extracted for the interpolator, VFeeding inFor feedingAmount of exercise, V, extracted by the festival organInterpolationThe original motion amount in the current period of the interpolator;

s4, if tInterpolationIf 1.0 is true, let tInterpolationOid 0, then continue sequential reads from the interpolation sequence instruction until VInterpolationIf the reading is finished, the next step is carried out;

s5, if tFeeding inIf r is true, the next step is carried out, otherwise, the step goes to step S1;

s6, outputting the accumulated V to the deviceFeeding inAnd then zero clearing is carried out: t is tFeeding in←0,VFeeding inStep S1 is returned to, after that, to proceed to the next cycle.

In one or more embodiments of the invention, in step S4, if V is setInterpolationWhen the alignment instruction is read in the reading process, let tFeeding in←r。

In one or more embodiments of the present invention, the step S4 is preceded by: the interpolator reads the tool path file and performs speed planning, and outputs an alignment command at the moment when the speed is zero.

In one or more embodiments of the invention, the "time at which the speed is zero" is set at a start-stop point, a corner, or a forced pause point.

Compared with the prior art, the method and the device align the time axis origin of the feed regulator with the time axis origin of the interpolator, so that no new contour error exists, the CNC can output according to the interpolation position output by the interpolator, and the CNC can automatically recover the interpolation position output by the interpolator even if the user adjusts the feed magnification in the machining process.

Drawings

FIG. 1 is a flow chart of a method of CNC timeline registration according to an embodiment of the present invention.

Detailed Description

The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.

Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.

As shown in fig. 1, a CNC time axis aligning method according to a preferred embodiment of the present invention is characterized by comprising: s1, acquiring the current instant feeding multiplying power r;

s2, if r > tFeeding inGo to the next step, otherwise go to S6, where tFeeding inThe number of cycles that have been extracted for the feed conditioner;

s3, calculating the maximum time which can be extracted and accumulated: Δ t ← min { 1.0-t)Interpolation,r-tFeeding inAnd respectively adding: t is tInterpolation←tInterpolation+Δt,tFeeding in←tFeeding in+Δt,VFeeding in←VFeeding in+VInterpolationΔ t, wherein tInterpolationNumber of cycles extracted for the interpolator, VFeeding inFor the amount of movement extracted by the feed regulator, VInterpolationThe original motion amount in the current period of the interpolator;

s4, if tInterpolationIf 1.0 is true, let tInterpolationOid 0, then continue sequential reads from the interpolation sequence instruction until VInterpolationUntil the reading is finished, or entering the next step, if at VInterpolationWhen the alignment instruction is read in the reading process, let tFeeding in←r;

S5, if tFeeding inIf r is true, the next step is carried out, otherwise, the step goes to step S1;

s6, outputting the accumulated V to the deviceFeeding inAnd then zero clearing is carried out: t is tFeeding in←0,VFeeding inStep S1 is returned to, after that, to proceed to the next cycle.

Specifically, the default value of the feed magnification r is 100%, tFeeding inIs 0, VFeeding inIs 0, tInterpolationIs 0.

In the present embodiment, Δ t > 0, so that at least one equation holds in step S4 and step S5.

In the present embodiment, step S4 is preceded by: the interpolator reads the tool path file and performs speed planning, and outputs an alignment command at the moment when the speed is zero. Wherein the time at which the speed is zero is set at the start-stop point, at the corner, or at the forced pause point.

Specifically, firstly looking ahead the tool path, then reading a tool path file by an interpolator, and acquiring a speed limit condition at each connecting point according to geometric characteristics, wherein the instant speed is set to be zero at a start-stop point, a large corner or a forced pause point. And after a certain number of look-ahead sections are read, carrying out speed planning. And (4) sequentially giving the motion quantity of each axis in each fixed period according to the specified interpolation period of the tool path with the planned speed, namely outputting an interpolation sequence command. In the interpolation output, when the speed is zero, a registration command is generated in advance in the interpolation sequence command and output. The feeding regulator reads the interpolation sequence, adjusts the feeding speed to obtain a new interpolation sequence, and finally sends the new interpolation sequence to the equipment.

In the present embodiment, step S4 is essential, and let t be zero speedInterpolation、tFeeding inAnd VFeeding inAll the values are initialized to 0, and the effect is to forcibly align the time axis origin of the feed adjuster with the time axis origin of the interpolator.

If the feed magnification r is exactly 100% of the default, Δ t in step S3 becomes 1.0 in the next cycle, and the motion amount can be directly output to the device until step S6.

If the time axis is aligned at the non-zero speed moment, the residual period is directly cleared, the pulse is lost, and the continuity of the output speed curve is influenced; alignment is selected if and only if at zero speed instant.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数值控制装置和数值控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类