Bird
0
0
CNC Programmingscripting~5 mins

Work coordinate system (WCS) in CNC Programming

Choose your learning style9 modes available
Introduction
The Work Coordinate System (WCS) helps machines know where to start and move when cutting or shaping materials. It sets a clear point so the machine works in the right place.
When setting up a CNC machine to cut a new part.
When changing the position of the material on the machine bed.
When you want to use the same program on different machines or setups.
When you need to align the tool path with a specific feature on the material.
Syntax
CNC Programming
G54
G55
G56
...
G59
G54 to G59 are standard codes to select different work coordinate systems.
Each code sets a different origin point for the machine to use.
Examples
Selects the first work coordinate system (G54) and moves the tool to X=10, Y=10, Z=-5 at feed rate 100.
CNC Programming
G54
G01 X10 Y10 Z-5 F100
Selects the second work coordinate system (G55) and quickly moves the tool to the origin point of that system.
CNC Programming
G55
G00 X0 Y0 Z0
Sample Program
This program uses the G54 work coordinate system to cut a square 50mm by 50mm. It moves the tool safely above the start, lowers it to cut, and follows the square path.
CNC Programming
G21 ; Set units to millimeters
G90 ; Use absolute positioning
G54 ; Select work coordinate system 1
G00 X0 Y0 Z5 ; Move above start point
G01 Z-2 F50 ; Lower tool to cutting depth
G01 X50 Y0 F100 ; Cut in X direction
G01 X50 Y50 ; Cut in Y direction
G01 X0 Y50 ; Cut back in X
G01 X0 Y0 ; Complete square
G00 Z5 ; Raise tool
M30 ; End program
OutputSuccess
Important Notes
Always set the correct WCS before running a program to avoid cutting in the wrong place.
You can define custom offsets for each WCS to match your material setup.
Some machines support more than G54-G59 for extra coordinate systems.
Summary
WCS sets the starting point for CNC machining.
Use G54 to G59 codes to select different coordinate systems.
Correct WCS selection ensures accurate and safe machining.