Tuesday, August 16, 2022

Measuring System in CNC Programming

Coordinate measuring procedures or systems are commonly applied in CNC machine programming to determine the actual location of axis positions and measurements. This can be achieved through either absolute or incremental dimensioning.

Coordinate measuring system

A coordinate measuring system refers to a "plane" and defines the position of a point relative to a specific "datum point." One or more coordinate values represent the point's position on the plane, ensuring precise location. The datum point is typically considered zero, and the values associated with it are called coordinate values, corresponding to the zero position.

In CNC programming, two types of coordinate systems are used to assign the relative position of a point: the Cartesian coordinate system and the Polar coordinate system. Both coordinate systems can be utilized in the same programming, and a CNC controller is capable of operating with either system. While a Cartesian coordinate system is generally more convenient, there are instances where a Polar system has advantages over the Cartesian system.

Cartesian coordinate system - The Cartesian coordinate system expresses the position of a point on a plane using a pair of numerical coordinate values, measured in the same unit. Two perpendicular lines, known as axial lines, are drawn on the plane (as shown in the figure). The point at their intersection is called the "datum point" or zero point, which specifies the actual position. Typically, the horizontal line is labeled the X-axis, the vertical line is designated the Y-axis, and the four separate regions created by the lines are called quadrants (quadrant I, II, III, and IV). 

 

In quadrant, I, the positioning values of X and Y for point P are positive, while for point Q in quadrant II, all X values are negative and Y values are positive. Similarly, in quadrant III, for point R, X values are negative and Y values are positive, and finally, in quadrant IV, for point S, X is positive and Y is negative.

Dimensioning of the workpiece with a Cartesian coordinate system - The following image illustrates the dimensioning of a workpiece using a Cartesian coordinate system. Three points, P, Q, and R, are assigned within two planes, XY and XZ, defining the precise position of the points. 

Polar Coordinate System - The Polar coordinate system is also a two-dimensional system used to specify the position of a point. It involves measuring the distance directly from a reference point (also known as the pole) and determining the angular position from a specific line. The following image demonstrates the measurement using a polar coordinate system. The table presents the distance and angular positions of points P, Q, R, and S from the reference point 'O'.   


Cartesian or Polar, which is convenient? 


The Cartesian coordinate system is commonly used in CNC programming, but there are advantages to employing the polar coordinate system as well. The following pictures illustrate the convenience of both systems. In the picture on the left, defining the position of point P is always suitable with a Cartesian coordinate system, using points P2 and P3 in comparison to R and Ø. On the other hand, the polar coordinate system, depicted in the picture on the right, is appropriate for determining the positions of P, Q, R, and S using radius and angle (R and Ø).  


Absolute measurement System 

In an absolute measurement system, coordinate points are measured with reference to the same datum point. The datum or reference point is typically considered as '0,0', and based on this reference point, different axis positions for cutting tool movement are defined in a program. The measuring system is presented using G-Code. The G90 code is employed for programming with an absolute measurement system, and when G90 is used at the beginning of a program, all position values of the coordinate points are accepted from the '0,0' reference point. Most CNC programs are written using the absolute measurement system exclusively. It is easier to track the position of a cutting tool and compare work offsets with the measuring system. Additionally, it is more manageable to write a program. The following picture shows the coordinate center points of different holes measured using the absolute measurement system. 

Incremental Measurement System

In an incremental measurement system, all measuring points in a coordinate system are calculated relative to the previous point as a reference. The succeeding movements of a cutting tool are determined based on the former position or location as the datum point. The G91 code is used for an incremental measurement system, and when G91 is used at the beginning of a program, it registers the different coordinate point values based on the former point as the datum point. The following picture shows the coordinate values for the center points of different holes using an incremental measurement system. 


Why Absolute is more convenient than an Incremental measurement

Most CNC programmers have written their programs using the absolute measurement system exclusively. Let's consider a program where the coordinate position of a point is given as X123.245, Y35.346, and it needs to move to X138.392, Y18.139. With the absolute measurement system, the movement command for the X and Y axes would simply be X138.392 and Y18.139, since all measurements are made relative to the '0,0' datum point. With the incremental measurement system, these commands would be X15.147 (X138.392 - X123.245) for the X-axis and Y-17.207 (Y18.139 - Y35.346) for the Y-axis movement. Here, the successive positions are calculated based on the former point as the datum point for the incremental measurement system. Since there are many coordinate points in a program, programming with an incremental measurement system can be tiresome. Any mistakes or errors in writing the positions in a program line using the incremental measurement system would carry forward to the rest of the program, causing all subsequent positions to deviate. With the absolute measurement system, errors would only affect that particular line. Additionally, finding mistakes in a program written with the incremental measurement system is more difficult compared to the absolute measurement system. However, there are instances where programming with the incremental measurement system can be beneficial. For an absolute measurement, a G90 code is used at the beginning of the program, and later the G91 code is employed to implement the incremental measurement. Transitioning back to the absolute measurement system, the G90 code is used again within the program.

No comments:

Post a Comment

Popular Posts