G50 – Scaling Cancel

Author:

Usage format

G50

Explanation

The G50 code is used to cancel the scaling factor that was previously set by the G51 code. Scaling is a feature that allows the programmer to modify the size of a part without changing the original coordinates. The G51 code sets a scaling factor that multiplies all the X, Y, and Z coordinates by a certain percentage. The G50 code restores the scaling factor to 100%, which means no scaling is applied.

Example

Suppose we want to make a square with a side length of 10 units, but we want to scale it down by 50%. We can use the following program:

G90 ; absolute positioning
G51 X0.5 Y0.5 Z0.5 ; set scaling factor to 50%
G00 X0 Y0 ; move to origin
G01 X10 Y0 ; draw first side
G01 X10 Y10 ; draw second side
G01 X0 Y10 ; draw third side
G01 X0 Y0 ; draw fourth side
G50 ; cancel scaling
G00 X20 Y0 ; move away from the square
M30 ; end of program

The resulting square will have a side length of 5 units, which is half of the original size. The G50 code cancels the scaling effect, so the next move to X20 Y0 will be 20 units away from the origin, not 10 units.

Leave a Reply

Your email address will not be published. Required fields are marked *