# Surface machining (#CYL, #CYL OFF)

This mode can be selected for lathes and machining centres. The desired contour on the cylindrical surface is programmed in millimetres or inches using a virtual coordinate system.

Lateral surface machining

## Notice

As of CNC build V3.00, the parameter P-CHAN-00262 must be assigned with the vale 15 for this transformation in order to perform lateral surface machining applications.

Depending on the machine type, the three logical axes X, Y, Z are provided to program the contour in Cartesian coordinates on the lateral surface. As a general rule, the Y axis is not present on lathe-only machines. The workpiece radius must also be included in the programming as reference radius R.

The main plane in lateral surface machining is formed by Z-C.

## Lateral surface machining in G17

An axis configuration Z-C is formed by specifying the first and second main axes with #CYL [...]. This implicitly defines a main plane in G17. The reference radius must also be specified.

Syntax:
#CYL [ <1st_main_axis_name>, <2nd main_axis_name>, <3rd_main_axis_name>..]

<1st_main_axis_name> | Name of the first main axis according to the current main plane.
<2nd main_axis_name> | Name of the second main axis according to the current main plane (virtual linear axis, development).
<3rd_main_axis_name>. | Axis name of the third main axis according to the current main plane with specification of the reference radius in [mm, inch].

## Notice

Programmed tracking axes are not affected by the transformation. It is not permitted to change the main plane with G18, G19 while lateral surface machining is active

This mode is deselected by:

Syntax:
#CYL OFF

Use #CYL OFF to revert to the previously active state. This means that the last active main plane is selected automatically and the last active axis offsets are restored.

## Programing Example

Programming example for lathes, programming in G17 with Z-C

Example with axis name "C" for 2nd main axis

…

#CAX [S, C] ;Assuming “S” is main spindle

G01 X60 C45 F800 ;Feed and positioning movement; X:60mm C:45°

#CYL [Z, C, X60] ;Select lateral surface machining

G00 G90 Z0 C0 ;Z: 0mm C:0mm!

G01 C100 F500

G02 Z100 R50

G01 C0

Z0

…

#CYL OFF

#CAX OFF

M30

## Lateral surface machining in G19

Use #CYL LATERAL [...] to create an axis configuration which, in combination with G19, allows programming in the virtual coordinate system C-Z. The reference radius must also be specified.

Syntax:
#CYL LATERAL [ RADIUS=.. ]

RADIUS=.. | Specify reference radius in [mm, inch].

## Notice

Programmed tracking axes are not affected by the transformation. After #CYL LATERAL, the use of G17 or G18 is also permitted; this may be necessary for special machining cases.

This mode is deselected by:

Syntax:
#CYL OFF

Use #CYL OFF to deselect lateral surface machining and restore the previously active axis configuration with the associated axis offsets. The currently valid main plane remains active.

## Programing Example

Programming examples for lathes, programming in G19 with C-Z

%cyl_lat_A

N020 G00 X0 Y0 Z0

N020 #CAX [S,C]

N030 G00 X0 Y0 Z100 C0

N040 #CYL LATERAL [RADIUS=35] ;Deselect lateral surface machining

N060 G19 ;Select G19 plane

N070 G01 G90 Z0 C0 F5000

N080 G01 G90 X10 F5000

N090 $FOR P2=1, 5, 1

N100 P3=P2*4

N110 P4=P3+2

N120 G01 G91 C-P3

N130 ZP3

N140 C[2*P3]

N150 Z-P3

N160 G90 C0

N170 G91 ZP4

N180 $ENDFOR

N190 $FOR P2=1, 5, 1

N200 P3=P2*4

N210 P4=P3*2+2

N220 G90 G02 KP3

N230 G91 G01 ZP4

N240 $ENDFOR

N270 #CYL OFF

N280 #CAX OFF

N290 M30

Example 1 for #CAX LATERAL with G19

%cyl_lat_B

N020 G00 F2000 X0 Y0 Z0

N030 #CAX [S, C]

N040 #CYL LATERAL [RADIUS=20]

N060 G19

N070 G01 F1000 Z0 C0 X0 G161

N080 G02 J30 K0 C60 F2000

N090 G02 J30 K0 C0

N100 G02 J0 K30 Z60

N110 G02 J0 K30 Z0

N120 G03 J-30 K0 C-60

N130 G03 J-30 K0 C0

N140 G03 J0 K-30 Z-60

N150 G03 J0 K-30 Z0

N180 #CYL OFF

N190 #CAX OFF

N210 M30

Example 2 for #CYL LATERAL with G19

## Additional information

- Lateral surface machining with 2 rotary axes (#CYL 2ROT, #CYL OFF)