CNC Knowledge: How to set the origin and tool length of the workpiece coordinate system of five-axis linkage machining center

Photo WeChat_20240911144229.jpg

In the process of multi-axis machining and five-axis machining, setting the origin of the workpiece coordinate system and the tool length is an important step. If the origin of the workpiece coordinate system and the tool length are set incorrectly, it will cause a tool collision accident, damage the equipment, and the consequences will be […]

Content Navigation

In the process of multi-axis machining and five-axis machining, setting the origin of the workpiece coordinate system and the tool length is an important step. If the origin of the workpiece coordinate system and the tool length are set incorrectly, it will cause a tool collision accident, damage the equipment, and the consequences will be disastrous. Therefore, correctly setting the workpiece coordinate system origin and tool length is the first step to ensure safe production. Regarding this issue, there is currently a lack of relevant discussion in textbooks and literature. In particular, in many literatures on “tool setting” of three-axis CNC machine tools, the Z direction value in the G54 memory of the workpiece coordinate system. is mixed with tool length data and is not strictly distinguished. It is not advisable to use a five-axis linkage machine tool with the thought of a three-axis CNC milling machine. Therefore, detailed research and discussion will be conducted below.

In the actual operation of CNC machine tools, to set the workpiece coordinate system and tool length data, you must first understand the concepts of machine tool coordinate system and coordinate system of the room.

Machine tool coordinates are inherent to the machine tool itself and are the only coordinates that can be recognized by the machine tool’s CNC system, while workpiece coordinates are artificial and the machine- CNC tool itself cannot recognize the coordinates of the workpiece.

The essence of the principle of setting the origin of the workpiece coordinate system in a CNC machine tool is to find the value of the origin of the workpiece coordinate system in the machine tool coordinate system and store it in the memory of G54 or G56, G57. , G58, G59 and other instructions. The finding process comes from the fact that many people use cutters as tools to find them, so this process is called “tool setting.”

For example, in Figure 1, point A is the origin of the coordinate system of the machine tool of the CNC milling machine or machining center, and point B is the origin of the workpiece coordinate system . For point B, it has a reading value in the coordinate system of machine tool A. Suppose this value is (X-368.756 Y-367.543 Z-432.843), store this set of values ​​in the memory of , Y, Z in the workpiece coordinate system command G54 or G55, G56, G57, G58, G59, then when executing these instructions, the machine tool will call the values ​​in the X, Y and Z instruction memory to identify the coordinates of the part.

Figure 1 reveals the relationship between the Z value of the workpiece coordinate system origin, the tool length and the machine tool coordinate system origin, which will be explained in detail below .

First of all, you should know that in CNC milling machines and machining centers, tool length refers to the distance from the spindle end to the tool tip, and that the value is always positive. The tool length in the schematic diagram in Figure 1 is 125.524.

As shown in Figure 1, it is known that the origin A of the machine tool coordinate system is at the positive limit position of the three linear axes X, Y and Z, and the origin B of the coordinate system of the room is in the center. of the upper surface of the square piece. Find the tool length and workpiece coordinates. System B is the coordinate system value of machine tool A.

Figure 1 The relationship between the origin of the machine tool coordinate system, the Z value of the origin of the workpiece coordinate system and the length of the tool

In this schematic diagram, “125.524” is the tool length and “-333.189” is the machine’s Z coordinate system reading when the tool cuts just to the top surface of the part. It can be read directly on the screen. of the machine tool, then the value of point B of the workpiece coordinate system. The value of the Z direction value in the coordinate system of machine tool A is:

“-458.713” is stored in Z direction memory in G54 or G56, G57, G58 and G59.

“125.524” is stored in the tool length compensation register and called with “G43 H_”.

Many technicians who operate three-axis CNC milling machines regard “-333.189” as the original Z value of the workpiece coordinate system when setting tools, enter it into the G54 command Z memory, and enter “0 ” in the “H” address of the tool length compensator. In three-axis CNC machine tools, there is another storage method, which is to enter “0” in Z of the G54 command and “-333.189” in the “H” address of the tool length compensator .

These two methods will not affect the position of the tool tip when calling the “G43 H_” instruction, and the position of the tool tip in the Z axis direction is correctly determined. Because in a three-axis CNC milling machine, since there are no rotation axes such as A, B and C, the Z axis is always in a straight state. This storage method does not and will not affect the position of the tool tip. cause tool collision accident. However, in multi-axis machining machine tools and five-axis linkage CNC machine tools, the Z value “-458.713” and tool length “125.524” need to be stored separately and cannot be mixed and grasped like three-axis machine tools, otherwise A, B, C and other rotation axes may occur when linking with the Z axis, and the tool tip tracking function RTCP cannot be performed.

For safety reasons, first measure the tool length, the Z value of the coordinate system of workpiece B in the coordinate system of machine tool A, and finally measure the X and Y values.


3.1 Measure tool length

To measure the length of the tool, two points must be measured. The first point is the end face of the spindle and the second point is the tip of the tool. To measure tool length, you can use a dial gauge, Z-axis adjuster, external tool presetter, etc. It can be measured outside the machine or inside the machine. Off-machine measurement does not take machine tool time and can improve productivity, but it will increase the cost of the off-machine presetter. On-machine measurement takes machine tool usage time and productivity is lower than off-machine measurement, but there is no need to add additional instruments.

3.1.1 Pressing the pin end

As shown in Figure 2, the method of measuring tool length using a dial indicator inside the machine is used. Gently press the dial indicator probe onto the end face of the spindle, let the pointer slowly rotate a small semi-circle, and stop at the “40” position. At this point, find the “relatively real” z coordinate on the machine tool control panel and clear it. The result is shown in Figure 4. For safety reasons and to avoid interference with the tool, you can remove the tool before measuring the end face of the pin before this step.

Photo WeChat_20240911144234.jpg

Figure 2 Using a Dial Indicator to Measure the Pin End Face

Photo WeChat_20240911144237.jpg

Figure 3 Using a Dial Indicator to Measure the Tool Tip

Photo WeChat_20240911144241.jpg

Figure 4 After measuring the end face of the spindle with a dial indicator, the relative coordinates of the Z axis are cleared.

3.1.2 Press the tip of the tool

After measuring the end face of the pin and clearing the count, load the tool, as shown in Figure 3. Use a dial indicator to measure the tip of the tool to find the position of the pin tip. the tool. Let the pointer slowly rotate a small half-circle and stop. to position “40”. At this time, find the “relatively real” z coordinate on the machine tool control panel, as shown in Figure 5. The 179.3999 displayed in the relative Z axis coordinate is the length value of the tool.

In the process of measuring the tool tip, since the probe of the dial indicator is in point-to-point contact with the tool tip, there will be an error in the position of the probe aligned with the tip of the tool. In order to reduce errors, you can use a Z-axis adjuster to measure the spindle end face and tool tip. The Z axis adjustment device is in face-to-face contact, which can greatly reduce errors. The operation process of using a dial indicator is the same as that of the Z-axis adjuster. The difference is that when using the Z-axis adjuster, the pointer of the pressure gauge is pressed to “0”. The tool length measured with the Z-axis adjuster is more accurate, but novices may accidentally overwrite the meter.

The length data of other knives can also be measured in the same way.

3.2 Storage of tool length data

After the tool length data is measured, it is stored in the tool length compensation Z memory. In a three-axis CNC milling machine, the value in the tool length compensation Z memory may be a negative value, but in a five-axis machine tool, the value in the tool length compensation Z memory must be a positive and negative value. values ​​should not be entered, otherwise serious accidents will occur. As shown in Figure 5, the measured tool length data 179.3999 can be input into the length compensation register No. 2. When programming, you can use the T command and the length compensation command tool code G43 to call the tool, for example “T02 M06; G43H2G01Z50.0F500”. When using it, pay attention to the accuracy of coordinates and code to avoid tool collision accidents. .

Photo WeChat_20240911144245.jpg

Figure 5 After measuring the tool tip with a dial indicator, the relative coordinate of the Z axis displays 179.3999

3.3 Measure the Z direction value of the workpiece coordinate system

After the tool length data is measured, the Z direction value of the coordinate system of workpiece B in the coordinate system of machine tool A can be measured. As shown in Figure 6, the spindle rotates at low speed, and the handwheel pulse generator slowly shakes the Z axis downward so that the tool tip just touches the top surface of the workpiece, then s ‘stop. At this time, the coordinate of the machine tool. The Z reading on the machine tool display is “- 49.3801”, this is the number that needs to be memorized. Then the Z direction value of point B in the workpiece coordinate system in the machine tool A coordinate system is: -49.3801-179.3999=-228.78. Then “-228.78” can be stored in Z direction memory in G54 or G56, G57, G58 and G59. As shown in Figure 7, the Z direction value “-228.7800” is stored in register G57.

Photo WeChat_20240911144249.jpg

Figure 7 The Z direction value -228.7800 is stored in register G57

What should be noted here is that “slowly rock the Z axis downward with the handwheel pulse generator so that the tip of the tool just touches the top surface of the part, then stops. Such an operation will result in a significant error. To reduce the error, you can place the Z axis adjuster on the top surface of the workpiece. At this point the spindle cannot rotate. Allow the tip of the tool to slowly press the top surface of the Z-axis adjuster until the adjuster is depressed. the pointer points to “0”. Then, at this time, the distance between the tool tip and the top surface of the workpiece is 50. mm, assuming that the Z value of the machine coordinates is “-10.256” when the pointer of the tool Z axis setting points to “0”, then the Z direction value of point B in the workpiece coordinate system in the machine tool A coordinate system is: – 10.256-179.3999-50.00=-239.6559 . Therefore, using the Z axis adjuster can improve the measurement accuracy.

In five-axis machine tools, the tool length data and the Z axis data of the workpiece coordinate system should be clearly distinguished and stored separately, and should not be mixed.

3.4 Measure the X and Y values ​​of the center position of the part

After the tool length and degree data and the Z axis data of the workpiece coordinate system are measured, the workpiece center position data can be measured.

If the part coordinate system is centered, the bilateral centering method is commonly used. Scoring tools typically use eccentric mechanical edge finders or electronic edge finders. Centering can be done manually with an eccentric mechanical edge feeler, or automatically with an electronic edge feeler like RENISHAW. The principles of manual centering and automatic centering are the same. The principle of centering is illustrated in Figure 8 and Figure 9. Two points are touched each in the X and Y directions, and the intermediate value is calculated.

Image WeChat_20240911144253.png

Figure 8 Schematic diagram of square centering

Image WeChat_20240911144256.png

Figure 9 Schematic diagram of circular centering

For five-axis linkage machining centers, if the position of the table rotation center has been found when debugging the machine tool, it can be used directly without re-searching.

After obtaining the X and Y position data of the zero point of the workpiece coordinate system, it can be stored in the X and Y memory of G54 or G56, G57, G58 and G59. In a five-axis linkage machining center, various tool length data must be stored in the tool length compensation register, and various data and programming codes must be used jointly, otherwise serious tool accidents Tool collision will occur.

In MDI operation mode, run the following program in one block: When running the above program, the fast forward should be set to a slower state. The operator must observe at all times whether the position of the tool tip is correct. make predictions and react immediately if problems arise. The expected tool tip of this program should stop at a position 50 mm above the center of the part. If not, check the reason.

The essence of the principle of setting the origin of the workpiece coordinate system in a five-axis machining center is to find the value of the origin of the workpiece coordinate system in the coordinate system of the machine tool and to store it in the memory of G54 or G56. , G57, G58, G59 and other instructions. The tool length compensation value cannot be mixed with the Z value of the workpiece coordinate system. The tool length compensation value and the Z value of the workpiece coordinate system must be stored separately. Measuring with a Z-axis adjuster will be more accurate. The measured data should be checked before use. The method presented in this article has been verified correctly on domestic and foreign major five-axis CNC machine tools and is universal. The five-axis linkage CNC machine tools that have been verified include German Demag machine tools (SIEMENS CNC system), Swiss Mikron GF machine tools (HEIDENHAIN CNC system), Wuhan Hi-Tech machine tools (SIEMENS CNC system). CNC Huazhong), etc.

Daguang focuses on providing solutions such as precision CNC machining services (3-axis, 4-axis, 5-axis machining), CNC milling, 3D printing and rapid prototyping services.

Picture of JinShui Chen

JinShui Chen

Rapid Prototyping & Rapid Manufacturing Expert

Specialize in CNC machining, 3D printing, urethane casting, rapid tooling, injection molding, metal casting, sheet metal and extrusion

Pressroom

Recent Posts

Welcome to GreatLight Metal,Maximum Processing Size 4,000 mm

Precision Machining CNC Quote Online

Loading file

Upload Click here to upload or drag and drop your model to the canvas.

The model is too large and has been resized to fit in the printer's build tray. [Hide]

The model is too large to fit in the printer's build tray. [Hide]

The model is too large, a fitting printer is selected. [Hide]

The model is too small and has been upscaled. [Hide]

Warning: The selected printer can not print in full color [Hide]

Warning: obj models with multiple meshes are not yet supported [Hide]

Warning: Unsupported DXF entity  [Hide]

Warning: could not arrange models [Hide]


File Unit:      
Scale:
%
L × W × H:
X: × Y: × Z:  cm 
Rotation:
X: ° Y: °  

	

Model Stats:

Material Volume: cm3
Support Material Volume: cm3
Box Volume: cm3
Surface Area: cm2
Model Weight: g
Model Dimensions:
x x cm
Number of Polygons:
Number of Shapes:
Total Path: cm
⚡ Instant Quote for Precision Manufacturing

Submit your design files (STEP/IGES/DWG) and receive a competitive quote within 1 hour, backed by ISO 9001-certified quality assurance.

📋 How It Works

  1. Upload & SpecifyShare your 3D model and select materials (Aluminum/Stainless Steel/Titanium/PEEK), tolerances (±0.002mm), and surface treatments.

  2. AI-Powered AnalysisOur system calculates optimal machining strategy and cost based on 10+ years of automotive/aerospace data.

  3. Review & ConfirmGet a detailed breakdown including:
    - Volume pricing tiers (1-10,000+ units)
    - Lead time (3-7 days standard)
    - DFM feedback for cost optimization

Unit Price: 

Loading price
5 Axis CNC Machining Equipment
4 Axis CNC Machining Equipment
3 Axis CNC Machining Equipment
CNC Milling & Turning Equipment
Prototype and Short-Run Injection Moldings Exact plastic material as final design
Volume Metal Die Casting Services - Precision Cast Parts
Bridge the Gap From Prototype to Production – Global delivery in 10 days or less
Custom high-precision sheet metal prototypes and parts, as fast as 5 days.
Custom Online 3D Printing Services
Custom Online 3D Printing Services
Custom Online 3D Printing Services
Design Best Processing Method According To 3D Drawings
Alloys Aluminum 6061, 6061-T6 Aluminum 2024 Aluminum 5052 Aluminum 5083 Aluminum 6063 Aluminum 6082 Aluminum 7075, 7075-T6 Aluminum ADC12 (A380)
Alloys Brass C27400 Brass C28000 Brass C36000
Alloys Stainless Steel SUS201 Stainless Steel SUS303 Stainless Steel SUS 304 Stainless Steel SUS316 Stainless Steel SUS316L Stainless Steel SUS420 Stainless Steel SUS430 Stainless Steel SUS431 Stainless Steel SUS440C Stainless Steel SUS630/17-4PH Stainless Steel AISI 304
Inconel718
Carbon Fiber
Tool Steel
Mold Steel
Alloys Titanium Alloy TA1 Titanium Alloy TA2 Titanium Alloy TC4/Ti-6Al 4V
Alloys Steel 1018, 1020, 1025, 1045, 1215, 4130, 4140, 4340, 5140, A36 Die steel Alloy steel Chisel tool steel Spring steel High speed steel Cold rolled steel Bearing steel SPCC
Alloys Copper C101(T2) Copper C103(T1) Copper C103(TU2) Copper C110(TU0) Beryllium Copper
Alloys Magnesium Alloy AZ31B Magnesium Alloy AZ91D
Low Carbon Steel
Alloys Magnesium Alloy AZ31B Magnesium Alloy AZ91D
ABS Beige(Natural) ABS Black ABS Black Antistatic ABS Milky White ABS+PC Black ABS+PC White
PC Black PC Transparent PC White PC Yellowish White PC+GF30 Black
PMMA Black PMMA Transparent PMMA White
PA(Nylon) Blue PA6 (Nylon)+GF15 Black PA6 (Nylon)+GF30 Black PA66 (Nylon) Beige(Natural) PA66 (Nylon) Black
PE Black PE White
PEEK Beige(Natural) PEEK Black
PP Black PP White PP+GF30 Black
HDPE Black HDPE White
HIPS Board White
LDPE White
This is a finish of applying powdered paint to the components and then baking it in an oven, which results in a stronger, more wear- and corrosion-resistant layer that is more durable than traditional painting methods.
No coating required, product’s natural color!
This is a finish of applying powdered paint to the components and then baking it in an oven, which results in a stronger, more wear- and corrosion-resistant layer that is more durable than traditional painting methods.
This finishing option with the shortest turnaround time. Parts have visible tool marks and potentially sharp edges and burrs, which can be removed upon request.
Sand blasting uses pressurized sand or other media to clean and texture the surface, creating a uniform, matte finish.
Polishing is the process of creating a smooth and shiny surface by rubbing it or by applying a chemical treatmen
A brushed finish creates a unidirectional satin texture, reducing the visibility of marks and scratches on the surface.
Anodizing increases corrosion resistance and wear properties, while allowing for color dyeing, ideal for aluminum parts.
Black oxide is a conversion coating that is used on steels to improve corrosion resistance and minimize light reflection.
Electroplating bonds a thin metal layer onto parts, improving wear resistance, corrosion resistance, and surface conductivity.
This is a finish of applying powdered paint to the components and then baking it in an oven, which results in a stronger, more wear- and corrosion-resistant layer that is more durable than traditional painting methods.
This is a finish of applying powdered paint to the components and then baking it in an oven, which results in a stronger, more wear- and corrosion-resistant layer that is more durable than traditional painting methods.
Please provide additional text description for other surface treatment requirements!
Material
Material
  • CNC Metals
    • Aluminum
    • Brass
    • Stainless steel
    • Inconel718
    • Carbon Fiber
    • Tool Steel
    • Mold Steel
    • Titanium
    • Alloy Steel
    • Copper
    • Bronze
    • Low Carbon Steel
    • Magnesium
  • CNC Plastics
    • ABS
    • PC
    • PMMA (Acrylic)
    • PA (Nylon)
    • PE
    • PEEK
    • PP
    • HDPE
    • HIPS
    • LDPE
Printer
Printer
  • CNC Metals
    • 5 Axis CNC Machining
    • 4 Axis CNC Machining
    • 3 Axis CNC Machining
    • CNC Milling & Turning
    • Rapid Tooling
    • Metal Die Casting
    • Vacuum Casting
    • Sheet Metal Fabrication
    • SLA 3D Printing
    • SLS 3D Printing
    • SLM 3D Printing
  • Rapid Prototyping
    • Design Best Processing Method According To 3D Drawings
Post-processing
Post-processing
Finalize
The world's first CNC machining center that dares to provide free samples!

Free for first product valued at less than $200. (Background check required)

Precision Machining CNC Quote Online

15 Years CNC Machining Services

When you’re ready to start your next project, simply upload your 3D CAD design files, and our engineers will get back to you with a quote as soon as possible.
Scroll to Top

ISO 9001 Certificate

ISO 9001 is defined as the internationally recognized standard for Quality Management Systems (QMS). It is by far the most mature quality framework in the world. More than 1 million certificates were issued to organizations in 178 countries. ISO 9001 sets standards not only for the quality management system, but also for the overall management system. It helps organizations achieve success by improving customer satisfaction, employee motivation, and continuous improvement. * The ISO certificate is issued in the name of FS.com LIMITED and applied to all the products sold on FS website.

GreatLight Metal ISO 9001 certification successfully renewed
✅ ISO 9001:2015
GreatLight Metal ISO 9001 certification successfully renewed ZH

ISO 13485 certificate

ISO 13485 is an internationally recognized standard for Quality Management Systems (QMS) specifically tailored for the medical device industry. It outlines the requirements for organizations involved in the design, development, production, installation, and servicing of medical devices, ensuring they consistently meet regulatory requirements and customer needs. Essentially, it's a framework for medical device companies to build and maintain robust QMS processes, ultimately enhancing patient safety and device quality.

GreatLight Metal Technology Co., Ltd Has Obtained Multiple Certifications (3)
GreatLight Metal Technology Co., Ltd Has Obtained Multiple Certifications (4)

ISO 27001 certificate

ISO/IEC 27001 is an international standard for managing and processing information security. This standard is jointly developed by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). It sets out requirements for establishing, implementing, maintaining, and continually improving an information security management system (ISMS). Ensuring the confidentiality, integrity, and availability of organizational information assets, obtaining an ISO 27001 certificate means that the enterprise has passed the audit conducted by a certification body, proving that its information security management system has met the requirements of the international standard.

GreatLight Metal Technology Co., Ltd Has Obtained Multiple Certifications (1)
GreatLight Metal Technology Co., Ltd Has Obtained Multiple Certifications (2)

IATF 16949 certificate

IATF 16949 is an internationally recognized Quality Management System (QMS) standard specifically for the automotive industry. It builds upon the foundation of ISO 9001 and adds specific requirements relevant to automotive production and service parts. The goal is to enhance quality, improve processes, and reduce variation and waste within the automotive supply chain.

Automotive Industry Quality Management System Certification_01
Automotive Industry Quality Management System Certification_00

Get The Best Price

Send drawings and detailed requirements via Email:info@glcncmachining.com
Or Fill Out The Contact Form Below:

All uploads are secure and confidential.