Rookie study four-axis controller 2: Point-by-spot comparison method

Source: Internet
Author: User

Spot-by-point comparison is one of the simplest and most straightforward methods in the reference pulse interpolation algorithm.

Simple, rough, fast!

Linear interpolation, circular interpolation and other interpolation, such as oval, can be achieved.

By point of comparison method, as the name implies, is every step to the processing point of the instantaneous coordinates with the specified graphics trajectory comparison, judge its deviation, and then decide the next step, if the processing point to go outside the graphics, then the next step to the graphics inside go; if the processing point is inside the graph, then the next step is to go outside, To reduce the deviation. This makes it possible to draw a trajectory that is very close to the specified graph, with a maximum deviation of no more than one pulse equivalent.

So, the general engraving machine should be able to meet the requirements of it, the key is the speed is fast ah, for example, said:

MCX314 interpolation speed can reach 8M, calculate is 256 subdivision, draw a coin size round, should speed also quickly. Specific on the lazy forget, the actual carving effect can be seen, but there is no engraving machine in hand, otherwise the truth to play a bit.

Dot-by-point comparisons are divided into straight and circular interpolation, but each one has four steps.

(1) discrimination. Determines whether the tool position is above (or on the line) of the line, or below the line, according to the deviation value.

(2) feed. Depending on the result of the discriminant, you decide which coordinates (x or Y) to control to move one step.

(3) operation. The new deviation after the tool movement is calculated, and the next step is provided to judge the basis. According to Formula (2-1) and formula (2-2) to calculate the deviation of the new processing point, the operation is greatly simplified. However, the deviations from each new processing point are calculated from the previous point deviation and are always pushed down so that you know what the deviation is when you start processing. When we start processing, we are manually moving the tool to the starting point of processing, that is, the so-called "knife", which of course there is no deviation, so start processing point = 0.

(4) comparison. At the same time as the deviation is calculated, an end point comparison is also performed to determine whether the end point has been reached. If it has already arrived, the operation is no longer performed and a signal to stop or convert the new program segment is issued.

In fact, straight line and arc interpolation is the same understanding, the straight line is judged the actual point above or below the theoretical point, arc is judged in the circle or outside the circle.

Another thing to note is the following formula:

This is a recursive formula that calculates whether the next point is the X-axis motion or the y-axis motion, which is different in four quadrants.

There are two methods to deal with, one is the separate processing method, the other is the coordinate transformation. Obviously the coordinate transformation method is more convenient.

If it is circular interpolation, then the recursive formula is different, but the principle is the same, but note that the arc is a clockwise and inverse clock difference, that is, in a quadrant there are two formulas, there is a total of 8 different situations.

The other one is speed:

V=f/sinα+cosα, this is easy to deduce, that is to say, F is the speed of interpolation, that is, the speed of moving a pulse equivalent.

Obviously, this speed range of 0.707 to 1, the interpolation speed and the actual tool movement speed is not very large, so there is no need for speed adjustment!!

It was simple and rude indeed.

By the way, the concept of pulse equivalence is also very simple, that is, the smallest unit of tool movement, such as 256 subdivision, a pulse motion, is the 1.8/256° of the corresponding tool movement distance.

Obviously, with this method to achieve, precision and speed, the algorithm is simple, OK, that another method: digital integration method, what advantages?

Question continues: What kind of algorithms are used like MCX314 and PCL6045?

Guess: The DSP scheme, you should use the digital integration method a little more.

Rookie study four-axis controller 2: Point-by-spot comparison method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.