Working Plane and Feed Direction (G17, G18, G19, P)

G17 working plane XY

Command

G17 (default setting)

Cancellation

G18 or G19

Select XY-plane as workingplane, i.e. the workingplane normal is set to [0,0,1]. This workingplane is the default workingplane.

G18 working plane ZX

Command

G18

Cancellation

G17 or G19

Select ZX-plane as workingplane, i.e. the workingplane normal is set to [0,1,0].

G19 working plane YZ

Command

G19

Cancellation

G17 or G18

Select YZ-plane as workingplane, i.e. the workingplane normal is set to [1,0,0].

P Specification of the feed direction

P<v>

Switch tool orientation. The value of v must be 1 or -1. If v is negative, the tool points in the direction of the working plane normal. Otherwise, it points into the opposite direction.

Example:

The resulting MCS-path (MCS: machine coordinate system) of the following example is shown in Figure “ExampleP”. The first line of the program defines Tool 1 to have a length of 10. G18 activates the XZ-workingplane.

N10:

 

The end of segment N10 is not subject to any tool compensation as D0 is active.

 

N20:

 

For segment N20 tool 1 is active with a positive tool orientation. To compensate the tool length the translation [0,10,0] is applied. (See section Transformations for details.) Thereby, the PCS (program coordinate system) endpoint [20,10,0] of N20 is mapped to the MCS (machine coordinate system) endpoint [20,20,0]. The MCS (machine coordinate system) point and the applied transformation are shown in Figure “ExampleP”.

 

N30:

 

In block N30 the tool orientation is switched, which sets the translation to [0,-10,0]. This translation is applied to the PCS (program coordinate system) endpoint of N30 resulting in the MCS (machine coordinate system) endpoint [30,0,0].

 

N20..N90:

 

The blocks N60..N90 are similar to N20..N50, except that the Y-coordinate is not programmed. Therefore, the tool length compensation does not become apparent, although it is active. That behavior happens because the current PCS (program coordinate system) point is always adapted on a changed transformation. (See section Applying Transformations for details.)

 

!toolSet(index:=1, tooltype:=tooltypeDrill, length:=10);
G18
N10 X10 Y10 D0 F6000
N20 X20 Y10 D1
N30 X30 Y10 P-1
N40 X40 Y10 P1
N50 X50 Y10 D0
N60 X60 D1
N70 X70 P-1
N80 X80 P1
N90 X90 D0
M02
Working Plane and Feed Direction (G17, G18, G19, P) 1:

Figure “ExampleP”.