CNC milling machine programming and coordinate system related instructions

Instruction related to coordinate system

1. Set the workpiece coordinate system G92 command

Instruction format: G92 X__ Y__ Z__

Command function: Set the workpiece coordinate system

1

Fig. 1 G92 setting workpiece coordinate system Fig. 2 G54 setting workpiece coordinate system

Instructions instructions:

(1) Create a workpiece coordinate system (also called a programming coordinate system) on the machine;

(2) As shown in Fig. 1, the coordinate values ​​X, Y, and Z are the coordinate values ​​of the tool cutter position in the workpiece coordinate system (also called cutter point or tool change point);

(3) The operator must check or adjust the cutter position after the workpiece is installed to ensure that the workpiece coordinate system set on the machine tool coincides with the position of the workpiece coordinate system specified on the part.

(4) For a workpiece with a relatively complex size, the program zero of the workpiece coordinate system can be arbitrarily changed during programming for simple calculation.

(5) There are two ways to set the workpiece coordinate system in the CNC milling machine:

As shown in Figure 1 above, first determine the tool's tool change point position, and then set the origin of the workpiece coordinate system according to the tool change point position by the G92 command.

1) The X, Y, and Z coordinates in the G92 command indicate the coordinates of the tool change point in the workpiece coordinate system XpYpZp;

2) As shown in Fig. 2, the workpiece coordinate system XpYpZp is established by the relative position to the machine coordinate system XYZ. For example, the CNC system uses the X, Y, and Z coordinates of the G54 command to indicate the coordinates of the origin of the workpiece coordinate system in the machine coordinate system. value.

2. Absolute coordinate input method G90 command and incremental coordinate input method G91 command

Instruction format: G90

G91

Instruction function: setting coordinate input mode

Instructions instructions:

(1) The G90 instruction establishes the absolute coordinate input mode. The coordinate values ​​X, Y and Z of the target point of the move instruction indicate the distance from the origin of the workpiece coordinate system to the tool;

(2) The G91 instruction establishes the incremental coordinate input mode. The coordinate values ​​X, Y, Z of the target point of the move instruction represent the coordinate increment of the tool when leaving the current point.

Example: As shown in Figure 3, the tool moves quickly from point A to point C and is programmed using absolute coordinates and incremental coordinates.

1

Figure 3 Programming using absolute and incremental coordinates

Incremental programming:

G92 X0 Y0 Z0

G91 G00 X15 Y-40

G92 X0 Y0

G00 X20 Y10

X40 Y20

Absolute coordinate programming:

G92 X0 Y0 Z0 Sets the origin of the workpiece coordinate system. The tool change point O coincides with the origin of the machine coordinate system.

G90 G00 X15 Y-40 Tool moves quickly to Op point;

G92 X0 Y0 resets the workpiece coordinate system, and the tool change point Op coincides with the origin of the workpiece coordinate system;

G00 X20 Y10 Tool moves quickly to point A;

The X60 Y30 tool quickly moves from the starting point A to the ending point C.

3. Interpolation plane selection G17, G18, G19 instructions

Instruction format: G17

G18

G19

Instruction Function: Indicates the selected interpolation plane

11

Fig. 4 Plane setting Fig. 5 Plane selection example

Instructions instructions:

(1) G17 means to select the XY plane;

(2) G18 indicates that the ZX plane is selected;

(3) G19 indicates that the YZ plane is selected. (As shown in Figure 4)

For three-axis milling and machining centers, these commands are often used to determine in which plane the machine tool is interpolating.

For example, if the workpiece is machined as shown in Fig. 5, circular interpolation will be performed in the XY plane when milling circular surface 1, and G17 should be selected. When milling circular surface 2, it should be machined in YZ plane. . The CNC turns on the default G17 status.

Posted on