In CNC machining, fixture offset is a way of setting the origin point of the coordinate system for a workpiece. Fixture offset allows the CNC machine to know where the workpiece is located and how to move the cutting tool relative to it. Fixture offset is also known as work offset or work coordinate system (WCS).
Usage format
The most common way of setting fixture offset is using the G54-G59 codes. These codes are part of the G-code language that controls the CNC machine. G54-G59 codes are used to select one of the six available fixture offset registers, which store the offset values for each axis (X, Y, and Z). The offset values are usually measured and entered manually or automatically by using a probe.
The general format of using G54-G59 codes is:
G54-G59 [P~]
Where:
G54-G59
is the code that selects the fixture offset register. G54 is the default register and the most commonly used one. G55-G59 are the other registers that can be used for different workpieces or setups.P~
is an optional parameter that specifies the number of the fixture offset register. This parameter can be used to access more than six fixture offset registers, depending on the CNC machine. For example,G54 P1
is equivalent toG54
, andG54 P7
is equivalent toG60
.
Explanation
The purpose of using fixture offset is to make the programming and machining process easier and more efficient. By using fixture offset, the programmer can write the G-code program based on the part dimensions and geometry, without worrying about the actual position and orientation of the workpiece on the CNC machine. The machinist can then set the fixture offset values for each workpiece, and run the same G-code program for different workpieces or setups.
The fixture offset values are the distances between the machine zero point and the workpiece zero point, along each axis. The machine zero point is a fixed reference point on the CNC machine, usually located at the end or the center of the travel range of each axis. The workpiece zero point is a reference point on the workpiece, usually located at a corner, a center, or a feature of the part. The workpiece zero point can be chosen by the programmer or the machinist, as long as it is consistent and convenient.
To set the fixture offset values, the machinist needs to move the cutting tool to touch or align with the workpiece zero point, and then enter or store the current position of the tool as the offset value for each axis. This can be done manually by using the jog or handwheel mode, or automatically by using a probe or a touch sensor. The offset values can be positive or negative, depending on the direction of the axis and the location of the workpiece zero point relative to the machine zero point.
Example
Here is an example of using G54-G59 codes for fixture offset. Suppose we have a rectangular workpiece that is 100 mm long, 50 mm wide, and 20 mm thick. We want to mill a 10 mm deep pocket that is 80 mm long, 40 mm wide, and centered on the workpiece. We choose the lower left corner of the workpiece as the workpiece zero point, and we use the G54 fixture offset register. The G-code program for the pocket milling operation is:
G90 G21
(set absolute mode and millimeter units) G54
(select fixture offset register G54) G00 X10 Y10 Z2
(rapid move to the start point of the pocket) G01 Z-10 F500
(linear move to the pocket depth at 500 mm/min feed rate) G01 X90 F1000
(linear move to the right at 1000 mm/min feed rate) G01 Y50
(linear move to the top) G01 X10
(linear move to the left) G01 Y10
(linear move to the bottom) G00 Z2
(rapid move to the clearance height) G00 X0 Y0
(rapid move to the workpiece zero point) M30
(end of program)
To run this program, the machinist needs to set the fixture offset values for G54. This can be done by moving the tool to touch the lower left corner of the workpiece, and then entering the current position of the tool as the offset value for each axis. For example, if the machine zero point is at the center of the travel range of each axis, and the workpiece is located 200 mm to the right, 100 mm to the front, and 50 mm above the machine zero point, then the offset values for G54 are:
G54 X200 Y100 Z50
These values can be entered manually or automatically by using a probe. Once the fixture offset values are set, the machinist can run the G-code program and mill the pocket on the workpiece. The same program can be used for different workpieces or setups, as long as the fixture offset values are updated accordingly.
Here is a text diagram to illustrate the example:
Z
| / Tool
| /
| /
| /
|/_______________ Y
/|
/ |
/ |
/___|_________________ X
Machine zero point (0, 0, 0)
Z
| / Tool
| /
| /
| /
|/_______________ Y
/| _________
/ | | |
/ | | Pocket |
/___|______|_________|___ X
| |
| Workpiece
|<-------->|
100 mm
Workpiece zero point (200, 100, 50)