0% found this document useful (0 votes)
221 views

Examples

This document provides an index and programming examples for the S3000-S4000 CNC series. The index lists 62 programs labeled PROG01 through PROG62. Each program is described briefly, such as "Profile 1" or "Pocket with circular islands". Revisions are noted showing updated pages from November 2003.

Uploaded by

SQuest
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
221 views

Examples

This document provides an index and programming examples for the S3000-S4000 CNC series. The index lists 62 programs labeled PROG01 through PROG62. Each program is described briefly, such as "Profile 1" or "Pocket with circular islands". Revisions are noted showing updated pages from November 2003.

Uploaded by

SQuest
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 128

S3000 – S4000

CNC SERIES

Programming
Examples

March 2003 Edition


S3000 – S4000 SERIES CNC
Index

REVISIONS
Rev.# Rev. Date. Pages Revised

00 Mar. 2003 Emission CMAE3403030E


--------- ---------------- ----------------------------------------------------------------------------------------------------------
01 Nov.2003 Second Edition CMAE3403111E

Updated PROG18 and PROG44 programs.


--------- ---------------- ----------------------------------------------------------------------------------------------------------

Note: Pages marked (01) have been modified.


Pages marked (01)+ are new ones.

Programming Examples I
S3000 – S4000 SERIES CNC
Index

REVISIONS
Rev.# Rev. Date. Pages Revised

Note: Pages marked (01) have been modified.


Pages marked (01)+ are new ones.

II Programming Examples
S3000 – S4000 SERIES CNC
Index

INDEX
PROG01 - Profile 1 ........................................................................................................... 1
PROG02 - Profile 2 ........................................................................................................... 2
PROG03 - Profile 3 ........................................................................................................... 3
PROG04 - Profile 4 ........................................................................................................... 4
PROG05 - Profile 5 ........................................................................................................... 5
PROG06 - Profile 6 ........................................................................................................... 6
PROG07 - Profile 7 ........................................................................................................... 7
PROG08 - Profile 8 ........................................................................................................... 8
PROG09 - Profile 9 ........................................................................................................... 10
PROG10 - Profile 10 ........................................................................................................... 11
PROG11 - Profile 11 ........................................................................................................... 12
PROG12 - Profile 12 ........................................................................................................... 13
PROG13 - Profile 13 ........................................................................................................... 14
PROG14 - Profile 14 ........................................................................................................... 15
PROG15 - Profile 15 ........................................................................................................... 16
PROG16 - Profile 16 ........................................................................................................... 17
PROG17 - Pin thread with thread chase milling cutter .................................................... 18
PROG18 - Drilling thread with thread chaser cutter ........................................................ 19
PROG19 - Taper hole ......................................................................................................... 20
PROG20 - Tapered pin ....................................................................................................... 21
PROG21 - Filetto - Hole thread ....................................................................................... 22
PROG22 - Barenat - Boring with wall disjunction ........................................................ 23
PROG23 - Equc - Points on a circle ................................................................................ 24
PROG24 - Equl - Points on a straight line ..................................................................... 25
PROG25 - Ret - Points on a rectangle ........................................................................... 26
PROG26 - Retc - Points on a centred rectangle ............................................................. 27
PROG27 - Sgrossa - Board rough-boring ...................................................................... 28
PROG28 - Scanal - Groove .............................................................................................. 29
PROG29 - Scanal1 - Groove with slope descent ........................................................... 30
PROG30 - Cavaret - Rectangular pocket ........................................................................ 32
PROG31 - Spiral sphere .................................................................................................... 34
PROG32 - Modal subprogram ............................................................................................ 35
PROG33 - Rotated/offset pattern tapping holes on a linear with G751 function ......... 36
PROG34 - Profiled pocket with internal islands ............................................................. 37
PROG35 - Ellipse draining ................................................................................................ 39
PROG36 - Pocket with circular islands.............................................................................. 40

Programming Examples III


S3000 – S4000 SERIES CNC
Index

PROG37 - Pocket with linear repeated islands ................................................................41


PROG38 - Holes on a hexagon .........................................................................................42
PROG39 - Selbox push-buttons ........................................................................................43
PROG40 - Spherical dome with points ............................................................................44
PROG41 - Spherical dome with circles ............................................................................45
PROG42 - Spherical dome with external radius .............................................................46
PROG43 - Three-dimensional parametric flower .............................................................47
PROG44 - Elliptical die ......................................................................................................48
PROG45 - Elliptical punch ................................................................................................49
PROG46 - Handgrip punch ...............................................................................................50
PROG47 - Handgrip die ....................................................................................................51
PROG48 - Profile programmed on XY and machined on XZ ...........................................52
PROG49 - Conical slot .......................................................................................................53
PROG50 - Conical hole .....................................................................................................54
PROG51 - Conical pin .........................................................................................................55
PROG52 - Columns..............................................................................................................56
PROG53 - Tub .....................................................................................................................57
PROG54 - Punch .................................................................................................................59
PROG55 - Concave sphere ...............................................................................................61
PROG56 - Convex sphere .................................................................................................62
PROG57 - Toroid ................................................................................................................63
PROG58 - Conical polygon ...............................................................................................64
PROG59 - Section profile ellipse ......................................................................................65
PROG60 - Pocket with chafers on the walls ....................................................................66
PROG61 - Plane profile with double radius section ........................................................67
PROG62 - Double crowning profile ..................................................................................68
PROG63 - One tub with 3 sectioned sides .......................................................................69
PROG64 - 4 sectioned three-dimensional punch ...........................................................70
PROG65 - Sphere with 3 spherical ears ...........................................................................71
PROG66 - Solid defined by an open plane profile and an XY machining
section profile ..................................................................................................72
PROG67 - Semicircular section solid defined by a profile on XY and by a
profile on XZ .....................................................................................................73
PROG68 - Automobile tyre rim die ....................................................................................75
PROG69 - Plane profile with 3 different sections ..........................................................76
PROG70 - Die for Selbox push-buttons repeated on a linear grid ..................................77
PROG71 - Punch for Selbox ...............................................................................................79
PROG72 - Conical slot repeated on a linear grid ............................................................81
PROG73 - Grooved surface that links a radius to a profile ............................................82
PROG74 - Grooved surface with delimiting profile ........................................................83
PROG75 - Surfaces defined by 3 grooves .......................................................................84
PROG76 - Chamfer on a tube .............................................................................................85
PROG77 - Joint on a tube .................................................................................................87
PROG78 - Semicircular channel on XZ ............................................................................89
PROG79 - Slots on a circumference with a spiral cutter ................................................90
PROG80 - Spiral milled rectangle .....................................................................................91

IV Programming Examples
S3000 – S4000 SERIES CNC
Index

PROG81 - Cylinder head .................................................................................................... 92


PROG82 - Layout of a profile on XY on a profile on XZ ................................................. 93
PROG83 - Union of two profiles by a 180° arch .............................................................. 94
PROG84 - Union of two profiles by means of a third profile .......................................... 96
PROG85 - Six cams ........................................................................................................... 98
PROG86 - Three cams ....................................................................................................... 99
PROG87 - Programme to create a vacuum cleaner nozzle .......................................... 101
PROG88 - Small parametrical tubs repeated at angles .............................................. 103
PROG89 - Punch with operating field limitations ......................................................... 105
PROG90 - Tube intersection .......................................................................................... 106
PROG91 - Three-dimensional push-button .................................................................. 108
PROG92 - Cogs ................................................................................................................ 109
PROG93 - Tub whit different depths ............................................................................. 110
PROG94 - Hourglass ........................................................................................................ 111
PROG95 - Parametric conical pocket ........................................................................... 112
PROG96 - Parametric conical punch ............................................................................ 114
PROG97 - Grooved between 2 specular profiles ......................................................... 116
PROG98 - Parametric conical punch on a circumference .......................................... 117
PROG99 - Parametric conical punch on a grid ............................................................. 119

Programming Examples V
S3000 – S4000 SERIES CNC
Index

VI Programming Examples
S3000 – S4000 SERIES CNC

PROG01 Profile 1 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

Unquoted radiuses = 5

N1 [PROFILE 1
N2 $1M0X-93.1I63.5Y-40.5J59.5
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I3
N8 Z100R
N9 X0Y-10R
N10 Z2R
N11 Z-10
N12 G41K2
N13 G13Y-20J0
N14 G21I5
N15 G13X56J90
N16 G21 N25 G13X-73J-90
N17 E1=G20X76Y27,G21I-25.65,G20X28Y45 N26 G21I-5
N18 E1 N27 E2=G21X-58Y-6,G13X-98.5Y0J-45
N19 G21I5 N28 E2
N20 G10X120Y0I-5 N29 G21
N21 G11X-110Y70I-5 N30 G13Y-20J0
N22 G21 N31 G40X0Y-10K2
N23 G13Y40J180 N32 Z100R
N24 G21 N33 M30

Programming Examples 1
S3000 - S4000 SERIES CNC

PROG02 Profile 2 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

Unquoted radiuses = 2.5

N1 [PROFILE 2
N2 $1M0X-82.9I125.Y-63.9J69.1
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I2
N8 Z100R
N9 X35Y25R
N10 Z2R
N11 Z-10
N12 G41K2
N13 G13Y15J0 N27 E4
N14 G21I-20 N28 G21I-2.5
N15 E1=G13X105Y-10J-30 N29 G13Y-40J180
N16 E1 N30 E6=G20X-35Y-30I-10
N17 E2=G13Y-25X0J180 N31 E6
N18 E3=E1,G13X105Y0J-90,E2 N32 E7=G20X-35Y40I-15
N19 E3 N33 E8=E6,G20X0Y0I-34,E7
N20 E2 N34 E8
N21 G21I2.5 N35 E7
N22 G13X85J-90 N36 G21I39
N23 G21I-2.5 N37 G13Y15J0
N24 E4=G20X25Y-40I10 N38 G40X35Y25K2
N25 E5=G20X68Y-40I8,G13X0Y-28J180,E4 N39 Z100R
N26 E5 N40 M30

2 Programming Examples
S3000 – S4000 SERIES CNC

PROG03 Profile 3 (CNC S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 [PROFILE 3
N2 $1M0X-105.I103.Y-63.7J69.3
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 Z100R
N8 X-20Y27R
N9 Z2R
N10 Z-10
N11 G49I2
N12 G41K2
N13 L=1
N14 G20X0Y0I-25
N15 G21I10
N16 G13X-3J90
N17 G20X0Y63I-3
N18 G13J-90
N19 G21
N20 G51J-72I
N21 L1K4
N22 G51J0
N23 G50
N24 G20X0Y0I-25
N25 G40X-20Y27K2
N26 Z100R
N27 M30

Programming Examples 3
S3000 - S4000 SERIES CNC

PROG04 Profile 4 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

Point of
intersection

Unquoted radius

N1 [PROFILE 4
N2 $1M0X-83.1I90.7Y-53.7J57.3
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I2
N8 Z100R
N9 X20Y35R
N10 Z2R
N11 Z-10
N12 G42K2 N25 E4=G13E3J-91
N13 L=1 N26 E4
N14 E1=G13X12.4Y0J-90,G20X0Y0I45.3 N27 E5=G51X0Y0J60,E2
N15 E2=G13E1J91 N28 E6=E4,G20X0Y0I29.6,E5
N16 E2 N29 E6
N17 G21I1 N30 G51J60I
N18 G13X0Y0I46J151.5 N31 L1K5
N19 G21 N32 G51J0
N20 G20X0Y0I48.9 N33 G50
N21 G21 N34 E2
N22 G13X0Y0I46J-151.5 N35 G40X20Y35K2
N23 G21 N36 Z100R
N24 E3=G13X-12.4Y0J-90,G20X0Y0I45.3 N37 M30

4 Programming Examples
S3000 – S4000 SERIES CNC

PROG05 Profile 5 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 5
N2 $1M0X-54.8I205.Y-83.4J82.8
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X50Y-80R
N10 Z2R N27 E2=G13X0Y0I10J113,E1
N11 Z-10 N28 G11E2
N12 G42K2 N29 G21I-4
N13 G13Y-70J0 N30 E1
N14 G21I30 N31 G13X-23Y55I10J203
N15 G13X90Y-70J45 N32 E1K2
N16 G13X180Y0I12J-15 N33 G21
N17 G20 N34 E3=G13X0Y0I-10J113,E1
N18 G13J165 N35 G10E3
N19 G13X80Y-15J205 N36 G11X0Y0I25
N20 G13J180 N37 G20
N21 G13X50Y-10J135 N38 G13J-67
N22 G13J180 N39 G21I22
N23 G21I-8 N40 G13Y-70J0
N24 G13X0Y0I25J113 N41 G40X50Y-80K2
N25 G20 N42 Z100R
N26 E1=G20X-23Y55I17.5 N43 M30

Programming Examples 5
S3000 - S4000 SERIES CNC

PROG06 Profile 6 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 6
N2 $1M0X-110.I150.Y-82.4J83.7 N26 E6
N3 G17 N27 G13X-30Y50J-45
N4 O1 N28 G13Y10J0
N5 T1 N29 G21I15
N6 F1000S1200M3 N30 E8=G13X50Y0J70
N7 G49I1 N31 E8
N8 Z100R N32 E9=E6,E8
N9 X-75Y-75R N33 G20E9I-20
N10 Z2R N34 G13J-30
N11 Z-10 N35 G13X125J-90
N12 G42K2 N36 L=1
N13 E1=G13X0Y-80J180 N37 G13X125Y-50J-135
N14 E1 N38 G21I-10
N15 E2=G13X0Y-20J20 N39 G13X85Y-50J135
N16 E3=E1,G13X-95Y0J90,E2 N40 G21I10
N17 E3 N41 G51X-40I
N18 E2 N42 L1K3
N19 E4=G13X0Y-15J180 N43 G51X0
N20 E5=E2,G13X-45Y0J90,E4 N44 G50
N21 E5 N45 G13X-65Y-80J-135
N22 E4 N46 E1
N23 E6=G13X0Y50J0 N47 G40X-75Y-75K2
N24 E7=E4,G13X-95Y0J90,E6 N48 Z100R
N25 E7 N49 M30

6 Programming Examples
S3000 – S4000 SERIES CNC

PROG07 Profile 7 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 7
N2 $1M0X-131.I129.Y-61.5J104.
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 Z100R
N8 X0Y95R
N9 Z2R
N10 Z-10
N11 G49I2.5
N12 G41K2
N13 L=1
N14 E1=G20X0Y0I-86.5
N15 E1 K2
N16 E2=G13X17.5Y0J-90,E1
N17 G13E2J-110
N18 G13X7J-90
N19 G21I10
N20 G13X0Y0I-30J-30 N26 G51J-120I
N21 G13J-90 N27 L1K2
N22 G21 N28 E1K2
N23 G13X0Y0I-7J-30 N29 G40X0Y95K2
N24 E3=G13X0Y0I-17.5J-30,E1K2 N30 Z100R
N25 G13E3J-10 N31 M30

Programming Examples 7
S3000 - S4000 SERIES CNC

PROG08 Profile 8 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

External profile of attachment point X0Y50


Left-hand circular attachment
Upper internal profile of attachment point X-17Y-10
Right-hand circular attachment
Lower internal profile: attachment point X-20Y-27
Left-hand circular attachment

N1 [PROFILE 8
N2 $1M0X-106.I102.Y-69.8J63.2
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I1
N8 Z100R
N9 X0Y50R
N10 Z2R
N11 Z-10
N12 G41K2
N13 E1=G20X0Y0I46
N14 E1
N15 G21I-15
N16 G20X-45Y32.25I22.5
N17 G21I-14.5
N18 G20X-45Y-22I17.5
N19 G21I-15
N20 G20X0Y-50I15
N21 G21I-3
N22 E1
N23 G21
N24 G20X39.5Y-35I10
N25 G21I-2

8 Programming Examples
S3000 – S4000 SERIES CNC

N26 E1
N27 G21
N28 G20X52.5Y0I8
N29 G21I-2.5
N30 E1
N31 G21
N32 G20X39.5Y32.25I7
N33 G21I-1.5
N34 E1
N35 G21
N36 G20X16Y47I6
N37 G21I-2
N38 E1
N39 G40X0Y50K2
N40 Z100R
N41 X-17Y-10R
N42 Z2R
N43 Z-10
N44 G42K2
N45 E2=G20X-18.5Y-10I-5.5
N46 E2
N47 E3=G20X15Y30I-5.5
N48 E4=E2,G21I-56.5,E3
N49 E4
N50 E3
N51 P1=56.5-48
N52 E5=E4Q-P1
N53 -E5K2
N54 E2K2
N55 G40X-17Y-10K2
N56 Z100R
N57 X-20Y-27R
N58 Z2R
N59 Z-10
N60 G41K2
N61 E1=G20X-18.5Y-27I5.5
N62 E1
N63 E2=G20X15Y13.5I5.5
N64 E3=E1,G21I56.5,E2
N65 E3
N66 E2
N67 E4=E3QP1
N68 -E4
N69 E1
N70 G40X-20Y-27K2
N71 Z100R
N72 M30

Programming Examples 9
S3000 - S4000 SERIES CNC

PROG09 Profile 9 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 9
N2 $1M0X-116.I119.Y-45.3J105.
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 Z100R
N8 X0Y0R
N9 Z2R
N10 Z-10
N11 G49I2.5
N12 G42K2
N13 E1=G20X25Y-32I-12
N14 E2=G20X-65Y21I-12
N15 E3=E1,G21I79,E2 N26 G21I29
N16 E3 N27 E7=G20X65Y27I-17
N17 E2 N28 E8=-E5,G21I-80,E7
N18 E4=G20X-20Y67I-27.5 N29 E8
N19 G11E4 N30 E7
N20 E4 N31 G11E1
N21 E5=G20X20Y47I-12.5 N32 E1
N22 E6=E4,G21I-80,-E5 N33 E3
N23 E6 N34 G40X0Y0K2
N24 G21I5 N35 Z100R
N25 E5 N36 M30

10 Programming Examples
S3000 – S4000 SERIES CNC

PROG10 Profile 10 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 10
N2 $1M0X-174.I173.Y-102.J120.
N3 G17
N4 O1 N26 E2=G20X0Y0I-74,G13X0Y-27J0
N5 T1 N27 E3=G20E2I-14
N6 F1000S1200M3 N28 E4=G10X0Y0,G11E2
N7 G49I2.5 N29 E5=E4Q10
N8 Z100R N30 E6=E5,E3
N9 X10Y80R N31 G11E6
N10 Z2R N32 G21
N11 Z-10 N33 E3
N12 G41K2 N34 E7=G51J-90,E4
N13 G10X0Y0I-22 N35 E8=E7Q85
N14 E1=G20X0Y0I106,G13X45Y0J90K2 N36 E8
N15 G11E1I-11 N37 E3K2
N16 G20 N38 G21
N17 G11X0Y0I-22 N39 E9=E4Q-10
N18 G21I6 N40 E10=E9,E3
N19 G11X50Y-57 N41 G10E10
N20 G13J-90 N42 G11X0Y0I-22
N21 G13X0Y0I-95J215 N43 G21
N22 G20X40Y-69I-23K2 N44 G11E1I-11
N23 G21I12 N45 G40X10Y80K2
N24 G13X0Y0I-22J135 N46 Z100R
N25 G21I6 N47 M30

Programming Examples 11
S3000 - S4000 SERIES CNC

PROG11 Profile 11 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 11
N2 $1M0X-158.I155.Y-84.6J115.
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 Z100R
N8 X0Y-70R N27 E3
N9 Z2R N28 E4=G13X0Y0I-115J-118
N10 Z-10 N29 E5=E4Q-25
N11 G49I5 N30 E6=E3,E5
N12 G41K2 N31 G10E6
N13 G20X0Y0I-52.5 N32 E7=G13X0Y0I-14J-28,E4
N14 G21I15 N33 G11E7
N15 G10X0Y0I-30 N34 E4
N16 E1=G20X0Y0I100,G13X0Y0J120K2 N35 E8=G13X0Y0I14J-28,E4
N17 G11E1I-15 N36 G10E8
N18 G20 N37 E9=G13X0Y0I-23J152
N19 E2=G20X0Y0I70,G13X0Y0J78K2 N38 E10=E5,E9
N20 G11E2I-23 N39 G11E10
N21 G20 N40 E9
N22 G13J-102 N41 G21
N23 G21I15 N42 G20X0Y0I-52.5
N24 G20X0Y0I-52.5 N43 G40X0Y-70K2
N25 G21 N44 Z100R
N26 E3=G13X0Y0I-23J-28 N45 M30

12 Programming Examples
S3000 – S4000 SERIES CNC

PROG12 Profile 12 (CNC S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 [PROFILE 12
N2 $1M0X-83.1I105.Y-63.6J56.4
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X-50Y-30R
N10 Z2R
N11 Z-10
N12 G41K2
N13 G13X-40Y10I-10J120
N14 G20
N15 G21I100
N16 G20X30Y30I-10
N17 G11X70Y0
N18 G21I-20
N19 G13J-135
N20 G13Y-20J180
N21 G21I10
N22 G13X15J-90 N25 G40X-50Y-30K2
N23 G21I-18 N26 Z100R
N24 G13X-40Y10I-10J120 N27 M30

Programming Examples 13
S3000 - S4000 SERIES CNC

PROG13 Profile 13 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 13
N2 $1M0X-85.1I106.Y-64.4J57.6
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X15Y-10R
N10 Z2R
N11 Z-10
N12 G42K2
N13 E1=G20X50Y-40,G13X0Y-30J180,G20X-20Y-40
N14 E1
N15 G13Y-40J180K2
N16 G20X-35Y-30I-10
N17 G21I50
N18 G20X-35Y30I-15
N19 G21I30
N20 E2=G10X-35Y30,G11X90Y20 N26 E5
N21 E2 N27 G13J180
N22 E3=E2,G13X50Y0J-90 N28 E1
N23 E4=G13E3J-45 N29 G40X15Y-10K2
N24 E4 N30 Z100R
N25 E5=E4,G13X90Y0J-90,G13Y-40X0J180 N31 M30

14 Programming Examples
S3000 – S4000 SERIES CNC

PROG14 Profile 14 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 14
N2 $1M0X-123.I118.Y-63.3J90.7
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X0Y-60R
N10 Z2R
N11 Z-10
N12 G42K2
N13 G20X0Y0I45
N14 E1=G20X61Y0I-16
N15 E1
N16 E2=G13X0Y10J0,E1
N17 E3=G20X0Y0I70
N18 E4=G13X0Y0J-135,E3 N25 E6=G13X0Y0J140, E3K2
N19 E5=E2,G21I-90,E4 N26 G13E6J-90
N20 G21I3 N27 G21I90
N21 E5 N28 G20X0Y0I45
N22 G21I9 N29 G40X0Y-60K2
N23 E3 N30 Z100R
N24 G21 N31 M30

Programming Examples 15
S3000 - S4000 SERIES CNC

PROG15 Profile 15 (CNC S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 [PROFILE 15
N2 $1M0X-119.I124.Y-77.5J77.5
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X0Y-75R
N10 Z2R
N11 Z-10 N25 G13J45
N12 G41K2 N26 G13Y60J0
N13 G13Y-60J180 N27 G10X60Y60
N14 G21I-12 N28 G11X80Y50
N15 G10X-80Y-60 N29 G13J-90
N16 G11X-65Y0 N30 G13X50Y0I7J210
N17 G21I5 N31 G20
N18 G11X-80Y50 N32 G13J-30
N19 G21I-8 N33 G13X80J-90
N20 G11X-45Y60 N34 G21J10
N21 G13J0 N35 G13Y-60J180
N22 G21I-10 N36 G40X0Y-75K2
N23 G13X-10J-90 N37 Z100R
N24 G20X0Y25I10 N38 M30

16 Programming Examples
S3000 – S4000 SERIES CNC

PROG16 Profile 16 (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 [PROFILE 16
N2 $1M0X-119.I124.Y-44.2J111.
N3 G17
N4 O1
N5 T1
N6 F1000S1200M3
N7 G49I5
N8 Z100R
N9 X0Y-40R
N10 Z2R
N11 Z-10 N25 G11X0Y0I18
N12 G42K2 N26 G21
N13 G20X0Y0I29 N27 G20X0Y0I29
N14 G13X0Y0J-30K2 N28 G21I-2
N15 E1=G20X0Y0I68 N29 G13X0Y0J175
N16 E1K2 N30 G21I7
N17 E2=G13Y30X0J180,E1 N31 G20X0Y0I42
N18 G10E2 N32 G21
N19 G11X0Y0 N33 G13X0Y0I4J55
N20 G20X0Y0I29 N34 G21I-2
N21 G21I-4 N35 G20X0Y0I29
N22 G10X0Y0I18 N36 G40X0Y-40K2
N23 G11X-30Y90I10 N37 Z100R
N24 G20 N38 M30

Programming Examples 17
S3000 - S4000 SERIES CNC

PROG17 Pin thread with thread chaser milling cutter


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$2X-55.2I62.2Y-62.1J12.9K45.Q30.
N1 [Pin thread machining with thread chaser cutter
N2 [thread depth>=thread chaser depth
N3 [For programmes in which the thread chaser N24 XP21Y0R
depth is > than the hole depth N25 Z2R
N4 [use the same programme by inputting N26 P50=(INT(P33/P30))+1 [n. required
P33=P34 threads
N5 [and adding the G52Z…function at the top N27 P51=P50*P30 [machining length
where: N28 P52=P33-P30 [Z last cut
N6 [G52Z thread chaser depth-pin depth N29 P60=(INT(P33/P34))+1 [n. of times on Z
N7 G52Z0 [input only when P34>P33 N30 P61=INT(P33/P60)
N8 G17 N31 P62=P61
N9 O1 N32 P63=P60-2 [n. repetitions
N10 T1M6 N33 L=7
N11 F1200 S2000 M3 N34 Z-P62R
N12 Z100R N35 G3XP20Y0IP22J0
N13 P30=1.5[Thread pitch N36 G2I0J0Z-P30I
N14 P31=33 [Nominal thread diameter N37 G3XP21Y0IP22J0
N15 P32=6 [thread chaser cutter radius N38 P62=P62+P61
N16 P33=50 [thread depth N39 L7KP63
N17 P34=14 [thread chaser depth N40 XP21Y0
N18 P35=0 [machining allowance N41 Z-P52R
N19 [ N42 G3XP20Y0IP22J0
N20 P20=((P31/2)+P32)+P35 N43 G2I0J0Z-P30I
N21 P21=P20+15 N44 G3XP21Y0IP22J0
N22 P22=P20+7.5 N45 Z100R
N23 Z100R N46 M30

18 Programming Examples
S3000 – S4000 SERIES CNC

PROG18 Drilling thread with thread chaser cutter


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$2X-70.4I86.3Y-82.8J17.3K45.Q30. N27 T1M6 [ thread milling


N1 [program to execute in g17 the milling thread of a hole N28 S1200M3
N2 [by thread chaser - helicoidal interpolation N29 [
N3 [simultaneous machining of the coil (from bottom to top) N30 Z200R
N4 [right thread N31 X0Y0R
N5 [note: the hole height must be higher than the thread N32 Z5R
chaser height N33 Z-44F1000
N6 [(more passes) N34 L2
N7 [ N35 Z-22F1000
N8 [in the example the hole height is 42 mm, while N36 L2
N9 [the thread chaser height is 25 mm N37 Z100R
N10 [the tool is positioned on the first depth of Z-44 N38 M30
N11 [(that is, Z at hole end + thread pitch) N39 L=2
N12 [the second depth is Z-22 (a pitch multiple, N40 P10=P2-.5
N13 [shorter than the thread chaser height) N41 X0Y-P10F500 [approach
N14 [ N42 P11=((P10*P10)+(P1*P1))/(2*P1)
N15 P0=12.5 [ thread milling radius N43 P12=SIN(P11/P10)
N16 P1=29 [ nominal thread radius (M58 x 2) N44 P13=SQR((P11*P11)-(P10*P10))
N17 P2=28 [ internal boring machining radius (diam 56) N45 P14=P13*COSP12
N18 P3=2 [ pitch N46 P15=P13*SINP12
N19 P4=200 [ milling (feed) feed N47 P16=P3/4
N20 [ N48 G3XP1Y0IP14J-P15ZP16IFP4
N21 P1=P1-P0 [approach quarter
N22 P2=P2-P0 N49 G3I0J0ZP3I [ complete coil
N23 P3=ABSP3 N50 G3X0YP10IP14JP15ZP16I
N24 [ [exit quarter
N25 G17 N51 X0Y0F500
N26 O1 N52 G32

Programming Examples 19
S3000 - S4000 SERIES CNC

PROG19 Taper hole (CNC S3035/S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-138.I139.Y-132.J45.K45.Q30.
N2 [Spiral taper hole machining with toric cutter
N3 [zeroed at insert centre
N4 [to machine with parallel cutter, the insert radius
N5 [must be at zero (P1=0)
N6 [to machine with spherical cutter P6=0 and P1=cutter radius
N7 [
N8 P6=6 [CUTTER RADIUS
N9 P1=2 [INSERT RADIUS
N10 P2=120 [HIGH HOLE
N11 P3=100 [INITIAL DIAMETER
N12 P5=5 [Z INCREMENT PER REV = PITCH
N13 P0=5 [ANGULAR INCREMENT
N14 P7=8 [TAPER RATIO
N15 [
N16 G17
N17 O1
N18 T1M6
N19 F1200 S3000 M3
N20 [ N29 Z5R
N21 P8=(P3/2-P1*COSP7)-P6 N30 ZP9
N22 P9=P1*SINP7 N31 P22=P9-P21
N23 P10=P2-P1 [dead holes P10=P2-P9+2 [through holes N32 L=1
N24 P11=P5*TANP7 N33 X-P20IYP0IZP22
N25 P20=P11/(360/P0) N34 P22=P22-P21
N26 P21=P5/(360/P0) N35 {P22>=-P10}L1
N27 Z20R N36 Z20R
N28 G76XP8Y0R N37 M30

20 Programming Examples
S3000 – S4000 SERIES CNC

PROG20 Tapered pin (CNC S3035/S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-137.I140.Y-133.J44.K45.Q30.
N2 G17
N3 O1
N4 T1M6
N5 F1000 S2000 M3
N6 [Taper tap machining with toric cutter zeroed at insert centre.
N7 [To machine with cylinder cutter, insert radius must
N8 [be zero (P1=0)
N9 [To machine with spherical cutter P6=0 and P1= cutter radius
N10 [
N11 P6=6 [milling machine radius
N12 P1=0 [insert radius
N13 P2=100 [total tap depth
N14 P3=40 [upper start point diameter
N15 P5=5 [Z increment per rev=pitch
N16 P7=10 [taper ratio
N17 [
N18 P0=5 [angular increment
N19 P8=(P3/2+P1*COSP7)+P6
N20 P9=P1*SINP7
N21 P10=P2-P1
N22 P11=P5*TANP7
N23 P20=P11/(360/P0)
N24 P21=P5/(360/P0) N30 L=1
N25 Z20R N31 XP20IYP0IZP22
N26 G76XP8Y0R N32 P22=P22-P21
N27 Z5R N33 {P22>=-P10}L1
N28 ZP9 N34 Z20R
N29 P22=P9-P21 N35 M30

Programming Examples 21
S3000 - S4000 SERIES CNC

PROG21 Hole thread (CNC S3035/S3040/S3040GE/S3045/S3045P)


(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-57.9I59.6Y-50.5J24.5K45.Q30.
N2 G17 N13 P0=P0/2
N3 O1 N14 P4=INT(P4/P3)
N4 T1M6 N15 P6=P3/4
N5 F1000S1200M3 N16 P14=P4-1
N6 [P0= cutter diameter N17 P10=P3*2
N7 [P1= internal hole diameter N18 P1=P1/2
N8 [P2= nominal (external) hole diameter N19 P2=P2/2
N9 [P3= Z thread pitch N20 P20=P1+P5
N10 [P4= total hole depth in Z N21 P21=P20-P0
N11 [P5= cut depth radius N22 Z50R
N12 P0=5,P1=45,P2=50,P3=5,P4=-30,P5=.4 N23 X0Y0R
N13 LFILETTO: N24 Z2R
N14 M30 N25 L=10
N26 P21=P20-P0
Filetto N27 P15=P21/2
N1 [hole thread with tool N28 ZP10R
N2 [ N29 ZP6
N3 [P0= cutter diameter N30 G2XP21Y0 Z-P6I IP15J0
N4 [P1= internal diameter N31 L=1
N5 [P2= nominal (eternal) hole diameter N32 G2Z-P3II0J0
N6 [P3= Z thread pitch N33 L1KP14
N7 [P4= total hole depth in Z N34 G2X0Y0IP15J0Z-P6I
N8 [P5= cut depth radius N35 P20=P20+P5
N9 [ N.B. parameters are to be defined in the main N36 P22=P20-P2
programme N37 {P22<0.001}L10
N10 [prior to recalling the subprogram N38 P20=P2
N11 P3=ABSP3 N39 L10K1
N12 P5=ABSP5 N40 Z50R

22 Programming Examples
S3000 – S4000 SERIES CNC

PROG22 Boring with wall disjunction


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-12.1I46.7Y-23.7J13.8K-45.Q30.
N2 G17
N3 O1
N4 T1M6 N7 [P13= dwell time at hole bottom calculated
N5 F1000S1000M3 in tenths of a second with spindle
N6 [P1,P2 X Y of hole rotating
N7 [P10= hole depth dimension N8 [P14= dwell time at hole bottom calculated
N8 [P11= hole lead dimension in tenths of a second with spindle
N9 [P12= clearing dimension motionless
N10 [P13= dwell time at hole bottom calculated in N9 [P15= tool bit angle after M19 (orientation)
tenths of a second with spindle rotating N10 [P16= wall disjunction shifting
N11 [P14= dwell time at hole bottom with spindle N11 [
motionless N12 [N.B. parameters are to be
N12 [P15= tool bit angle after M19 (orientation) defined in the main programme
N13 [P16= wall disjunction shifting N13 [prior to recalling the subprogram
N14 P10=-10, P11=2, P12=5, P13=10, P14=20, N14 G51XP1YP2
P15=45, P16=.5 N15 ZP12R
N15 P1=10,P2=10 N16 X0Y0R
N16 LBARENAT: N17 ZP11R
N17 P1=20,P2=10 N18 ZP10
N18 LBARENAT: N19 G4KP13
N19 P1=30,P2=20 N20 M5
N20 LBARENAT: N21 G4KP14
N21 Z100R N22 M19 [spindle orientation
N22 M30 N23 X0Y0
N24 P25=P15+180
Barenat N25 P30=SINP25*P16
N1 [Bore subprogram N26 P31=COSP25*P16
N2 [boring cycle including wall disjunction N27 XP31YP30
N3 [P1,P2 X Y of hole N28 ZP12R
N4 [P10= hole bottom dimension N29 X0Y0R
N5 [P11= hole lead dimension N30 M3
N6 [P12= clearing dimension N31 G50

Programming Examples 23
S3000 – S4000 SERIES CNC

PROG23 Points on a circle


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $1M0X-76.I159.Y-46.8J103.
N2 G17 N13 {P5>0}L2
N3 O1 N14 P5=P5+360
N4 T1M6 N15 L=2
N5 S2000M3F1000 N16 P7=P5-P4
N6 [P1= X center N17 {P5>P4}L25
N7 [P2= Y center N18 {P3<0}L29
N8 [P3= marked radius in relation to lead point N19 P7=P7+360
N9 [positive=anti-clockwise negative=clockwise N20 P99=1
N10 [P4= initial angle N21 P99>L29
N11 [P5= final angle N22 L=25
N12 [P6= number of holes N23 {P3>0}L29
N13 G81Z-10J2 N24 P7=P7-360
N14 P1=30,P2=30,P3=-50, P4=30, P5=180,P6=12 N25 L=29
N15 LEQUC: N26 P8=ABS(P4-P5)-0.0001
N16 G80Z100R N27 {P8>0}L31
N17 M30 N28 P7=P7/P6
N29 P99=1
Equc N30 P99>L33
N1 [Equally spaced holes on a circle N31 L=31
N2 [initial and final angle known N32 P7=P7/(P6-1)
N3 [P1= X center N33 L=33
N4 [P2= center N34 P4=P4-P7
N5 [P3= marked radius N35 P3=ABSP3
N7 [P4= initial angle N36 G51XP1YP2
N8 [P5= final angle N37 P6=P6-1
N9 [P6= number of holes N38 L=50
N10 {P4>0}L1 N39 P4=P4+P7
N11 P4=P4+360 N40 G76XP3YP4
N12 L=1 N41 L50KP6

24 Programming Examples
S3000 – S4000 SERIES CNC

PROG24 Points on a straight line


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $1M0X-243.I227.Y-154.J146.
N2 G17
N3 O1
N4 T1M6
N5 S2000M3F1300
N6 [P1=X 1ST point P2=Y 1ST point
N7 [P3=X 2ND point P4=Y 2ND point
N8 [P5= number of points
N9 G81Z-10J2
N10 P1=150,P2=50,P3=-50,P4=-50,P5=12
N11 LEQUL:
N12 G80Z100R
N13 M30

Equl
N1 [Series of points laid out on a straight line
N2 [first and last point known
N3 [P1=X 1ST point P2=Y 1ST point
N4 [P3=X 2ND point P4=Y 2ND point
N5 [P5= number of points
N6 P12=P5-1
N7 P10=(P3-P1)/P12
N8 P11=(P4-P2)/P12
N9 P12=P12-1
N10 XP1YP2
N11 L=1
N12 XP10IYP11I
N13 L1KP12

Programming Examples 25
S3000 – S4000 SERIES CNC

PROG25 Points on a rectangle


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $1M0X-76.3I80.8Y-9.3J91.1
N2 G17
N3 O1
N4 T1M6
N5 S2000M3F1500
N6 G81Z-10J2
N7 [P1= X lower left vertex
N8 [P2= Y lower left vertex
N9 [P3=inclination angle
N10 [P4=lato X
N11 [P5=lato Y
N12 P1=-10,P2=20,P3=30,P4=50,P5=30
N13 LRET:
N14 G80Z100R
N15 M30

Ret
N1 [RET subprogram to machine 4 holes laid out on a N8 [the RET subprogram
rectangle when the following are known: N9 [as with the parameters of the
N2 [P1= X lower left vertex fixed cycle
N3 [P2= Y lower left vertex N10 G51XP1YP2JP3
N4 [P3=inclination angle of the rectangle N11 X0Y0
N5 [P4=side X N12 XP4
N6 [P5=side Y N13 YP5
N7 [Parameters are to be defined in the main programme N14 X0
prior to calling N15 G50

26 Programming Examples
S3000 – S4000 SERIES CNC

PROG26 Points on a centred rectangle


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $1M0X-155.I159.Y-103.J97.8
N2 G17
N3 O1
N4 T1M6
N5 S2000M13F1000
N6 G81Z-10J2
N7 [P1= X centre of rectangle
N8 [P2= Y centre of rectangle
N9 [P3=inclination angle
N10 [P4=side X
N11 [P5=side Y
N12 P1=70,P2=-20,P3=25,P4=95,P5=37
N13 LRETC:
N14 G80Z50R
N15 M30

Retc
N1 [RETC subprogram to machine 4 holes laid out on a
rectangle when the following are known:
N2 [P1= X centre of rectangle
N3 [P2= Y centre of rectangle
N4 [P3=inclination angle of rectangle
N5 [P4=side X
N6 [P5=side Y
N7 [Parameters are to be defined in the
N8 [main programme prior to calling the subprogram N13 X-P44Y-P55
N9 [as with the parameters of the fixed cycle N14 XP4I
N10 G51XP1YP2JP3 N15 YP5I
N11 P44=P4/2 N16 X-P4I
N12 P55=P5/2 N17 G50

Programming Examples 27
S3000 – S4000 SERIES CNC

PROG27 Board rough-boring


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$1M0X-312.I316.Y-203.J198. N18 L=1


N1 G17 N19 P6=INT(P2/P3+.999)
N2 O1 N20 P3=P2/P6
N3 T1M6 N21 L=2
N4 F1200S2000M3 N22 P6=P6/2
N5 [P1= side X of board N23 P6=P6-1
N6 [P2= side Y of board N24 P11=P1/2
N7 [P3= increment between cuts N25 P12=P2/2
N8 [P4= cut angle (0 or 90 degrees) N26 Z50R[release dimension
N9 [P5=work Z: normally Z0 N27 X-P11Y-P12R
N10 P1=300,P2=180,P3=10,P4=0,P5=0 N28 P7=P5+2
N11 LROUGHBORE: N29 ZP7R
N12 M30 N30 ZP5
N31 {P4=0}L3
Sgrossa N32 L=4
N1 [P1= side X of board N33 YP12
N2 [P2= side Y of board N34 XP3I
N3 [P3= cut increment N35 Y-P12
N4 [P4= cut angle N36 XP3I
N5 [P5=work Z N37 L4KP6
N6 [The macro does not consider the cutter’s radius N38 YP12
N7 [the centre of the cutter is positioned on P1,P2 N39 P1>L99
N8 [Parameters are to be defined in the main programme N40 L=3
N9 [prior to calling the subprogram N41 L=5
N10 L=51 N42 XP11
N11 {P4=0}L50 N43 YP3I
N12 {P4<>90}L51 N44 X-P11
N13 L=50 N45 YP3I
N14 {P4=0}L1 N46 L5KP6
N15 P6=INT(P1/P3+.999) N47 XP11
N16 P3=P1/P6 N48 L=99
N17 P1>L2 N49 Z50R[release dimension

28 Programming Examples
S3000 – S4000 SERIES CNC

PROG28 Groove
(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$1M0X-155.I158.Y-102.J98.3
N1 G17 N18 ZP5R
N2 O1 N19 P3=ABSP3
N3 T1M6 N20 P4=ABSP4
N4 F1200S2000M3 N21 P6=INT(P3/P4+0.999)
N5 [P1= groove X length N22 P4=P3/P6
N6 [P2= groove Y width N23 P6=P6/2
N7 [P3= Z groove depth N24 P6=P6-1 [nuber of repititions
N8 [P4=cut depth N25 P7=P1/2 [semi-side X
N9 [P5= Z safety dimension N26 P8=P7-P10/2 [shifting on X to centre of
N10 [P10= cutter diameter milling cutter
N11 [P20= X groove centre N27 P30=0 [Z start
N12 [P21= Y groove centre N28 XP8Y0R
N13 [P22= groove inclination angle N29 L=1
N14 P1=120, P2=50, P3=20, P4=3, P5=5, P10=10, N30 P30=P30-P4
P20=40,P21=20,P22=15 N31 ZP30
N15 LSCANAL: N32 X-P8
N16 M30 N33 P30=P30-P4
N34 {P30<-P3}L2
Scanal N35 ZP30
N1 [Groove N36 XP8
N2 [P1= groove X length N37 {P30<>-P3}L1
N3 [P2= groove Y width N38 L=2
N4 [P3= groove Z depth N40 X0Y0
N5 [P4=cut depth N41 Z-P3
N6 [P5=Z safety dimension N42 P11=P2/2 [semi-side Y
N7 [P10= cutter diameter N43 P12=P11-P10/2 [shifting on Y to centre of
N8 [P20= X groove centre milling cutter
N9 [P21= Y groove centre N44 P13=P12/2 [circle attachment radius
N10 [P22= groove inclination angle N45 P8=P8-P12
N11 [N.B. Parameters are to be defined in the N46 G3X0YP12I0JP13
main programme N47 X-P8
N12 [prior to recalling the subprogram N48 G3Y-P12I-P8J0
N14 [The subprogram SCANAL is used to machine N49 XP8
grooves while only moving Z N50 G3YP12IP8J0
N15 G51XP20YP21JP22 N51 X0
N16 Z50R N52 G3X0Y0I0JP13
N17 X0Y0R N53 Z50R

Programming Examples 29
S3000 – S4000 SERIES CNC

PROG29 Groove with slope descent


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$2X-54.8I102.Y-41.3J58.9K15.Q50.
N1 G17
N2 O1
N3 T1M6
N4 F1200S2000M3
N5 [P1= groove X length
N6 [P2= groove Y length
N7 [P3= groove depth
N8 [P4=cut depth
N9 [P5= Z safety dimensions
N10 [P10= cutter diameter
N11 [P20= X groove centre
N12 [P21= Y groove centre
N13 [P22= groove inclination angle
N14 P1=100, P2=40, P3=10, P4=2, P5=2, P10=8, P20=30,P21=20,P22=-30
N15 LSCANAL1:
N16 M30

Scanal1
N1 [Groove 1
N2 [P1= groove X length
N3 [P2= groove Y width
N4 [P3= groove depth
N5 [P4= cut depth
N6 [P5= Z safety dimensions
N7 [P10= cutter diameter
N8 [P20= X groove centre
N9 [P21= Y groove centre
N10 [P22= groove inclination angle
N11 [N.B. Parameters are to be defined in the main programme
N12 [prior to recalling the subprogram
N14 [The subprogram SCANAL1 is used to machine depth descending grooves

30 Programming Examples
S3000 – S4000 SERIES CNC

N15 [moving 3 axes contemporarily


N16 G51XP20YP21JP22
N17 Z50R
N18 P3=ABSP3
N19 P4=ABSP4
N20 P6=INT(P3/P4+0.999)
N21 P4=P3/P6
N22 P6=P6/2
N23 P6=P6-1 [number of repetitions
N24 P7=P1/2 [semi-side X
N25 P8=P7-P10/2 [shifting on X to centre of the cutter
N26 P30=0 [Z start
N27 XP8Y0R
N28 ZP5R
N29 Z0
N30 L=1
N31 P30=P30-P4
N32 X-P8ZP30
N33 XP8
N34 [P30=P30-P4
N35 {P30<-P3}L2
N36 {P30<>-P3}L1
N37 L=2
N38 [ZP5R
N39 X0Y0
N40 Z-P3
N41 P11=P2/2 [semi-side Y
N42 P12=P11-P10/2 [Y shifting to centre of cutter
N43 P13=P12/2 [circle attachment radius
N44 P8=P8-P12
N45 G3X0YP12I0JP13
N46 X-P8
N47 G3Y-P12I-P8J0
N48 XP8
N49 G3YP12IP8J0
N50 X0
N51 G3X0Y0I0JP13
N52 Z50R

Programming Examples 31
S3000 – S4000 SERIES CNC

PROG30 Rectangular pocket


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$1M0X-155.I158.Y-102.J98.3 N8 [N.B. side X of the pocket must be


N1 G17 more than or equal to side Y of the
N2 O1 pocket
N3 T1M6 N9 [P6= pocket radius
N4 F1000S1000M3 N10 [P7= cutter radius
N5 [P1= X pocket centre N11 [P8= pocket depth
N6 [P2= Y pocket centre N12 [P9= cut depth
N7 [P3= pocket angle in relation to x axis N13 [P10= machining allowance
N8 [P4= side X pocket N14 [P11=1 finishing SI P11=0 finishing
N9 [P5= side Y pocket NO
N10 [P6= pocket radius N16 {P11=0}L90
N11 [P7= cutter radius N17 {P6>=P7}L90
N12 [P8= total pocket depth N18 P6=P7
N13 [P9= cut depth N19 L=90
N14 [P10= machining allowance N20 {P4>=P5}L91
N15 [P11= 1 finishing SI P11=0 finishing NO N21 P3=P3+90
N16 P1=0, P2=0, P3=30, P4=170, P5=120, P6=15, N22 P70=P4
P7=5,P8=-20,P9=3 N23 P4=P5
N17 P10=0.5,P11=1 N24 P5=P70
N18 LCAVARET: N25 L=91
N19 Z50R N26 P77=P7[save cutter radius
N20 M30 N27 P7=P7+P10
N28 P64=P5/2-P7
Cavaret N30 P66=50[ Z release
N1 [Subprogram CAVARET N31 G49I0
N2 P65=0.5 [wall disjunction N32 P8=ABSP8
N3 [P1= X pocket centre N33 P9=ABSP9
N4 [P2= Y pocket centre N34 P19=INT(P8/P9+0.99)
N5 [P3= pocket angle in relation to axis X N35 P20=-P8/P19
N6 [P4= side X pocket N36 P19=P19-1
N7 [P5= side Y pocket N37 P14=P4/2-P7
N38 P15=P5/2-P7+P7*0.7 N94 P13=P15-P77
N39 P16=P6-P7 N95 X0YP13

32 Programming Examples
S3000 – S4000 SERIES CNC

N40 P18=P7*1.4 N96 P16=P13+P77/2


N41 P18=INT(P15/P18+1) N97 P17=P14-(P6-P77)
N42 P17=P15/P18 N98 P18=P15-(P6-P77)
N43 P14=P14-P17*P18 N99 G3I0JP16X0YP15
N44 P15=P5/2-P7-P17*P18 N100 X-P17
N45 P16=P16-P17*P18 N101 G3X-P14YP18I-P17JP18
N46 P24=P14 N102 Y-P18
N47 P25=P15 N103 G3X-P17Y-P15I-P17J-P18
N48 P26=P16 N104 XP17
N49 G51XP1YP2JP3 N105 G3XP14Y-P18IP17J-P18
N50 P18=P18-1 N106 YP18
N51 ZP66R N107 G3XP17YP15IP17JP18
N52 X0YP64R N108 X0
N53 Z2R N109 G3X0YP13I0JP16
N54 Z0 N110 L=4
N55 L=2 N111 G50
N56 X0Y0ZP20I N112 ZP66R
N57 [ZP20I
N58 L=3
N59 P14=P14+P17
N60 P15=P15+P17
N61 P16=P16+P17
N62 P16>L33
N63 P36=0
N64 P16<L34
N65 L=33
N66 P36=P16
N67 L=34
N68 X0YP15
N69 G41
N70 YP15X0
N71 P60=P14-P36
N72 X-P60
N73 P61=P15-P36
N74 G3X-P14YP61I-P60JP61
N75 Y-P61
N76 G3X-P60Y-P15I-P60J-P61
N77 XP60
N78 G3XP14Y-P61IP60J-P61
N79 YP61
N80 G3XP60YP15IP60JP61
N81 X0
N82 G40
N83 L3KP18
N84 P14=P24
N85 P15=P25
N86 P16=P26
N87 L2KP19
N88 P64=P64-P65
N89 YP64
N90 {P11=0}L4
N91 [pocket finishing
N92 P14=(P4/2)-P77
N93 P15=(P5/2)-P77

Programming Examples 33
S3000 – S4000 SERIES CNC

PROG31 Spiral sphere


(CNC S3035/S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-94.7I93.3Y-53.5J66.6K45.Q30.
N2 [Spiral milled sphere
N3 [spherical cutter zeroed at cuter centre
N4 [skim plate Z0 with tool tip and reset : Zradius
N5 [example Z5 if the cutter is D10
N6 $7
N7 O1 N30 $5
N8 T1M6 N31 XP1Y0R
N9 G17 N32 [Z10R
N10 M3S1500F4000 N33 L=1
N11 Z10R N34 P7=P1*COSP2
N12 P0=5[cutter radius N35 P8=P1*SINP2
N13 P1=50[[sphere radius N36 P12=P2+P4
N14 P2=0[initial angle N37 P17=P1*COSP12
N15 P3=90[final angle N38 P18=P1*SINP12
N16 P4=2[cut distance N39 P27=P7-P17[radius delta
N17 P5=15[angle increment on a circle N40 P28=ABSP18-ABSP8[Z delta
N18 P15=INT(360/P5+.999) N41 P37=P27/P15
N19 P16=P15-2 N42 P38=P28/P15
N20 P1=P1-P0 N43 G76XP7Y0Z-P8
N21 [ N44 L=2
N22 P20=INT(P0/P4) N45 P7=P7-P37
N23 P21=P0/P20 N46 P8=P8+P38
N24 P22=P20-1 N47 G76XP7YP5IZ-P8
N25 XP1Y0ZP0 N48 L2KP16
N26 L=0 N49 P2=P2+P4
N27 G3I0J0Z-P21I N50 {P3>P2}L1
N28 L0KP22 N51 Z100R
N29 [ N52 M30

34 Programming Examples
S3000 – S4000 SERIES CNC

PROG32 Modal subprogram


(CNC S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $1M0X-155.I158.Y-97.2J103.
N2 T1M6[D8 tip
N3 S4000M3F2000
N4 G81Z-10J2 [D8 hole at L=2 points
N5 L2
N6 G80Z50R
N7 T2M6[cutter D6
N8 S4000M3F2000
N9 G73 L1 [recall subprogram L=1 at L=2 points
N10 L2
N11 G72 [close G73
N12 M30
N13 [
N14 L=1 [machining subprogram
N15 Z2R
N16 X0Y0R
N17 Z-5
N18 G41K2
N19 G20X0Y0I20
N20 G40K2X0Y0
N21 Z2R
N22 G32
N23 [
N24 L=2 [points where subprogram L=1 is to be repeated
N25 X30Y50
N26 X-50Y0
N27 Y-50
N28 X50Y-25
N29 X100Y0
N30 G32

Programming Examples 35
S3000 – S4000 SERIES CNC

PROG33 Rotated/offset pattern tapping holes on a linear


grid with G751function
(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 [HOLES ON A LINEAR GRID


N2 [PATTERN TAPPING WITH G751FUNCTION
N3 $1M0X-356.I373.Y-229.J237. N23 P3=P2*4
N4 G17 N24 P4=48
N5 O1 N25 P1=0
N6 T1 N26 L=3
N7 F10000S15000M3 N27 G781Z-10J2X-P4Y-P3D1=3D2=48
N8 P1=0 N28 P1=P1+60
N9 L=1 N29 G751ROTZP1
N10 G781Z-10J2X48Y0D1=4D2=48 N30 L3K5
N11 P1=P1+60 N31 P3=P2*3
N12 G751ROTZP1 N32 P4=24
N13 L1K5 N33 P1=0
N14 P2=41.56 [Y DISTANCE N34 L=4
N15 P3=P2*5 N35 G781Z-10J2X-P4Y-P3D1=2D2=48
N16 P4=48+24 N36 P1=P1+60
N17 P1=0 N37 G751ROTZP1
N18 L=2 N38 L4K5
N19 G781Z-10J2X-P4Y-P3D1=4D2=48 N39 P3=P2*2
N20 P1=P1+60 N40 G791Z-10J2X0Y0D1=6D2=P3D3=-90
N21 G751ROTZP1 N41 Z100R
N22 L2K5 N42 M30

36 Programming Examples
S3000 – S4000 SERIES CNC

PROG34 Profiled pocket with internal islands


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

Unquoted radiuses = 10

N1 [PROFILED POCKET WITH INTERNAL ISLANDS


N2 [ S4040GE / S4045 / S4045P
N3 $1M0X-170.I177.Y-121.J101.
N4 G17
N5 O1
N6 T1
N7 F1000S1200M3
N8 G49I7.5
N9 Z100R
N10 G777Z-10J0I2D1=45
N11 G701X0Y50
N12 G41K2
N13 G13Y70J180
N14 G21I30
N15 G13X-90J-90
N16 G21I-10
N17 E1=G20X-90Y0,G21I50,G20X-90Y-60
N18 E1
N19 G21
N20 G13X-90J-90
N21 G21I40
N22 G13Y-110J0

Programming Examples 37
S3000 – S4000 SERIES CNC

N23 G21I20
N24 E2=G13X70Y0J90
N25 E2
N26 E3=E2,G21I-50,G20X110Y-30
N27 E3
N28 G21I10
N29 G13X110J90
N30 G21I-10
N31 G20X90Y50I32
N32 G21
N33 G13Y70J180
N34 G40X0Y50K2
N35 G701X0Y-10
N36 G41K2
N37 G13Y10J180
N38 G20X-30Y20I-10
N39 G13J0
N40 G20X30Y20I-10
N41 G13J180
N42 G40X0Y-10K2
N43 G701X-20Y-30
N44 G41K2
N45 G10X-30Y-70I-10
N46 G11X20Y-30I-10
N47 G20
N48 G13J-90
N49 G21I-10
N50 G13Y-80J180
N51 G20X-30Y-70I-10
N52 G11X20Y-30I-10
N53 G40X-20Y-30K2
N54 G778
N55 Z100R
N56 M30

38 Programming Examples
S3000 – S4000 SERIES CNC

PROG35 Ellipse draining


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $1M0X-110.I109.Y-67.3J72.7
N2 [ellipse draining
N3 P1=100 [major semiaxis
N4 P2=60 [minor semiaxis
N5 P3=2.5 [angle increment
N6 [
N7 P20=INT(360/P3)+1
N8 P3=360/P20
N9 P11=P1*COSP3
N10 P12=P2*SINP3
N11 E1=G10XP1Y0,G11XP11YP12
N12 E2=G10XP11Y-P12,G11XP1Y0
N13 G49I10 [cutter radius
N14 P20=P20-3
N15 G777Z-10I5J0
N16 G701X50Y10
N17 G41
N18 E2
N19 E1
N20 G10XP11YP12
N21 P5=P3
N22 L=10
N23 P5=P5+P3
N24 P8=P1*COSP5
N25 P9=P2*SINP5
N26 G11XP8YP9
N27 L10KP20
N28 E2
N29 E1
N30 G40
N31 P5=P3
N32 G778
N33 Z100R
N34 M30

Programming Examples 39
S3000 – S4000 SERIES CNC

PROG36 Pocket with circular islands


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $1M0X-182.I161.Y-105.J114.
N2 [pocket with internal islands that are repeated on the
circumference
N3 G17
N4 O1
N5 T1M6
N6 F1000S2000M3
N7 G49I2.5
N8 G777Z-10I10J0
N9 X80Y0 G701
N10 G41K2
N11 G20X0Y0I100
N12 G40X80Y0K2
N13 X40Y0 G701
N14 G41K2
N15 G20X0Y0I-30
N16 G40X40Y0K2
N17 G797X0Y0D1=6D2=65D3=30D5=1
N18 [X..Y... circumference centre
N19 [D1=number of islands
N20 [D2=circumference radius
N21 [D3=initial angle
N22 [D5=1 islands rotate D5=0 islands do not rotate
N23 X25Y0 G701
N24 G41K2
N25 G20X0Y0I-15
N26 G40X25Y0K2
N27 G780
N28 G778
N29 Z100R
N30 M30

40 Programming Examples
S3000 – S4000 SERIES CNC

PROG37 Pocket with linear repeated islands


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $1M0X-1405.I1335.Y-918.J833.
N2 [Profiled pocket with internal islands that are repeated on a grid
N3 G17
N4 O1
N5 T1M6
N6 F1200S1200M3
N7 G49I8
N8 G777Z-10I10J0
N9 X480Y0 G701
N10 G41K2
N11 G13X0Y0I500J90
N12 G21I50
N13 G13J180
N14 G21
N15 G13J-90
N16 G21
N17 G13J0
N18 G21
N19 G13J90
N20 G40X480Y0K2
N21 G787X-375Y-400D1=4D2=250 D4=6 D5=160
N22 [X...Y... position first island
N23 [D1=number of islands on X
N24 [D2=pitch on X
N25 [D4=number of islands on Y N34 G21
N26 [D5=pitch on Y N35 G13Y-40J0
N27 X110Y0 G701 N36 G21
N28 G42K2 N37 G13X100J90
N29 G13X100J90 N38 G40X110Y0K2
N30 G21I10 N39 G780
N31 G13Y40J180 N40 G778
N32 G21 N41 Z100R
N33 G13X-100J-90 N42 M30

Programming Examples 41
S3000 – S4000 SERIES CNC

PROG38 Holes on a hexagon


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $1X-210Y-125I210J125
N2 G17
N3 O1
N4 T1M6
N5 F1000S2000M3
N6 [ Programme to machine a set of holes
N7 [ that are laid out in the shape of a honey-comb
N8 [ on a hexagon
N9 [
N10 P1=20[ hole diameter (distance between holes)
N11 P2=90[ Total number of holes
N12 [
N13 [ Check exact number of holes
N14 L90
N15 [ P3 = N. of hexagons
N16 [P3=(-1+SQR(1+P2/3*4))/2 N31 L1K2
N17 [ P4 = Radius of circle that circumscribes the N32 G750
outer part of the hexagon N33 Z50RM5
N18 P4=P1*P3 N34 M30
N19 [ Calculate coordinates of first hole in P5,P6 N35 [
N20 P5=-P4/2 N36 L=90[ Subprogram: check n. holes
N21 P6=P5/TAN30 N37 P3=1
N22 [ P7, P8 = lines and columns of the die N38 L=91
N23 P7=P3 N39 P51=6*((P3+1)*P3/2)
N24 P8=P7+1 N40 { P51 = P2 } L92
N25 Z50R N41 P3=P3+1
N26 P10=0 N42 { P51 < P2 } L91
N27 L=1 N43 P2=?[number of holes do not coincide:
N28 G751 ROTZP10 input correct value
N29 G781XP5YP6Z-10J2 D1=P8 D2=P1 D3=0 N44 P50>L90
D4=P7 D5=P1 D6=120 N45 L=92
N30 P10=P10+120 N46 G32

42 Programming Examples
S3000 – S4000 SERIES CNC

PROG39 Selbox push-buttons (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N34 G32
N1 [Selbox push-button panel: push-buttons N35 L=2
N2 $1M0X-92.8I93.5Y99.7J219. N36 Z10R
N3 G17 N37 X-10Y0R
N4 O1 N38 Z2R
N5 T1 N39 Z-4
N6 F1000S1200M3 N40 G41K2
N7 G49I0 [input cutter radius (max. 1) N41 G13X0Y0I-7J90
N8 Z100R N42 G21I-4.5
N9 G787X-18Y111D1=3D2=18D4=3D5=18 N43 G13J0
N10 L1 N44 G21
N11 G780 N45 G13J-90
N13 G787X-36Y183D1=5D2=18D4=2D5=-18 N46 G21
N14 {P99=6}L50 N47 G13J180
N15 {P99=10}L50 N48 G21
N16 L2 N49 G13J90
N17 L=50 N50 G40X-10Y0K2
N18 G780 N51 Z10R
N20 G787X-28Y201D1=5D2=14 N52 G32
N21 L3 N53 L=3
N22 G780 N54 Z10R
N23 Z100R N55 X-8Y0R
N24 M30 N56 Z2R
N25 L=1 N57 Z-4
N26 Z10R N58 G41K2
N27 X-10Y0R N59 G13X-4J90
N28 Z2R N60 G20X0Y3I-4
N29 Z-4 [height 4 mm N61 G13J-90
N30 G41K2 N62 G20X0Y-3I-4
N31 G20X0Y0I-7 N63 G13J90
N32 G40X-10Y0K2 N64 G40X-8Y0K2
N33 Z10R N65 G32

Programming Examples 43
S3000 – S4000 SERIES CNC

PROG40 Spherical dome with points


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $2X-78.1I78.4Y-69.8J30.2K45.Q30. N33 L=51


N2 [SPHERICAL SPIRAL DOME OBTAINED BY POINTS N34 P7=P7+P2
N3 G17 N35 P97=P7-P2
N4 O1 N36 P95=90-P7
N5 T1M6 N37 P94=90-P97
N6 F8000 S10000 M3 N38 E8=G13E1JP94,E2K2
N7 [P1 angular increment X-Y P2= angular increment Z-X N39 E9=G13E1JP95,E2K2
N8 P1=4,P2=1 N40 P9=E8,1
N9 [P3=toric radius P4=tool centre distance tool bit centre N41 P10=E9,1
N10 [TORIC CUTTER D10 r1 : P3=1 P4=4 N42 [P12 radius coefficient
N11 P3=1,P4=4 N43 P12=(P10-P9)/360
N12 [P5=sphere radius P6=dome height N44 P15=E8,2
N13 [CAUTION P6<=P5 N45 P16=E9,2
N14 P5=50,P6=30 N46 [P17= coeffic. z
N15 [ N47 P17=(P15-P16)/360
N16 {P6>P5}L99 N48 P13=0,P92=0
N17 [CORRECT PARAMETERS N49 L=52
N18 [ N50 P13=P13+P92
N19 E1=G20X0Y-P5 N51 { P13 >= 360 } L53
N20 P99=P5+P3 N52 P14=P9+(P12*P13)+P4
N21 E2=G20E1I-P99 N53 P18=P15+(-P17*P13)+(-P3)
N22 P98=P6-P3 N54 G76XP14Y-P13ZP18
N23 E3=G13X0Y-P98J180 N55 G75
N24 E4=E3,E2 N56 P92=P1
N25 E5=G10E1,G11E4 N57 { P13 < 360 } L52
N26 P20=E5,2 N58 L=53
N27 P21=90-P20 N59 L51KP96
N28 [P96=n.passate in zx N60 P6>L98
N29 P96=INT(P21/P2) N61 L=99
N30 P2=P21/P96 N62 P6=?[WRONG PARAMETERS P6>P5
N31 P7=0 N63 P6>L99
N32 P96=P96-1 N64 L=98
N65 Z10R
N66 M30

44 Programming Examples
S3000 – S4000 SERIES CNC

PROG41 Spherical dome with circles


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $2X-25.8I25.9Y-19.8J13.2K45.Q30. N35 ZP15R


N2 [Sherical dome N36 L=51
N3 [obtained by circles N37 P17=P7
N4 G17 N38 P7=P7+P2
N5 O1 N39 E8=G13E1JP7,E2K2
N6 T1M6 N40 E9=G13E1JP17,E2K2
N7 F8000 S20000 M3 N41 P26=E9,2
N8 [P2 angular increment on ZX N42 P27=E8,2
N9 P2=.5 N43 P28=(P26-P27)/4
N10 [P3= toric radius N44 [P28 increment on Z for each 90
N11 [P4 = tool centre-plaque centre distance degree arch
N12 P3=1.2 N45 [
N13 P4=1.8 N46 P29=E9,1
N14 [P5= sphere radius P6= dome height N47 P30=E8,1
N15 P5=15 N48 [squared side = 1/4 spiral pitch
N16 P6=8 N49 [P13 = radius increment for a 1/4 of
N17 [******************************************** circle
N18 E1=G20X0Y-P5 N50 P13=(P29-P30)/4
N19 P99=P5+P3 N51 P14=P13/2
N20 E2=G20E1I-P99 N52 [P14 squared semi-side
N21 P98=P6-P3 N53 P4=P4+P13
N22 E3=G13X0Y-P98J180 N54 P15=P15-P28
N23 E4=E3,E2 N55 G2X-P14Y-P4ZP15I-P14J-P14
N24 E5=G10E1,G11E4 N56 P4=P4+P13
N25 P20=E5,2 N57 P15=P15-P28
N26 P21=90-P20 N58 G2X-P4YP14ZP15I-P14JP14
N27 [P96= n. cuts on zx N59 P4=P4+P13
N28 P96=INT(P21/P2) N60 P15=P15-P28
N29 P2=P21/P96 N61 G2X-P14YP4ZP15IP14JP14
N30 P96=P96-1 N62 P4=P4+P13
N31 P7=90 N63 P15=P15-P28
N32 P15=0 N64 G2XP4Y-P14ZP15IP14J-P14
N33 Z50R N65 L51KP96
N34 XP4Y-P14R N66 Z50R

Programming Examples 45
S3000 – S4000 SERIES CNC

PROG42 Spherical dome with external radius


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 $2X-11.7I10.5Y-9.23J4.98K45.Q30.
N2 [Spheric dome with external joint radius that is
spiral machined N35 G20X0Y0IP4F2000
N4 G17 N36 G40XP39Y0K2
N5 Z10R N37 P40=P40-.2
N6 S5000F3000M13 N38 L54K1
N7 [P0= toric radius; P1= tool centre – tool bit centre N39 G49I0
distance N40 G32
N8 P0=1.35,P1=1.5 N41 L=2
N9 [P2= XZ angular increment on minor radius; N42 FP37
P3=number of circles on 360 degrees N43 E1=G20X0Y-P6
N10 [P11= angular increment on major radius N44 E2=G13X0Y-P5J180
N11 P2=1,P3=4,P11=1 N45 E3=G20E1IP7
N12 [P4= circular pocket diameter; P5= pocket depth N46 E4=E2,G21I-P8,E3
N13 P4=34,P5=4 N47 E5=E3Q-P0
N14 [P6= centre on Z R=P7 ; P7= section circle radius N48 E6=E4I0
N15 P6=17,P7=15 N49 E7=G10E1,G11E6
N16 [P8= sphere joint radius N50 E8=E5,E7K2
N17 P8=4 N51 E9=E4Q-P0
N18 [P36= F in descent on Z ; P37= F profiling N52 P9=E7,2
N19 P36=4000,P37=4000 N53 P10=90-P9
N21 L2[ Spherical dome machining N54 [ P12= n. cuts on minor radius
N22 Z10R N55 P12=INT(P10/P2)
N23 M30 N56 P2=P10/P12
N24 L=1 N57 P13=90,P14=0
N25 P4=P4/2 N58 P12=P12-1
N26 P39=P4-(P0+P1+2) N59 L=51
N27 Z100R N60 P14=P13[ previous angle
N28 XP39Y0R N61 P13=P13-P2[ present angle
N29 Z3R N62 E10=G13E6JP14,E9
N30 Z-P5FP36 N63 E11=G13E6JP13,E9
N31 P40=P0+P1+.2 N64 P15=E10,1
N32 L=54 N125 E12=E17
N33 G49IP40 N126 L52KP21
N34 G41K2F2000 N127 G32

46 Programming Examples
S3000 – S4000 SERIES CNC

PROG43 Three-dimensional parametric flower


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

$2X-232.I238.Y-182.J118.K45.Q50.
N1 P1=0 [cutter radius
N2 P2=50 [number of cuts divided by 2
N3 P3=90/P2 [point variation
N4 P4=(200-90)/P2 [radius variation
N5 P5=60/P2 [increment on Z for each cut
N6 P77=360/6
N7 [
N8 G17
N9 O1 N33 Z100RM5
N10 T1 N34 M30
N11 F200S2500M3 N35 L=1
N12 Z100R N36 G41
N13 G49IP1 N37 E1=G20X-130Y30,G21I-P11,G20X-P13Y0
N14 X0Y0R N38 E2=G20X-P13Y0,G21I-P11,G20X-130Y-30
N15 Z-45R N39 E3=E1,G21I-3,E2
N16 P11=200 [start point radius N40 E4=G13X0Y0J180,E3
N17 P12=-50 [Z start point N41 E4
N18 P13=30 [X start point N42 E3
N19 P78=0 N43 L=5
N20 E4=G21X0Y0,G20X-130Y30 N44 E2
N21 P50=E4,3 N45 G21I10
N22 P51=ABSP50 N46 G20X0Y0IP51
N23 L=2 N47 P78=P78+P77
N24 ZP12 N48 G51JP78
N25 L1 N49 G21
N26 P11=P11-P4 [radius variation on back N50 E1
N27 P12=P12+P5 [Z variation N51 E3
N28 P13=P13+P3 [X dynamic N52 L5K5
N29 [ P51=P51+(P3/4) N53 G50
N30 {P12=0}L50 N54 E4
N31 {P12<0}L2 N55 G40
N32 L=50 N56 G32

Programming Examples 47
S3000 – S4000 SERIES CNC

PROG44 Elliptical die (CNC S4040GE/S4045/S4045P)


(CNC S4060D/S4040GE/S4045/S4045P)

$2X-317.I310.Y-200.J201.K45.Q30.
N1 [elliptical die with front and side section
N2 [at different radius
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 [
N9 P0=5 [ spherical milling tool set 0 on tool tip
N10 P1=408/2 [ major semi-axis
N11 P2=278/2 [ minor semi-axis
N12 P3=516.8 [ major semi-axis front radius
N13 P4=253 [ minor semi-axis side radius
N14 P5=-15 [ Z end in center die
N15 P6=3 [ pitch step
N16 P7=2 [ angular increment for the ellipses
N17 [ N33 P11=P11-P0+P5
N18 P3=P3-P0 N34 ZP11
N19 P4=P4-P0 N35 L=2
N20 E1=G20X0YP3I-P3 N36 P8=P10*COSP13
N21 E2=G20X0YP4I-P4 N37 P9=P20*SINP13
N22 L=1 N38 XP8YP9
N23 E3=G13XP1Y0J90 N39 P13=P13+P7
N24 E5=E3,E1 N40 {P13<=P14}L2
N25 P10=E5 N41 P1=P1-P6
N26 E6=G13X0YP11J180,E2 N42 {P1>=0}L1
N27 P20=E6 N43 Z150R
N28 P13=0 N44 M30
N29 P14=360
N30 Z150R
N31 XP10Y0R
N32 Z50R

48 Programming Examples
S3000 – S4000 SERIES CNC

PROG45 Elliptical punch (CNC S3040GE/S3045/S3045P)


(CNC S4060D/S4040GE/S4045/S4045P)

N1 $2X-277.I287.Y-196.J165.K45.Q30.
N2 [elliptical punch with front and lateral sections that
have different radiuses
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 P0=5 [spherical cutter radius
N9 P1=411.85/2 [major semi-axis
N10 P2=280.9/2 [minor semi-axis
N11 P50=514.8+P0 [major semi-axis front radius
N12 P51=251+P0 [minor semi-axis lateral radius
N13 E1=G20X0Y-514.8I-P50
N14 E2=G20X0Y-251I-P51
N15 G49IP0
N16 L=1
N17 E3=G13XP1Y0J-90 N28 G42
N18 E5=E3,E1 N29 L=2
N19 P10=E5 [P10=major semi-axis, P11=Z of ellipse N30 P8=P10*COSP3
profile N31 P9=P20*SINP3
N20 E6=G13X0YP11J180,E2 N32 XP8YP9
N21 P20=E6 [P20=minor semi-axis N33 P3=P3+P5
N22 P3=0,P4=360,P5=5 [initial angle, final angle and N34 {P3<=P4}L2
angular increment N35 G40
N23 Z100R N36 P1=P1-5 [cut decrement on major
N24 P60=P10+P0 semi-axis
N25 XP60Y0R N37 {P1>=0}L1
N26 Z10R N38 Z100R
N27 ZP11 N39 M30

Programming Examples 49
S3000 – S4000 SERIES CNC

PROG46 Handgrip punch (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-52.9I25.4Y-8.58J41.4K45.Q30.
N2 [Profile offset/rotation to create a handgrip for
motorcycles or bicycles
N3 [
N4 [male
N5 G17
N6 O1
N7 T1M6
N8 F1000S2000M3
N9 G49I2[diam. 4 spherical cutter zeroed at centre,
skim Z0 plane and set
N10 [AZZERA T1Z2, that is the cutter’s radius value
N11 [
N12 Z50R
N13 X-20Y0R
N14 Z5R
N15 P1=0 N29 M30
N16 P2=5[angular increment N30 L=10[profile
N17 L=1 N31 X-20Y0Z0R
N18 G751 ROTYP1 N32 G41K1
N19 L10 N33 E1=G20X-13Y0,G21I-300,G20X-9Y47
N20 P1=P1+P2 N34 E1
N21 G751 ROTYP1 N35 G21I3
N22 G754 N36 P5=118-56.5
N23 L10 N37 E2=G20X0Y-P5I-118
N24 G753 N38 E3=G13X-13Y0J90,G21I-4,E2
N25 P1=P1+P2 N39 E3
N26 { P1 <= 180 } L1 N40 E2
N27 G750 N41 G40X0Y65K1
N28 Z50R N42 G32

50 Programming Examples
S3000 – S4000 SERIES CNC

PROG47 Handgrip die (CNC S4045/S4045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-53.I25.3Y-19.4J30.6K45.Q30.
N2 [Profile offset/rotation to create a handgrip for motorcycles
and bicycles
N3 [
N4 [Female
N5 G17
N6 O1
N7 T1M6
N8 F1000S2000M3
N9 G49I2[diam. 4spherical cutter zeroed at centre,
N10 [skim Z0 plane and set
N11 [AZZERA T1Z2, that is the cutter’s radius value
N12 Z50R
N13 X0Y0R
N14 Z5R
N15 P1=0
N16 P2=5[angular increment N30 L=10[profile
N17 L=1 N31 X0Y0Z0R
N18 G751 ROTYP1 N32 G42K1
N19 L10 N33 E1=G20X-13Y0,G21I-300,G20X-
N20 P1=P1-P2 9Y47
N21 G751 ROTYP1 N34 E1
N22 G754 N35 G21I3
N23 L10 N36 P5=118-56.5
N24 G753 N37 E2=G20X0Y-P5I-118
N25 P1=P1-P2 N38 E3=G13X-13Y0J90,G21I-4,E2
N26 { P1 >= -180 } L1 N39 E3
N27 G750 N40 E2
N28 Z50R N41 G40X0Y50K1
N29 M30 N42 G32

Programming Examples 51
S3000 – S4000 SERIES CNC

PROG48 Profile programmed on XY and machined on


XZ (CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-139.I95.7Y-15.9J134.K30.Q30.
N2 [Profile programmed on XY and machined on XZ with
increment on Y
N3 G17
N4 O1
N5 T1M06 [spherical cutter zeroed at centre
N6 F1000S2000M3
N7 G49I10 [spherical cutter D.20
N8 Z100R
N9 X-50Y0R
N10 Z20R
N11 P1=0
N12 L=1
N13 G751 ROTX90 TRSZP1
N14 L10
N15 P1=P1-3[PASSO IN Y
N16 G751 ROTX90 TRSZP1
N17 G754
N18 L10
N19 G753
N20 P1=P1-3
N21 L1K20
N22 G750
N23 Z100R
N24 M30
N25 L=10
N26 X-40Y20Z0R
N27 G41K1
N28 G13Y0J0
N29 G21I20 N32 G13Y48J0
N30 G13X0J90 N33 G40X40Y68K1
N31 G21I-20 N34 G32

52 Programming Examples
S3000 – S4000 SERIES CNC

PROG49 Conical slot (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-77.7I78.8Y-63.3J36.7K45.Q30.
N2 [slot with taper ratio on radial lines
N3 G17
N4 O1
N5 T1M6
N6 F1200S2000M3
N7 P1=120 [total length of slot
N8 P2=32 [total width of slot
N9 P3=40 [total depth
N10 P4=1 [Z increment
N11 P5=8 [cutter radius
N12 P10=30 [taper ratio on radial lines
N13 [
N14 P1=P1/2
N15 P2=P2/2
N16 P1=P1-P5
N17 P2=P2-P5
N18 G49I0Q0 N34 G737 Q1
N19 Z100R N35 G42
N20 X0Y0R N36 G13Y0J180
N21 Z6R N37 G13X0Y0J-90
N22 G736IP4X0Y0K2 N38 G13Y-P3J180
N23 G42K2 N39 G40
N24 G13YP2J180 Q1 N40 G737 Q2
N25 G21IP2 Q2 N41 G42
N26 G13X-P1J-90 N42 G13Y0J180
N27 G21 N43 P90=90+P10
N28 G13Y-P2J0 Q1 N44 G13X0Y0J-P90
N29 G21 Q2 N45 G13Y-P3J180
N30 G13XP1J90 N46 G40
N31 G21 N47 G738
N32 G13YP2J180 Q1 N48 Z100R
N33 G40X0Y0K2 N49 M30

Programming Examples 53
S3000 – S4000 SERIES CNC

PROG50 Conical hole (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-42.5I74.9Y-9.02J66.K45.Q30.
N2 [Conical hole programme
N3 G17
N4 O1
N5 T1M6
N6 F1200S2000M3
N7 G49I5Q5 [input spherical or toric cutter radius
(G49I..J…Q…)
N8 [
N9 P1=50 [hole diameter
N10 P2=30 [total depth
N11 P3=1 [increment per cut
N12 P4=15 [taper ratio
N13 [
N14 P10=70 [X centre hole
N15 P11=30 [Y centre hole
N16 [
N17 G51XP10YP11
N18 P1=P1/2
N19 Z100R
N20 X0Y0R
N21 Z10R
N22 G736IP3X0Y0
N23 G42K2
N24 G20X0Y0IP1
N25 G40X0Y0K2
N26 G737
N27 G42
N28 G13Y0J180
N29 P4=90+P4 N33 G738
N30 G13X0Y0J-P4 N34 Z100R
N31 G13Y-P2J180 N35 G50
N32 G40 N36 M30

54 Programming Examples
S3000 – S4000 SERIES CNC

PROG51 Conical pin (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-82.6I152.Y-81.5J68.6K-45.Q30.
N2 [Conical cylinder programme
N3 G17
N4 O1
N5 T1M6
N6 F1200S2000M3
N7 G49I5Q5 [input spherical or toric cutter radius (G49I…J…Q…)
N8 [
N9 P1=20 [upper cylinder diameter
N10 P2=50 [total height
N11 P3=1 [increment per cut
N12 P4=15 [taper ratio
N13 [
N14 P10=70 [X centre cylinder
N15 P11=30 [Y centre cylinder
N16 [
N17 G51XP10YP11
N18 P1=P1/2
N19 P5=P1+20 [Initial positioning of X
N20 Z100R
N21 XP5Y0R
N22 Z10R
N23 G736IP3XP5Y0
N24 G42K2
N25 G20X0Y0IP1
N26 G40XP5Y0K2 N32 G13Y-P2J0
N27 G737 N33 G40
N28 G41 N34 G738
N29 G13Y0J0 N35 Z100R
N30 P4=90-P4 N36 G50
N31 G13X0Y0J-P4 N37 M3

Programming Examples 55
S3000 – S4000 SERIES CNC

PROG52 Columns (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-232.I237.Y-116.J184.K45.Q30.
N2 [Programme for 4 columns on a rectangle using
a spiral cutter
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F2000S4000M3
N8 G49I5 [input desired cutter radius
N9 P1=250 [side X of rectangle
N10 P2=170 [side Y of rectangle
N11 P3=50 [diameter of columns
N12 P4=30 [total column height
N13 P5=2 [depth increment
N14 [
N15 P10=P1/2
N16 P11=P2/2
N17 P3=P3/2
N18 G787 X-P10YP11 D1=2 D2=P1 D4=2 D5=P2
N19 L1
N20 G780
N21 Z100R
N22 M30
N23 L=1 N29 G41K2
N24 Z100R N30 G20X0Y0IP3
N25 X0Y0R N31 G40X0Y0K2
N26 Z10R N32 G734
N27 Z0 N33 Z100R
N28 G735IP5Z-P4 N34 G32

56 Programming Examples
S3000 – S4000 SERIES CNC

PROG53 Tub (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-200.I200.Y-131.J124.K45.Q30.
N2 [rectangular tub that has sides with different taper ratios
N3 G17
N4 O1
N5 T1M6
N6 F2000S3000M3
N7 G49I5Q5 [D.10 spherical cutter definition zeroed at centre
N8 [G49I16J6Q6 [32 diam. toric cutter definition, radius 6 inserts
N9 [zeroed at insert centre
N10 [G49I10J0Q0 [20 diam. cyclinder cutter definition
N11 [use desired radius correction to finish and rough
N12 [by eliminating comment from type of cutter chosen and inputting correct values
N15 P1=250 [side X of tub
N16 P2=150 [side Y of tub
N17 P3=10 [joint radius
N18 P4=40 [total depth
N19 P5=2 [cut increment
N21 P6=5 [upper tub radius
N22 P7=8 [lower tub radius
N24 P10=15 [right side taper ratio
N25 P20=5 [upper side taper ratio
N26 P30=15 [left side taper ratio
N27 P40=5 [lower side taper ratio
N29 P0=0 [ P0=0 finishing P0=1 roughing
N30 P50=0 [machining allowance
N31 P60=2 [P60=1 variable joints P60=2 constant joints
N33 Z100R
N34 P1=P1/2
N35 P2=P2/2
N36 P8=P1-40 [initial positioning on X
N37 XP8Y0R
N38 Z10R
N39 G736IP5XP8Y0JP50KP60 D0=P0
N40 G41K2

Programming Examples 57
S3000 – S4000 SERIES CNC

N41 G13XP1J90 Q1
N42 G21IP3
N43 G13YP2J180 Q2
N44 G21 Q3
N45 G13X-P1J-90
N46 G21
N47 G13Y-P2J0 Q4
N48 G21 Q1
N49 G13XP1J90
N50 G40XP8Y0K2
N51 G737 Q1
N52 G41
N53 G13Y0J0
N54 G21I-P6
N55 P10=90-P10
N56 G13X0Y0J-P10
N57 G21IP7
N58 G13Y-P4J0
N59 G40
N60 G737 Q2
N61 G41
N62 G13Y0J0
N63 G21I-P6
N64 P20=90-P20
N65 G13X0Y0J-P20
N66 G21IP7
N67 G13Y-P4J0
N68 G40
N69 G737 Q3
N70 G41
N71 G13Y0J0
N72 G21I-P6
N73 P30=90-P30
N74 G13X0Y0J-P30
N75 G21IP7
N76 G13Y-P4J0
N77 G40
N78 G737 Q4
N79 G41
N80 G13Y0J0
N81 G21I-P6
N82 P40=90-P40
N83 G13X0Y0J-P40
N84 G21IP7
N85 G13Y-P4J0
N86 G40
N87 G738
N88 Z100R
N89 M30

58 Programming Examples
S3000 – S4000 SERIES CNC

PROG54 Punch (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-200.I200.Y-131.J124.K45.Q30. N28 [
N2 [Rectangular punch with sides that have different N29 P50=0 [machining allowance
taper ratios N30 P60=2 [P60=1 variable jointsi
N3 G17 P60=2 constant joints
N4 O1 N31 [
N5 T1M6 N32 Z100R
N6 F2000S3000M3 N33 P1=P1/2
N7 [G49I5Q5 [diam. 10 spherical cutter definition N34 P2=P2/2
zeroed at centre N35 P8=P1+40 [initial positioning on X
N8 [G49I16J6Q6 [diam. 32 toric cutter, radius 6 N36 XP8Y0R
inserts N37 Z10R
N9 [zeroed at insert centre N38 G736IP5XP8Y0JP50KP60
N10 [G49I10J0Q0 [diam. 20 cylinder cutter definition N39 G41K2
N11 [use the desired radius correction to finish and N40 G13XP1J90 Q1
rough by eliminating the N41 G21IP3
N12 [comment from type of cutter chosen and N42 G13YP2J180 Q2
inputting the correct values N43 G21 Q3
N15 P1=250 [side X of punch N44 G13X-P1J-90
N16 P2=150 [side Y punch N45 G21
N17 P3=10 [joint radiuses N46 G13Y-P2J0 Q4
N18 P4=40 [total height N47 G21 Q1
N19 P5=1 [cut increment N48 G13XP1J90
N20 [ N49 G40XP8Y0K2
N21 P6=8 [upper punch radius N50 G737 Q1
N22 P7=5 [lower punch radius N51 G42
N23 [ N52 G13Y0J180
N24 P10=15 [right side taper ratio N53 G21IP6
N25 P20=5 [upper side taper ratio N54 P10=90+P10
N26 P30=15 [left side taper ratio N55 G13X0Y0J-P10
N27 P40=5 [lower side taper ratio N56 G21I-P7

Programming Examples 59
S3000 – S4000 SERIES CNC

N57 G13Y-P4J180
N58 G40
N59 G737 Q2
N60 G42
N61 G13Y0J180
N62 G21IP6
N63 P20=90+P20
N64 G13X0Y0J-P20
N65 G21I-P7
N66 G13Y-P4J180
N67 G40
N68 G737 Q3
N69 G42
N70 G13Y0J180
N71 G21IP6
N72 P30=90+P30
N73 G13X0Y0J-P30
N74 G21I-P7
N75 G13Y-P4J180
N76 G40
N77 G737 Q4
N78 G42
N79 G13Y0J180
N80 G21IP6
N81 P40=90+P40
N82 G13X0Y0J-P40
N83 G21I-P7
N84 G13Y-P4J180
N85 G40
N86 G738
N87 Z100R
N88 M30

60 Programming Examples
S3000 – S4000 SERIES CNC

PROG55 Concave sphere (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-77.8I78.7Y-57.4J42.6K45.Q30.
N2 [concave sphere
N3 G17
N4 O1
N5 T1M6
N6 F1200S3000M3
N7 G49I5Q5 [input spherical cutter radius
N8 Z100R
N9 P1=80 [sphere diameter
N10 P2=40 [total depth
N11 P3=1 [cut increment
N12 [
N13 P0=0 [P0=0 finishing P0=1 roughing
N14 P10=0 [machining allowance
N15 [
N16 P1=P1/2
N17 Z100R
N18 XP1Y0R
N19 Z10R
N20 G736IP3JP10D0=P0
N21 G42
N22 G20XP1Y0
N23 G20X0Y0IP1
N24 G20XP1Y0
N25 G40
N26 G737
N27 G42 N31 G40
N28 G13Y0J180 N32 G738
N29 G20X-P1Y0I-P1 N33 Z100R
N30 G13Y-P2J180 N34 M30

Programming Examples 61
S3000 – S4000 SERIES CNC

PROG56 Convex sphere (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-77.8I78.7Y-57.4J42.6K45.Q30.
N2 [Convex sphere
N3 G17
N4 O1
N5 T1M6
N6 F1200S3000M3
N7 G49I5Q5 [input spherical cutter radius
N8 Z100R
N9 P1=80 [sphere diameter
N10 P2=40 [total height
N11 P3=1 [cut increment
N12 [
N13 P10=0 [machining allowance
N14 [
N15 P1=P1/2
N16 Z100R
N17 X0Y0R
N18 Z10R
N19 G736IP3JP10
N20 G42
N21 G20X.01Y0
N22 G20X0Y0I.01
N23 G20X.01Y0
N24 G40
N25 G737
N26 G41 N30 G40
N27 G20X0Y0 N31 G738
N28 G20X0Y-P1I-P1 N32 Z100R
N29 G13Y-P2J0K2 N33 M30

62 Programming Examples
S3000 – S4000 SERIES CNC

PROG57 Toroid (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-137.I140.Y-90.5J87.K45.Q30.
N2 P1=160 [central diameter of ring
N3 P2=35 [toroid diameter
N4 P3=1 [pitch
N5 [
N6 G17
N7 O1
N8 T1M6
N9 F1200S2000M3
N10 G49I5Q5 [input spherical cutter radius
N11 Z100R
N12 P1=P1/2
N13 P2=P2/2
N14 XP1Y0R
N15 Z10R
N16 G736IP3
N17 G42
N18 G20XP1Y0
N19 G20X0Y0IP1
N20 G20XP1Y0
N21 G40
N22 G737
N23 G41
N24 G20X-P2Y0
N25 G20X0Y0IP2
N26 G20XP2Y0
N27 G40
N28 G738
N29 Z100R
N30 M30

Programming Examples 63
S3000 – S4000 SERIES CNC

PROG58 Conical polygon (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $1M0X-137.I140.Y-90.5J87.
N2 P1=8 [number of sides
N3 P2=10 [joint radius
N4 P3=75 [radius around figure
N5 [
N6 P20=0 [rotation angle of the figure
N7 [
N8 P4=20 [total height
N9 P5=2 [cut increment
N10 P6=15 [taper ratio
N11 [
N12 P10=0 [P10=0 finishing P10=1 roughing
N13 [
N14 G17 N31 G11YP11I
N15 O1 N32 G21IP2
N16 T1M6 N33 L1KP13
N17 F1500S2000M3 N34 G11YP11I
N18 G51JP20 N35 G75
N19 G49I5Q5 [input radius and type of cutter desired N36 G40XP12Y20K2
N20 Z100R N37 G737
N21 P11=360/P1 N38 G42
N22 P12=P3-30 [start point on X N39 G13Y0J180
N23 P13=P1-1 N40 P14=90+P6
N24 XP12Y20R N41 G13X0Y0J-P14
N25 Z10R N42 G13Y-P4J180
N26 G736IP5XP12Y20D0=P10 N43 G40
N27 G42K2 N44 G738
N28 G76 N45 Z100R
N29 G10XP3Y0 N46 G50
N30 L=1 N47 M30

64 Programming Examples
S3000 – S4000 SERIES CNC

PROG59 Section profile ellipse


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-165.I175.Y-106.J111.K30.Q30.
N2 [Section profile ellipse
N3 P1=120 [major semiaxis
N4 P2=80 [minor semiaxis
N5 P3=0 [initial angle
N6 P4=360 [final angle
N7 P5=5 [angular increment
N8 G49I5Q5
N9 Z100R
N10 XP1Y0R
N11 Z10R
N12 G736I2 [I=PITCH
N13 G42
N14 L=1
N15 P7=P1*COSP3
N16 P8=P2*SINP3
N17 XP7YP8
N18 P3=P3+P5
N19 {P3<=P4}L1
N20 G40
N21 G737
N22 G42
N23 G13Y0J180
N24 G21I5
N25 G13X0Y0J-110
N26 G21I-10
N27 G13Y-30J180
N28 G40
N29 G738
N30 Z100R
N31 M30

Programming Examples 65
S3000 – S4000 SERIES CNC

PROG60 Pocket with chafers on the walls


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-36.3I42.Y-25.7J24.3K45.Q30.
N2 [2 mm deep pocket with 45 degree chamfer
N3 [pocket dimensions 71x20
N4 [programme for 45° chamfer
N5 G17
N6 O1
N7 T1M6
N8 F1000S1200M3
N9 G49I0Q0 [input desired cutter radius
N10 Z100R
N11 X0Y0R
N12 Z10R
N13 G736I.1X0Y0K2
N14 G42K2
N15 G13Y-10J0
N16 G21I.5
N17 P1=71/2
N18 G13XP1J90
N19 G21
N20 G13Y10J180
N21 G21
N22 G13X-P1J-90
N23 G21
N24 G13Y-10J0
N25 G40X0Y0K2 N30 G13Y-1J180
N26 G737 N31 G40
N27 G42 N32 G738
N28 G13Y0J180 N33 Z100R
N29 G13X0Y0J-135 N34 M30

66 Programming Examples
S3000 – S4000 SERIES CNC

PROG61 Plane profile with double radius section


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-160.I182.Y-128.J90.5K30.Q30.
N2 [Plane profile with double radius profiled section
N3 G17
N4 O1
N5 T1M6
N6 F1200S1200M3
N7 G49I5Q5[ spherical cutter zeroed in centre
N8 Z100R
N9 X50Y0R
N10 Z10R
N11 G736X50Y0I3
N12 G41K2
N13 G13X127.5Y0J266.32K2
N14 G21I-69.58
N15 G13Y-189.48J180
N16 G21
N17 G13X-127.5Y0J93.68
N18 G20X0Y0I-127.5K2
N19 G13X127.5Y0J266.32
N20 G40X50Y0K2
N21 G737
N22 G42
N23 G20X0Y0
N24 G20X-18.8Y0I-18.8
N25 G21I3
N26 G20X-44.2Y-19.8I-25.4
N27 G13J180
N28 G40
N29 G738
N30 Z100R
N31 M30

Programming Examples 67
S3000 – S4000 SERIES CNC

PROG62 Double crowning profile


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-243.I227.Y-191.J109.K45.Q30.
N2 [Double crowning profile (R.300 on XZ and
R.500 on YZ)
N3 G17
N4 O1
N5 T1M6
N6 F1200S1200M3
N7 G49I5Q5 [Spherical cutter zeroed in centre
N8 Z100R
N9 X-200Y-100R
N10 Z2R
N11 G751ROTX90
N12 G736I5Q2
N13 G42
N14 G13X-200J-90
N15 G20X0Y-300I-300
N16 G13X200J90K2
N17 G40
N18 G737
N19 G42
N20 G13Y100J0
N21 G20X500Y0I500
N22 G13Y-100J0
N23 G40
N24 G738
N25 G750
N26 Z100R
N27 M30

68 Programming Examples
S3000 – S4000 SERIES CNC

PROG63 Open tub with 3 sectioned sides


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-191.I209.Y-140.J116.K45.Q30.
N2 [Programme for open tub with three sides that have different sections
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 [
N9 G49I0Q0 [input spherical cutter radius
N10 Z100R
N11 X-100Y-50R
N12 Z10R
N13 G736I1Q2K2
N14 G42
N15 G20X-100Y-50 Q2
N16 G13J90
N17 G21I-20
N18 G13Y60J0 Q1
N19 G21 Q2
N20 G13X100J-90
N21 G20X100Y-50
N22 G40
N23 G737 Q1
N24 G41 N33 G737 Q2
N25 G13Y0J0 N34 G41
N26 G13X0Y0J-85 N35 G13Y0J0
N27 G21I10 N36 G13X0Y0J-87.5
N28 G13Y-20J0 N37 G13Y-55J0
N29 G21I-15 N38 G40
N30 G13X40Y-20J-70 N39 G738
N31 G13Y-55J0 N40 Z100R
N32 G40 N41 M30

Programming Examples 69
S3000 – S4000 SERIES CNC

PROG64 – 4 sectioned three-dimensional punch


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-101.I134.Y-87.3J62.7K-45.Q30.
N2 [Solid defined as plane profile with 4 different sectioned profiles
N3 G17
N4 O1
N5 T1M6 N33 G40
N6 F1200S2500M3 N34 G737 Q2
N7 P1=60 [total piece height N35 G42
N8 G49I0Q0 N36 G13Y0J180
N9 Z100R N37 G13X0Y0J-90
N10 X-25Y0R N38 G13Y-P1J180
N11 Z10R N39 G40
N12 G736I2K2 N40 G737 Q3 [ K1
N13 G42 N41 G42
N14 G20X-25Y0 Q4 N42 G13Y0J180
N15 G13J90 N43 G21I5
N16 G21I-10 N44 G13X0Y0J-115
N17 G13Y60J0 Q3 N45 G21I-8
N18 G21 Q2 N46 G13Y-10X0J185
N19 G13X25J-90 N47 G21I12
N20 G21 Q1 N48 G20X69.6Y-70I130
N21 G13Y0J180 Q1 N49 G13Y-P1J180K2
N22 G13X0J-90 Q2 N50 G40
N23 G13Y-60J180 N51 G737 Q4
N24 G21 N52 G42
N25 G13X-25J90 Q4 N53 G13Y0J180
N26 G20X-25Y0 N54 G21I5
N27 G40 N55 G13X0Y0J-125
N28 G737 Q1 N56 G13Y-P1J180
N29 G42 N57 G40
N30 G13Y0J180 N58 G738
N31 G20X0Y-60I60 N59 Z100R
N32 G13Y-P1J180K2 N60 M30

70 Programming Examples
S3000 – S4000 SERIES CNC

PROG65 Sphere with 3 spherical ears


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-78.9I77.6Y-61.8J38.2K45.Q30.
N2 [Sphere with 3 spherical ears
N3 G17
N4 O1
N5 T1M6
N6 F1500S2000M3
N7 G49I0Q0
N8 Z100R N31 G40
N9 X50Y0R N32 G737 Q2 K1
N10 Z2R N33 G42
N11 G736I1 N34 G13Y0J180
N12 G42 N35 G20X-15Y0I-15
N13 G20X50Y0 Q1 N36 G13J180
N14 L=1 N37 G40
N15 G20X0Y0I50 Q1 N38 G738
N16 G21I-5 Q2 N39 G736I1
N17 G20X0Y50I15 N40 G42
N18 G21 N41 G20X50Y0
N19 G51J120I N42 G20X0Y0I50
N20 L1K2 N43 G20X50Y0
N21 G51J0 N44 G40
N22 G50 N45 G737
N23 G20X0Y0I50 Q1 N46 G42
N24 G20X50Y0 N47 G13Y-15J180
N25 G40 N48 G20X-50Y0I-50
N26 G737 Q1 N49 G13J180Y-49.99
N27 G42 N50 G40
N28 G13Y0J180 N51 G738
N29 G20X-50Y0I-50 N52 Z100R
N30 G13Y-15J180 N53 M30

Programming Examples 71
S3000 – S4000 SERIE CNC

PROG66 Solid defined by an open plane profile and


an XY machining section profile
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-152.I318.Y-135.J165.K45.Q30.
N2 G17
N3 O1
N4 T1M6 N30 G750
N5 F1200S1500M3 N31 Z100R
N6 [Programme to create a section on a profile seen on XZ N32 M30
N7 G49I5 [spherical cutter zeroed at centre N33 L=1
N8 Z100R N34 G41
N9 X-100Y-40R N35 G20X-30Y0Z0
N10 Z-30R N36 G13J75
N11 G711K31 N37 G21I-10
N12 L2 N38 G20X0Y-10I-40
N13 G710 N39 G21
N14 G721K31I5D0=2 N40 G13X30Y0J-75
N15 P0=0 N41 G20
N16 L=3 N42 G40
N17 P0=P0+1 N43 G32
N18 E1=E31KP0 N44 L=2
N19 P10=E1 N45 G41
N20 G751TRSXP10ZP11ROTX90ROTY90 N46 G20X-100Y-50
N21 L1 N47 G13J0
N22 P0=P0+1 N48 G21I30
N23 E1=E31KP0 N49 G13X80Y-30I-60J45
N24 P10=E1 N50 G20
N25 G751TRSXP10ZP11ROTX90ROTY90 N51 G21I80
N26 G754 N52 G13Y-50J0
N27 L1 N53 G20X250Y-50
N28 G753 N54 G40
N29 {P0<P99}L3 N55 G32

72 Programming Examples
S3000 – S4000 SERIES CNC

PROG67 Semicircular section solid defined by a profile on


XY and by a profile on XZ
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-136.I177.Y-98.5J101.K-45.Q30.
N2 [Programme to create a snake
N3 [that is a semicircular section tube layed out on a profile
N4 [section on XZ and a plane profile on XY
N5 G17
N6 O1
N7 T1M6
N8 F1200S2000M3
N9 G49I0 [Input spherical cutter radius
N10 Z200R
N11 X-100Y0R
N12 Z10R
N13 P50=100 [number of points
N14 G711K31
N15 L1 [profile on XZ
N16 G710
N17 G711K32
N18 L2 [profile on XY
N19 G710
N20 G721K31JP50 [J=number of points
N21 P9=P99-1
N22 G721K32JP50 [J=number of points
N23 P1=0
N24 L=4
N25 P1=P1+1
N26 E1=E31KP1
N27 E2=E32KP1
N28 P10=E1

Programming Examples 73
S3000 – S4000 SERIE CNC

N29 P20=E2
N30 P22=P22+90
N31 G751TRSXP10ZP11YP21ROTX90 ROT YP22 ROTX-P12
N32 L3 [section profile
N33 P1=P1+1
N34 E1=E31KP1
N35 E2=E32KP1
N36 P10=E1
N37 P20=E2
N38 P22=P22+90
N39 G751TRSXP10ZP11YP21ROTX90 ROTYP22 ROTX-P12
N40 G754
N41 L3
N42 G753
N43 {P1<=P9}L4
N44 M30
N45 L=1 [profile on XZ
N46 G41
N47 G20X-100Y0Z0
N48 G13J35
N49 G21I-50
N50 G13X50Y0J-30
N51 G21I50
N52 G13X150Y50J45
N53 G20X150Y50
N54 G40
N55 G32
N56 L=2 [profile on XY
N57 G41
N58 G20X-100Y0Z0
N59 G13J-15
N60 G21I50
N61 G20X100Y-130I-130
N62 G13J-15
N63 G13X150Y0J-90
N64 G40
N65 G32
N66 L=3 [section profile
N67 G41
N68 G20X-30Y0Z0
N69 G20X0Y0I30
N70 G20X30Y0
N71 G40
N72 G32

74 Programming Examples
S3000 – S4000 SERIES CNC

PROG68 Automobile tyre rim die


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-332.I294.Y-202.J198.K15.Q50.
N2 [Machining for an automobile tyre rim die
N3 G17
N4 O1
N5 T1M6
N6 F5000 S8000 M3
N7 G49I0Q0 [input desired spherical cutter radius
N8 [or toric cutter with G49I…J…Q…
N9 P1=2 [cut increment
N10 P10=0 [P10=0 finishing P10=1 roughing
N11 P2=0
N12 L=2
N13 L1 N30 G13X-124.57Y-117.53J-
N14 P2=P2+120 168.313
N15 G751ROTZP2 N31 G13J-150
N16 L2K2 N32 G21I8
N17 M30 N33 G20X0Y0I195.5
N18 L=1 N34 G40X0Y-120K2
N19 Z100R N35 G737
N20 X0Y-120R N36 [section profile
N21 Z5R N37 G41
N22 G736X0Y-120IP1 D0=P10 N38 G13Y0J0
N23 [plane profile N39 G21I-3
N24 G41K2 N40 G13X0Y-33J-45
N25 G20X0Y0I195.5 N41 G21I15
N26 G21I8 N42 G13Y-33J0
N27 G13X124.57Y-117.53J150 N43 G40
N28 G13J168.313 N44 G738
N29 G21I63.3 N45 G32

Programming Examples 75
S3000 – S4000 SERIE CNC

PROG69 Plane profile with 3 different sections that


repeat part of the profile
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-140.I141.Y-108.J72.4K15.Q30.
N2 [Plane profile with 3 different sections that repeat part of
the profile rotated at 90 degrees
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 G49I0Q0
N9 Z100R
N10 X0Y80R
N11 Z10R
N12 G736I2K2
N13 G42 N31 G20X-30Y0I-30
N14 G20X0Y80Q1 N32 G13J180
N15 L=1 N33 G40
N16 G13Y80J180Q1 N34 G737 Q2
N17 G13X-50J90Q2 N35 G42
N18 G13Y100J180Q3 N36 G13X0Y0J180
N19 G21I20 N37 G13J-90
N20 G13X-100J-90 N38 G13Y-30J180
N21 G13Y50J0Q2 N39 G40
N22 G51J90I N40 G737 Q3
N23 L1K3 N41 G42
N24 G13Y80J180Q1 N42 G13Y0X0J180
N25 G20X0Y80Q1 N43 G13X0Y0J-110
N26 G40 N44 G13Y-30J180
N27 G50 N45 G40
N28 G737 Q1 N46 G738
N29 G42 N47 Z100R
N30 G13Y0J180 N48 M30

76 Programming Examples
S3000 – S4000 SERIES CNC

PROG70 Die for Selbox push-buttons repeated on a


linear grid
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-191.I-34.4Y13.3J113.K45.Q30. N30 Z2R


N2 [Selbox push-button panel N31 G736X0Y0I.1
N3 [small slightly raised push-buttons with 1.5 diam. N32 G42K2
spherical cutter N33 G20X0Y0I7
N4 [realisation with plane-section profile, outer profile R N34 G40X0Y0K2
0.5 N35 G737
N5 G17 N36 G42
N6 O1 N37 G13Y0J180
N7 T1M6 N38 G21I.5
N8 F1000S1200M3 N39 G13X0J-90
N9 G49I0.75Q0.75 N40 G13Y-1J180 [height 1 mm
N10 Z100R N41 G40
N11 G787X-18Y111D1=3D2=18D4=3D5=18 N42 G738
N12 L1 N43 Z10R
N13 G780 N44 G32
N14 Z100R N45 L=2
N15 G787X-36Y183D1=5D2=18D4=2D5=-18 N46 Z10R
N16 {P99=6}L50 N47 X0Y0R
N17 {P99=10}L50 N48 Z2R
N18 L2 N49 G736X0Y0I.1K2
N19 L=50 N50 G42K2
N20 G780 N51 G13X0Y0I7J-90
N21 Z100R N52 G21I4.5
N22 G787X-28Y201D1=5D2=14 N53 G13J0
N23 L3 N54 G21
N24 G780 N55 G13J90
N25 Z100R N56 G21
N26 M30 N57 G13J180
N27 L=1 N58 G21
N28 Z10R N59 G13J-90
N29 X0Y0R N60 G40X0Y0K2

Programming Examples 77
S3000 – S4000 SERIE CNC

N61 G737
N62 G42
N63 G13Y0J180
N64 G21I.5
N65 G13X0J-90
N66 G13Y-1J180 [height1 mm
N67 G40
N68 G738
N69 Z10R
N70 G32
N71 L=3
N72 Z10R
N73 X0Y0R
N74 Z2R
N75 G736I.1X0Y0
N76 G42K2
N77 G13X-4J-90
N78 G20X0Y-3I4
N79 G13J90
N80 G20X0Y3I4
N81 G13J-90
N82 G40X0Y0K2
N83 G737
N84 G42
N85 G13Y0J180
N86 G21I.5
N87 G13X0J-90
N88 G13Y-1J180 [height 1 mm
N89 G40
N90 G738
N91 Z10R
N92 G32

78 Programming Examples
S3000 – S4000 SERIES CNC

PROG71 Punch for Selbox


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-127.I139.Y-89.2J80.8K45.Q30. N32 G737 Q2 K1


N2 [male N33 G41
N3 [three-dimensional part with variable sections N34 G13Y0J0
N4 F9000S1200M3 N35 G21I-24.12
N5 [use spherical cutter zeroed at radius centre N36 G13X0J-90
N6 [height 43.17-18.04 : Z0 is on the upper part N37 G13Y-P11J0
N7 P50=.5 [increment between cuts N38 G40
N8 P40=4 [cutter radius (max radius 4) N39 G738
N9 P11=43.17-18.04+P40 [total cyclinder head height N40 Z100R
N10 Z100R N41 X14.37Y-34.17R
N11 G49IP40QP40 [spherical cutter radius N42 P1=43.17-18.04+P40 [total height
N12 X-25.83Y34.17R N43 Z10R
N13 Z10R N44 G736IP50K2 Q2
N14 G736IP50K2 Q2 N45 G42
N15 G42 N46 G20X14.37Y-34.17
N16 G20X-25.83Y34.17 Q2 N47 G13J0
N17 G13J180 N48 P2=126.55-241.2
N18 G21I6.03 Q1 N49 G20XP2Y0I241.2K2
N19 P1=241.2 N50 G13Y34.17J180
N20 P2=241.2-138.77 [tail radius centre N51 G20X14.37Y34.17
N21 G20XP2Y0I241.2 Q1 N52 G40
N22 G21 N53 G737
N23 G13Y-34.17J0 Q2 N54 G41
N24 G20X-25.83Y-34.17 N55 G13Y0J0
N25 G40 N56 G21I-6.03
N26 G737 Q1 N57 G13X0J-90
N27 G41 N58 G13Y-P1J0
N28 G13Y0J0 N59 G40
N29 G13X0J-90 N60 G738
N30 G13Y-P11J0 N61 Z100R
N31 G40 N62 L=99

Programming Examples 79
S3000 – S4000 SERIE CNC

N63 P1=43.17-18.04 [total cylinder head height


N65 P77=P1
N66 [part with variable radiuses
N67 [G761Y-P77Q2
N68 G49IP40 [sperical cutter radius
N69 Z100R
N70 X14.37Y54.17R
N71 Z20R
N72 P1=6.03 [initial radius N123 P12=P12-90
N73 P2=24.12 [final radius N124 G751TRSXP10YP11ROTX90ROTYP12
N74 P3=80 [number of points N125 L61
N75 P4=(P1-P2)/P3 N126 G750
N76 P50=1 [ahead-return discriminator N127 P1=P1-P4
N77 G711K32 N128 L11KP9
N78 G41 N129 G750
N79 G20X14.37Y34.17 N130 [G760
N80 G13J180 N131 Z100R
N81 G20X-25.83Y34.17 N132 M30
N82 G40 N133 L=51
N83 G710 N134 P50<L52
N84 G721K32JP3D0=2 N135 G42
N85 P9=P99-1 N136 G20X0Y-P77Z0
N86 P0=0 N137 G13J90
N87 L=10 N138 G21IP1
N88 P0=P0+1 N139 G13Y0J180
N89 E1=E32KP0 N140 G40
N90 P10=E1 N141 P4<L53
N91 P12=P12-90 N142 L=52
N92 G751TRSXP10YP11ROTX90ROTYP12 N143 G41
N93 L51 N144 G13Y0X0J0Z0
N94 G750 N145 G21I-P1
N95 P1=P1-P4 N146 G13X0J-90
N96 L10KP9 N147 G20X0Y-P77
N97 [G760 N148 G40
N98 Z100R N149 L=53
N102 X14.37Y-54.17R N150 P50=-P50
N103 Z10R N151 G32
N104 P1=6.03 N152 L=61
N105 P2=24.12 N153 P50<L62
N106 P3=80 [number of points N154 G41
N107 P4=(P1-P2)/P3 N155 G20X0Y-P77Z0
N108 P50=1 [ahead-return discriminator N156 G13J90
N109 G711K32 N157 G21I-P1
N110 G41 N158 G13Y0J0
N111 G20X14.37Y-34.17 N159 G40
N112 G13J180 N160 P4<L63
N113 G20X-25.83Y-34.17 N161 L=62
N114 G40 N162 G42
N115 G710 N163 G13Y0X0J180Z0
N116 G721K32JP3D0=2 N164 G21IP1
N117 P9=P99-1 N165 G13X0J-90
N118 P0=0 N166 G20X0Y-P77
N119 L=11 N167 G40
N120 P0=P0+1 N168 L=63
N121 E1=E32KP0 N169 P50=-P50
N122 P10=E1 N170 G32

80 Programming Examples
S3000 – S4000 SERIES CNC

PROG72 Conical slots repeated on a linear grid


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $1M0X-234.I235.Y-146.J154.
N2 [Programme to repeat n. of conic or cylinder slots on a
linear grid
N3 [
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 G49I5Q5 N29 Z100R
N9 [ N30 X0Y0R
N10 P1=70 [total slot length on X N31 Z10R
N11 P2=25 [total slot width on Y N32 G736IP5X0Y0
N12 P3=18 [slot depth on Z N33 G41K2
N13 P4=8 [slot taper ratio N34 G13YP2J180
N14 P5=1 [cut increment N35 G20X-P1Y0IP2
N15 [ N36 G13J0
N16 P10=-180 [X first slot N37 G20XP1Y0IP2
N17 P11=-40 [Y first slot N38 G13J180
N18 P12=0 [singular slot inclination angle N39 G40X0Y0K2
N19 P13=5 [number of slots on X N40 G737
N20 P14=90 [distance of slots on X N41 G41
N21 P15=3 [number of slots on Y N42 G13Y0J0
N22 P16=40 [distance of slots on Y N43 G13X0Y0J-P4
N23 [ N44 G13Y-P3J0
N24 P2=P2/2 N45 G40
N25 P1=P1/2-P2 N46 G738
N26 P4=90-P4 N47 Z100R
N27 [ N48 G780
N28 G787 XP10YP11 D1=P13 D2=P14 D4=P15 D5=P16 N49 Z100R
D7=P12 N50 M30

Programming Examples 81
S3000 – S4000 SERIE CNC

PROG73 Grooved surface that links a radius to a


profile
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-687.I684.Y-458.J418.K45.Q30.
N2 [Grooved surface that links a radius to a profile
N3 G17
N4 O1
N5 T1M6
N6 F2000 S3000 M3
N7 G49I5Q5
N8 Z200R
N9 X600Y250R
N10 Z50R
N11 G726Z-600I5
N12 G41
N13 G20X-250Y0
N14 G13J0
N15 G21I-30
N16 G13X0Y-250J-80
N17 G20
N18 G40
N19 G727Z600
N20 G41
N21 G20X-250Y0
N22 G20X-250Y-250I-250
N23 G20X0Y-250
N24 G40
N25 G728ROTX90ROTY-90
N26 Z200R
N27 M30

82 Programming Examples
S3000 – S4000 SERIES CNC

PROG74 Grooved surface with delimiting profile


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-17.4I17.3Y-16.J6.18K45.Q30.
N2 [Grooved surface with delimiting profile
N3 G17
N4 O1
N5 T1M6
N6 F1000S2000M3
N7 G49I1.5Q1.5[input spherical cutter radius
N8 Z10R
N9 X-7Y-7R
N10 Z2R
N11 G726Z11I.25
N12 L1
N13 G727Z-11
N14 L1
N15 G34
N16 L2
N17 G35
N18 G728 ROTX90 ROTY90
N19 Z100R
N20 M30
N21 L=1
N22 G41 N34 G13J90
N23 G20X-10Y-6.45 N35 G21I3.36
N24 G13J0 N36 G13YP1J180
N25 G20X0Y0I11.22 N37 G21
N26 G13Y-6.45J0K2 N38 G13X-P1J-90
N27 G20X10Y-6.45 N39 G21
N28 G40 N40 G13Y-P1J0
N29 G32 N41 G21
N30 L=2 N42 G13XP1J90
N31 P1=18.96/2 N43 G20XP1Y0
N32 G41 N44 G40
N33 G20XP1Y0 N45 G32

Programming Examples 83
S3000 – S4000 SERIE CNC

PROG75 Surfaces defined by 3 grooves


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-248.I65.1Y-58.J142.K45.Q30.
N2 [3D surface created by the union of 3 grooved surfaces
N3 G17 N29 Z10R
N4 O1 N30 G726Z-157I2
N5 T1M6 N31 L3
N6 F1000S1200M3 N32 G727Z-230
N7 [machine with cutter radius equal to 0 N33 L3
N8 [modify profiles by inputting the quotes already calculated at N34 G728ROTX90
the desired cutter radius centre N35 Z100R
N9 [ N36 M30
N10 G49I0Q0 N37 L=1
N11 Z100R N38 G41
N12 X-38Y44R N39 G13Y0J0
N13 Z10R N40 G20X-10Y0I28
N14 G726Z-44I2 N41 G13J0
N15 L1 N42 G20X10Y0I28
N16 G727Z-117 N43 G13Y0J0K2
N17 L1 N44 G40
N18 G728ROTX90 N45 G32
N19 Z100R N46 L=3
N20 X-38Y117R N47 G41
N21 Z10R N48 G13Y0J0
N22 G726Z-117I2 N49 P1=55/2
N23 L1 N50 G20X-P1Y0I10
N24 G727Z-157 N51 G13J0
N25 L3 N52 G20XP1Y0I10
N26 G728ROTX90 N53 G13Y0J0K2
N27 Z100R N54 G40
N28 X-38Y157R N55 G32

84 Programming Examples
S3000 – S4000 SERIES CNC

PROG76 Chamfer on a tube


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-93.4I94.5Y-106.J13.7K45.Q30.
N2 [programme that creates a chamfer between a
concave surface (TUBO) and a hole
N3 [lengthwise on the Z axis
N5 [P0= spherical cutter radius
N6 [P1=external diameter of tube
N7 [P2= internal diameter of tube
N8 [P3= perpendicular hole diameter
N9 [P4= angle of chamfer positioned at 3 o’clock
N10 [P5= angular cut increment
N11 [
N12 P0=6, P1=200, P2=160, P3=120, P4=45,
P5=1
N13 [
N14 P1=P1/2
N15 P2=P2/2
N16 P3=P3/2
N17 {P1<=P2}L99
N18 E1=G20X0Y-P1IP1
N19 E2=G20X0Y-P1IP2
N20 E3=G13XP3Y0J90,E2K2
N21 E5=G10X0Y-P1,G11E3
N22 E8=G20X0Y-P1
N23 P10=90/P5 [number of cuts on 90°
N24 P11=P10-1 [number of repetitions
N25 P12=E5,2 [E5 angle
N26 P13=(90-P12)/P10
N27 G17
N28 O1
N29 T1
N30 F200S2500M3
N31 Z200R
N32 G49IP0QP0

Programming Examples 85
S3000 – S4000 SERIE CNC

N33 X0Y0R
N34 Z10R
N35 P70=0 [start point angle
N36 P14=P12
N37 L=1
N38 E9=G13E8JP14,E2K2
N39 P50=E9,2
N40 G751TRSZP50 ROTZP70 ROTX90
N41 L10
N42 P70=P70+P5
N43 P14=P14+P13
N44 E9=G13E8JP14,E2K2
N45 P50=E9,2
N46 G751 TRSZP50 ROTZP70 ROTX90
N47 G754
N48 L10
N49 G753
N50 P70=P70+P5
N51 P14=P14+P13
N52 L1KP11
N53 P70=180
N54 P14=90+(90-P12)
N55 L=3
N56 E9=G13E8JP14,E2K2
N57 P50=E9,2
N58 G751TRSZP50 ROTZP70 ROTX90
N59 L10
N60 P70=P70+P5
N61 P14=P14-P13
N62 E9=G13E8JP14,E2K2
N63 P50=E9,2
N64 G751 TRSZP50 ROTZP70 ROTX90
N65 G754
N66 L10
N67 G753
N68 P70=P70+P5
N69 P14=P14-P13
N70 L3KP11
N71 G750
N72 Z200RM5
N73 L=99
N74 M30
N75 L=10
N76 G41
N77 G20E3 Z0
N78 G13E3JP4
N79 G20E1K2
N80 G40
N81 G32

86 Programming Examples
S3000 – S4000 SERIES CNC

PROG77 Joint on a tube (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-75.1I81.7Y-58.5J41.7K45.Q40.
N2 [Programme to create a joint between two N26 X0Y0R
perpendicular holes N27 [
N3 [one concave hole arranged lengthwise on the N28 E1=G20X0Y0IP2
Y axis N29 E2=G13XP1Y0J90
N4 [and the perpendicular hole arranged N30 E3=E2,G21I-P3,E1 [joint
lengthways on Z axis N31 E4=E1I0
N5 [Machining of the holes must be carried out N32 E5=E3I0
previously N33 E6=G10E5,G11E4 [straight line
N6 [ N34 E8=G13E5J0,E3
N7 [P0= cut increment angle N35 P30=E6,2 [get E6 angle
N8 [Caution :90/P0 must obtain an equal number N36 P10=90/P0
N9 [P1= Vertical hole radius N37 P32=(P30-90)/P10 [angular increment
N10 [P2= radius of concave machining on Y N38 P20=0 [start point angle
N11 [P3= hole joint radius N39 P21=90 [quadrant
N12 [P4= spherical cutter radius zeroed at N40 P51=E5,2
sphere centre N41 P50=P51+(2*P4)
N13 [ N42 ZP50R
N14 P0=1 ,P1=50 ,P2=55 ,P3=12 ,P4=10 N43 ZP51
N15 [ N44 P8=P1-P4 [positioning on X
N16 P5=P1-P4 N45 XP8Y0[R
N17 {P5<=0}L80 N46 L=50
N18 {P1>=P2}L80 N47 P31=P30
N19 [ N48 L=2
N20 G17 N49 G751 ROTZP20 ROTX90
N21 O1 N50 L1
N22 T1 N51 P20=P20+P0 [rotation increment
N23 F200S2500M3 N52 {P20>=P21}L98
N24 Z200R N53 G751 ROTZP20 ROTX90
N25 G49IP4QP4 N54 G754

Programming Examples 87
S3000 – S4000 SERIE CNC

N55 P31=P31-P32
N56 L1
N57 G753
N58 P20=P20+P0 [rotation increment
N59 P31=P31-P32
N60 {P20<P21}L2
N61 L=98
N62 P21=P21+90
N63 L=3
N64 G751 ROTZP20 ROTX90
N65 L1
N66 P20=P20+P0 [rotation increment
N67 {P20>=P21}L99
N68 G751 ROTZP20 ROTX90
N69 G754
N70 P31=P31+P32
N71 L1
N72 G753
N73 P20=P20+P0 [rotation increment
N74 P31=P31+P32
N75 {P20<P21}L3
N76 L=99
N77 P21=P21+90
N78 L50K1
N79 G750
N80 Z200RM5
N81 L=80
N82 M30
N83 L=1
N84 G41
N85 E8Z0
N86 E3 [joint
N87 E7=E3,G13E5JP31K2
N88 E7 [stop point
N89 G40
N90 G32

88 Programming Examples
S3000 – S4000 SERIES CNC

PROG78 Semicircular channel on XZ


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-102.I196.Y-85.1J105.K-45.Q30.
N2 [Programme to carry out semicircular channel on XZ N32 G751ROTY-P2
N3 [the channel has a variable radius in the circular section N33 L1
N4 [the channel has a constant radius in the vertical section N34 P2=P2-P3
N5 [ N35 G751ROTY-P2
N6 G17 N36 G754
N7 O1 N37 L1
N8 T1 [spherical cutter zeroed at centre N38 G753
N9 F200S2500M3 N39 P2=P2-P3
N10 Z200R N40 L3K19
N11 G49I0Q0 N41 L=4
N12 X-10Y0R N42 G751TRS Z-P5
N13 Z100R N43 L1
N14 P1=25 [start point radius N44 P5=P5+P3
N15 P2=90 [start point angle N45 G751TRSZ-P5
N16 P3=1 [angle / cut distance N46 G754
N17 P4=(7.5/70)*P3 [radius decrement with each cut N47 L1
N18 P5=0 N48 G753
N19 L=2 N49 P5=P5+P3
N20 G751ROTY-P2 N50 L4K24
N21 L1 N51 G750
N22 P2=P2-P3 N52 X100Y0R
N23 P1=P1-P4 N53 Z200RM5
N24 G751ROTY-P2 N54 M30
N25 G754 N55 L=1
N26 L1 N56 G41
N27 G753 N57 G20X75YP1Z0
N28 P2=P2-P3 N58 G20X75Y0IP1
N29 P1=P1-P4 N59 G20X75Y-P1
N30 L2K24 N60 G40
N31 L=3 N61 G32

Programming Examples 89
S3000 – S4000 SERIE CNC

PROG79 Slots on a circumference with a spiral


cutter (CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-225.I245.Y-147.J153.K45.Q50.
N2 [Programme to create slots on a circumference
N3 [using a spiral cutter on Z
N4 G17
N5 O1
N6 T1M6
N7 F2000 S3000 M3
N8 G49I5 [Input desired cutter radius
N9 L=1
N10 P30=4 [number of slots
N11 P1=150 [circumference radius at slot centre
N12 P2=35 [slot width
N13 P3=-30 [slot start angle
N14 P4=30 [slot finsih angle
N15 P5=-20 [total slot depth on Z N30 G41
N16 P6=2 [cut increment on Z N31 G20XP10YP11IP2
N17 [ N32 P7=P1+P2
N18 E1=G20X0Y0IP1 N33 G20X0Y0IP7
N19 E2=G13X0Y0JP3,E1K2 N34 G20XP20YP21IP2
N20 E3=G13X0Y0JP4,E1K2 N35 P8=P1-P2
N21 P10=E2 N36 G20X0Y0I-P8
N22 P20=E3 N37 G20XP10YP11IP2
N23 P2=P2/2 N38 G20X0Y0IP7
N24 P40=360/P30 N39 G40
N25 Z100R N40 G734
N26 XP10YP11R N41 Z100R
N27 Z10R N42 G51JP40I
N28 Z0 N43 L1KP30
N29 G735IP6ZP5 N44 M30

90 Programming Examples
S3000 – S4000 SERIES CNC

PROG80 Spiral milled rectangle


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-156.I157.Y-102.J97.9K45.Q30.
N2 [Finishing of a rectangle using a spiral cutter
N3 G17
N4 O1
N5 T1M6
N6 F1200S2000M3
N7 G49I5
N8 Z100R
N9 P1=150 [side X rectangle
N10 P2=95 [side Y rectangle
N11 P3=12 [rectangle radiuses
N12 P4=30 [total depth
N13 P5=2 [cut increment
N14 [
N15 P1=P1/2
N16 P2=P2/2
N17 P6=P1-25 [initial positioning on X
N18 XP6Y0R
N19 Z10R
N20 Z0
N21 G735IP5Z-P4
N22 G41K2
N23 G13XP1J90
N24 G21IP3 N30 G21
N25 G13YP2J180 N31 G13XP1J90
N26 G21 N32 G40XP6Y0K2
N27 G13X-P1J-90 N33 G734
N28 G21 N34 Z100R
N29 G13Y-P2J0 N35 M30

Programming Examples 91
S3000 – S4000 SERIE CNC

PROG81 Cylinder head (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-337.I358.Y-169.J275.K45.Q30.
N2 [Programme to create a R 675 cylinder head
N3 [starting from a R 329 external diameter to achieve a R 254 N28 P1=P1+1
internal diameter N29 E1=E31KP1
N4 [ N30 P10=E1
N5 G17XYZ N31 E2=G13XP10Y0J-90
N6 F1000S12000M3 N32 E3=E2,E32
N7 P50=0[cutter radius N33 P20=E3
N8 P60=329 [external radius N34 XP10YP11ZP21
N9 P61=254 [internal radius N35 {P1<P99}L10
N10 P62=P60-P61 [total width of the circular crown N36 Z200R
N11 P63=5 [cut distance N37 P60=P60-P63
N12 P64=INT(P62/P63+.999) N38 L60KP64
N13 P63=P62/P64 N39 M30
N14 P64=P64-1 N40 L=7[ surface profile
N15 L=60 N41 G41
N16 G711K31IP50X-90Y0 N42 G13X-330J-90
N17 L5[profile to layout on the surface N43 G20X0Y675I675K2
N18 G710 N44 G13X330J90
N19 G721I5K31D0=2[I=distance between points N45 G40
N20 G711K32 N46 G32
N21 L7[surface profile N47 L=5 [ plane profile
N22 G710 N48 G41
N23 P1=0 N49 G20XP60Y0
N24 Z200R N50 G20X0Y0IP60
N25 X360Y0R N51 G20XP60Y0
N26 Z120R N52 G40
N27 L=10 N53 G32

92 Programming Examples
S3000 – S4000 SERIES CNC

PROG82 Layout of a profile on XY on a profile on XZ


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

$2X-94.7I93.3Y-53.5J66.6K45.Q30.
N1 G17XYZ
N2 [Programme to arrange any profile on any other profile N35 G20X36Y0
N3 F1000S12000M3 N36 G13X36J90
N4 P50=0[cutter radius N37 G21I10
N5 G711K31IP50X-90Y0 N38 G10X36Y20
N6 L5[profile to layout on surface N39 G11X19Y40
N7 G710 N40 G21
N8 G721I2K31D0=2[I=distance between points N41 G13J180
N9 G711K32 N42 G21I3
N10 L7[surface profile N43 G13X6J-90
N11 G710 N44 G20X0Y6I-6
N12 P1=0 N45 G13J90
N13 Z20R N46 G21
N14 X36Y0R N47 G13Y40J180
N15 Z2R N48 G21I10
N16 L=10 N49 G10X-19Y40
N17 P1=P1+1 N50 G11X-36Y20
N18 E1=E31KP1 N51 G21
N19 P10=E1 N52 G13J-90
N20 E2=G13XP10Y0J-90 N53 G21I3
N21 E3=E2,E32 N54 G20X-36Y0I-10
N22 P20=E3 N55 G21
N23 XP10YP11ZP21 N56 G10X-36Y-20
N24 {P1<P99}L10 N57 G11X-19Y-40
N25 M30 N58 G21
N26 L=7[ surface profile N59 G13J0
N27 G41 N60 G21
N28 G13X-55J-90Z0 N61 G10X19Y-40
N29 G20X0Y-60I-60 N62 G11X36Y-20
N30 G13X55J-90 N63 G21
N31 G40 N64 G13J90
N32 G32 N65 G20X36Y0
N33 L=5 [ plane profile N66 G40
N34 G41 N67 G32

Programming Examples 93
S3000 – S4000 SERIE CNC

PROG83 Union of two profiles by a 180° arch


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-90.5I97.3Y-59.7J60.3K45.Q50. N27 L=10


N2 [ N28 L9 [point calculation
N3 [Programme to unite two profiles (internal and N29 G751TRSXP5 TRSYP6 ROTZP24
external) with a 180 degree arch ROTX90
N4 [ N30 L5 [machining
N5 [Both profiles must be programmed clockwise N31 {P10>=P99}L11
N6 [The cutter must be spherical and zeroed N32 L9 [point caluclation
N7 [at the sphere’s centre N33 G751TRSXP5 TRSYP6 ROTZP24
N8 [ ROTX90
N9 P0=250 [number of divisions on profile = N34 G754 [inversion
number of cuts N35 L5
N10 P1=0 [spherical cutter radius, zeroed at radius N36 G753
centre N37 {P10<P99}L10
N11 [ N38 L=11
N12 G17 N39 G750
N13 O1 N40 Z200RM5
N14 T1 [spherical cutter, zeroed at centre N41 M30
N15 F200S2500M3 N42 L=9
N16 Z200R N43 P10=P10+1
N17 G49IP1QP1 N44 G721K32JP0D0=2
N18 X-60Y0R [X-60Y0 positioning for convex X- N45 E10=E32KP10
40Y0 for concave N46 P20=E10 [P20=X P21=Y P22=angle
N19 Z30R N47 G721K33JP0D0=2
N20 G711K32 [external profile N48 E20=E33KP10
N21 L1 N49 P25=E20 [P25=X P26=Y P27=angle
N22 G710 N50 E5=G10XP20YP21,G11XP25YP26
N23 G711K33 [internal profile N51 P24=E5,2 [angle of straight line
N24 L2 between two points
N25 G710 N52 E11=G20XP20YP21I-40
N26 P10=0 [point counter N53 E12=G20XP25YP26I40

94 Programming Examples
S3000 – S4000 SERIES CNC

N54 E13=E11,E12
N55 E14=E11,E12K2
N56 E15=G10E14,G11E13
N57 E16=E5,E15
N58 P5=E16 [P5=X P6=Y
N59 P11=(SQR((P25-P20)*(P25-P20)+(P21-
P26)*(P21-P26)))/2 [radius
N60 G32
N61 L=1 [external profile
N62 P60=-18
N63 *1=G20X0Y0I-50
N64 G41
N65 G20X-50Y0Z0
N66 L=70
N67 *1
N68 G21I-8
N69 G51JP60
N70 G20X-53Y0I10
N71 G21
N72 P60=P60-36
N73 L70K9
N74 G50
N75 *1
N76 G20X-50Y0
N77 G40
N78 G32
N79 L=2 [internal profile
N80 P61=-18
N81 *2=G20X0Y0I-20
N82 G41
N83 G20X-20Y0Z0
N84 L=71
N85 *2
N86 G21I2
N87 G51JP61
N88 G20X-16Y0I-6
N89 G21
N90 P61=P61-36
N91 L71K9
N92 G50
N93 *2
N94 G20X-20Y0
N95 G40
N96 G32
N97 L=5 [180 degree arch machining
N98 G41
N99 G13X0Y0Z0J0
N100 [I-P11 male IP11 female
N101 G20X0Y0I-P11
N102 G13X0Y0J0K2
N103 G40
N104 G32

Programming Examples 95
S3000 – S4000 SERIE CNC

PROG84 Union of two profiles by means of a third


profile
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-114.I121.Y-74.7J75.3K45.Q50. N27 L=10


N2 [ N28 L9 [point calculation
N3 [Programme to unite two profiles together N29 G751TRSXP5 TRSYP6 ROTZP24
(external and internal) by ROTX90
N4 [machining formed by a third profile N30 L5 [Machining
N5 [Both profiles must be programmed N31 {P10>=P99}L11
clockwise N32 L9 [point calculation
N6 [the cutter must be spherical and it must be N33 G751TRSXP5 TRSYP6 ROTZP24
zeroed at the sphere’s centre ROTX90
N8 [ N34 G754 [inversion
N9 P0=250 [number of profile divisions = N35 L5
number of cuts N36 G753
N10 P1=0 [spherical cutter radius, zeroed at N37 {P10<P99}L10
centre N38 L=11
N11 [ N39 G750
N12 G17 N40 Z200RM5
N13 O1 N41 M30
N14 T1 [spherical cutter zeroed at sphere N42 L=9
centre N43 P10=P10+1
N15 F200S2500M3 N44 G721K32JP0D0=2
N16 Z200R N45 E10=E32KP10
N17 G49IP1QP1 N46 P20=E10 [P20=X P21=Y P22=angle
N18 X-60Y0R [positioning N47 G721K33JP0D0=2
N19 Z30R N48 E20=E33KP10
N20 G711K32 [External profile N49 P25=E20 [P25=X P26=Y P27=angle
N21 L1 N50 E5=G10XP20YP21,G11XP25YP26
N22 G710 N51 P24=E5,2 [straight line angle between two
N23 G711K33 [Internal profile points
N24 L2 N52 E11=G20XP20YP21I-40
N25 G710 N53 E12=G20XP25YP26I40
N26 P10=0 [point counter N54 E13=E11,E12

96 Programming Examples
S3000 – S4000 SERIES CNC

N55 E14=E11,E12K2
N56 E15=G10E14,G11E13
N57 E16=E5,E15
N58 P5=E16 [P5=X P6=Y
N59 P11=(SQR((P25-P20)*(P25-P20)+(P21-
P26)*(P21-P26)))/2 [RADIUS
N60 G32
N61 L=1 [external profile
N62 P60=-18
N63 *1=G20X0Y0I-50
N64 G41
N65 G20X-50Y0Z0
N66 L=70
N67 *1
N68 G21I-8
N69 G51JP60
N70 G20X-53Y0I10
N71 G21
N72 P60=P60-36
N73 L70K9
N74 G50
N75 *1
N76 G20X-50Y0
N77 G40
N78 G32
N79 L=2 [internal profile
N80 P61=-18
N81 *2=G20X0Y0I-20
N82 G41
N83 G20X-20Y0Z0
N84 L=71
N85 *2
N86 G21I2
N87 G51JP61
N88 G20X-16Y0I-6
N89 G21
N90 P61=P61-36
N91 L71K9
N92 G50
N93 *2
N94 G20X-20Y0
N95 G40
N96 G32
N97 L=5 [180 degree arch machining
N98 G41
N99 G13X0Y0Z0J0
N100 G13X-P11J90
N101 P58=((P11*2)/3)/2
N102 P59=P11-P58
N103 G20X-P59YP11I-P58
N104 G20X0YP11IP58
N105 G20XP59YP11I-P58
N106 G13J-90
N107 G13X0Y0J0K2
N108 G40
N109 G32

Programming Examples 97
S3000 – S4000 SERIE CNC

PROG85 Six cams (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-17.6I21.6Y-11.5J13.6K25.Q30.
N2 [Programme that arranges a section profile on a profile
developed along a N34 L2
N3 [circumference (6 ups and downs) N35 G753
N4 [the cutter must be spherical and must be zeroed at the N36 P7=P7+P0
sphere’s centre N37 {P5<P99}L10
N6 [ N38 G750
N7 P0=1 [angle between cuts N39 Z200RM5
N8 G17 N40 M30
N9 O1 N41 L=1
N10 T1 N42 G41
N11 F200S2500M3 N43 G20X0Y0
N12 Z200R N44 G20X0Y-5I-5
N13 G49I4Q4 N45 P1=(14.5*2*3.1415927)/6
N14 X20Y0R N46 P2=P1/2
N15 G711K35 N47 P15=0
N16 L1 N48 L=20
N17 G710 N49 G51XP15
N18 P5=0 N50 G11XP2Y3I5
N19 P6=360/P0 N51 G20
N20 P7=0 N52 G11XP1Y-5I-5
N21 G721JP6K35 N53 G20
N22 L=10 N54 P15=P15+P1
N23 P5=P5+1 N55 L20K5
N24 E1=E35KP5 N56 G20XP1Y0
N25 P10=E1,2 N57 G40
N26 G751 ROTX90 ROTYP7 TRSYP10 N58 G32
N27 L2 N59 L=2
N28 P5=P5+1 N60 G42
N29 P7=P7+P0 N61 G20X12.6Y0Z0
N30 E1=E35KP5 N62 G13J180
N31 P10=E1,2 N63 G20X10.1Y0
N32 G751 ROTX90 ROTYP7 TRSYP10 N64 G40
N33 G754 N65 G32

98 Programming Examples
S3000 – S4000 SERIES CNC

PROG86 Three cams (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-149.I165.Y-105.J95.1K25.Q30.
N2 [Programme that arranges a profile section along a
circumference
N3 [
N4 [the cutter must be spherical and must be zeroed at the
sphere’s centre
N5 [
N6 P0=360 [number of cuts
N7 P8=P0-10
N8 P1=(65*2*3.1415927) [circumference length
N9 G17
N10 O1
N11 T1
N12 F2000S2500M3
N13 Z200R
N14 G49I0Q0
N15 X120Y0R
N16 G711K35
N17 L1
N18 G710
N19 P5=0
N20 P6=360/P0
N21 P7=0
N22 P9=0
N23 G721JP0K35
N24 [
N25 P5=P5+1
N26 E1=E35KP5
N27 P10=E1
N28 [P9=360/(P1/P10)
N29 L=10

Programming Examples 99
S3000 – S4000 SERIES CNC

N30 G751 ROTX90 ROTYP9


N31 L2
N32 P5=P5+1
N33 P7=P7+P6
N34 E1=E35KP5
N35 P10=E1
N36 {P10=0}L50
N37 P9=360/(P1/P10)
N38 G751 ROTX90 ROTYP9
N39 G754
N40 L2
N41 G753
N42 P5=P5+1
N43 P7=P7+P6
N44 E1=E35KP5
N45 P10=E1
N46 P9=360/(P1/P10)
N47 {P10<P1}L10
N48 L=50
N49 G750
N50 Z200RM5
N51 M30
N52 L=1
N53 P2=P1/3
N54 P3=0
N55 G41
N56 G20X0Y0Z0
N57 L=40
N58 G51XP3
N59 G13Y0J0
N60 G21I40
N61 G13X50Y0J20
N62 G21I-50
N63 G13Y25J0
N64 G21I-5
N65 G13XP2J-90
N66 P3=P3+P2
N67 L40K2
N68 G50
N69 G13Y0J0
N70 G20XP1Y0
N71 G40
N72 G32
N73 L=2
N74 G42
N75 G20X110Y-10Z0
N76 G13J180
N77 G13X95J90
N78 G21I1
N79 G13YP11J180
N80 G21
N81 G13X65J-90
N82 G13Y-10J180
N83 G20X50Y-10
N84 G40
N85 G32

100 Programming Examples


S3000 – S4000 SERIES CNC

PROG87 Programme to create a vacuum cleaner


nozzle (CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-248.I64.9Y-58.7J141.K45.Q30.
N2 [Programme to create a nozzle for a N29 L=10
vacuum cleaner N30 L9 [point calculation
N3 [ N31 G751 TRSYP21 ROTX90
N4 P0=50 [number of divisions on a profile = N32 L5 [machining
number of cuts N33 {P10>=P99}L20
N5 P1=8 [spherical cutter radius zeroed at N34 L9 [poiont calculation
centre sphere N35 G751 TRSYP21 ROTX90
N6 [ N36 G754 [inversion
N7 G17 N37 L5
N8 O1 N38 G753
N9 T1 [spherical cutter zeroed at centre sphere N39 {P10<P99}L10
N10 F200S2500M3 N40 L=20
N11 Z200R N41 X0Y30R
N12 G49IP1QP1 N42 [
N13 X0Y0R N43 P10=0 [point counter
N14 Z30R N44 P18=32
N15 G711K31 [profile A N45 P2=P0*2
N16 L1 N46 P57=(50-14)/P2
N17 G710 N47 L=11
N18 G711K32 [profile B N48 L9 [point calculation
N19 L2 N49 G751 TRSYP21 ROTX90
N20 G710 N50 L5 [machining
N21 G711K33 [profile C N51 {P10>=P99}L21
N22 L3 N52 L9 [point calculation
N23 G710 N53 G751 TRSYP21 ROTX90
N24 [ N54 P58=P58-P57
N25 P58=39.25 [inizial radius N55 G754 [inversion
N26 P10=0 [point counter N56 L5
N27 P18=31 N57 G753
N28 P2=P0 N58 P58=P58-P57

Programming Examples 101


S3000 – S4000 SERIES CNC

N59 {P10<P99}L11
N60 L=21
N61 X0Y30R
N62 [
N63 P10=0 [point counter
N64 P18=33
N65 P2=P0
N66 L=12
N67 L9 [point calculation
N68 G751 TRSYP21 ROTX90
N69 L5 [machining
N70 {P10>=P99}L22
N71 L9 [point calculation
N72 G751 TRSYP21 ROTX90
N73 G754 [inversion
N74 L5
N75 G753
N76 {P10<P99}L12
N77 L=22
N78 X0Y30R
N79 G750
N80 Z200RM5
N81 M30
N82 L=9
N83 P10=P10+1
N84 G721KP18JP2D0=2
N85 E10=EP18KP10
N86 P20=E10
N87 G32
N88 L=1 [profile A
N89 G41
N90 G20X-39.25Y0Z0
N91 G13J90
N92 G20X-39.25Y67.374
N93 G40
N94 G32
N95 L=2 [profile B
N96 G41
N97 G20X-39.25Y67.374Z0
N98 E3=G13X-39.25Y0J90 ,G21I90,
G20X7Y185I-90
N99 E3
N100 G20X7Y185I-90
N101 G20X-83Y185
N102 G40
N103 G32
N104 L=3 [profile C
N105 G41
N106 G20X-83Y185Z0
N107 G13J90
N108 G20X-83Y250 N115 G21IP58
N109 G40 N116 G13J0Y-P58
N110 G32 N117 G21IP58
N111 L=5 [machining N118 G13X-P20J90
N112 G41 N119 G13Y0J0
N113 G13Y0J0 Z0 N120 G40
N114 G13XP20J-90 N121 G32

102 Programming Examples


S3000 – S4000 SERIES CNC

PROG88 Small parametrical tubs repeated at angles


(CNC S3040GE/S3045/S3045P)
(CNC S4060D/S4040GE/S4045/S4045P)

N1 [profile with different sections created parametrically N32 E6=E10,E2K2


N2 [and repeated 6 times with an angular rotation N33 E7=E10,E1
N3 $2X-300Y-200I300J200K45Q45 N34 L5
N4 G17 N35 L1
N5 O1 N36 { P6 >= P18 } L10
N6 T1M6 N37 L=11
N7 F1000S2000M3 N38 ZP6
N8 G49I0 [do not modify N39 E10=G13X0YP6J0
N9 L=15 N40 E6=E10,E4
N10 [ P20, P21, P22, P23 = profile parameters N41 E7=E10,E1
N11 [P12,P32=profile joints N42 L5
N12 P12=12 N43 L1
N13 P30=30 N44 { P6 >= P19 } L11
N14 [P40=offset of straight lines N45 L=12
N15 P40=0 N46 ZP6
N16 [P10=tool radius N47 E10=G13X0YP6J0
N17 P10=10 N48 E6=E10,E4
N18 P5=1 N49 E7=E10,E3
N19 [P5=depth of cut N50 L5
N20 P6=P10 N51 L1
N21 [P6=Z of straight line N52 { P6 >= -36 } L12
N22 P20=207 N53 Z30R
N23 P21=140 N54 G51J60I
N24 P22=0 N55 L15K5
N25 P23=0 N56 M30
N26 L2[calulations N57 L=1
N27 Z25R N58 E20=G20X0Y0IP20
N28 L=10 N59 E21=G20X0Y0I-P21
N29 X160Y0R N60 E24=G13X0Y0J-30
N30 ZP6 N61 E24=E24Q30
N31 E10=G13X0YP6J0 N62 E26=E21,E24K2

Programming Examples 103


S3000 – S4000 SERIES CNC

N63 P34=E26
N64 E24=E24Q-7.5
N65 E26=E20,E24K2
N66 P32=E26
N67 E23=G10XP34YP35,G11XP32YP33
N68 E23=E23Q-P40
N69 E22=G10XP32Y-P33,G11XP34Y-P35
N70 E22=E22Q-P40
N71 G41K2
N72 E20
N73 G21IP12
N74 E22
N75 G21IP30
N76 E21
N77 G21IP30
N78 E23K2
N79 G21IP12
N80 E20
N81 G40X160Y0K2
N82 G32
N83 L=2
N84 E4=G13X140Y0J-85
N85 E4=E4Q10
N86 E5=G13X0Y0J0
N87 E5=E5QP10
N88 P11=P10+12
N89 E2=E5,G21I-P11,E4
N90 E3=G13X207Y0J60
N91 E3=E3QP10
N92 P15=P10+38.5
N93 E1=E3,G21I-P15,E5
N94 E16=E5,E4
N95 P16=E16
N96 E16=E3,E5
N97 P17=E16
N98 E18=E2,E4
N99 P18=E18,2
N100 E19=E3,E1
N101 P19=E19,2
N102 G32
N103 L=5
N104 P20=E7,1
N105 P21=E6,1
N106 P40=P16-P21
N107 P12=P40+12
N108 P30=P40+30
N109 P6=P6-P5
N110 G32

104 Programming Examples


S3000 – S4000 SERIES CNC

PROG89 Punch with operating field limitations


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 [punch with three spherical walls and one cylindrical wall


N2 [obtained with operating field limitations
N3 $2X-72.7I83.8Y-39.2J60.8K45.Q30.
N4 G17
N5 O1
N6 T1M6
N7 F5000S2000M3
N8 G761Y-35
N9 Z50R
N10 X0Y-90R
N11 G49I5Q5
N12 G736I1 [I= increment of cuts
N13 G42
N14 G20X0Y-90
N15 G13J0
N16 G13X23.15J90
N17 G20X0Y15.18I23.15
N18 G13J-90
N19 G13Y-90J0
N20 G20X0Y-90
N21 G40
N22 G737
N23 G42
N24 G20X5Y0
N25 G13J180
N26 G20X-23.15Y0I23.15
N27 G20X-23.15Y23.15
N28 G40
N29 G738
N30 Z50R
N31 M30

Programming Examples 105


S3000 – S4000 SERIES CNC

PROG90 Tube intersection (CNC S3045/S3045P)


(CNC S4060D/S4045/S4045P)

N1 $2X-42.9I35.6Y-29.6J20.5K45.Q30.
N2 [intersection of profiles with different sections to create
N3 [a tube rack tool
N4 G17
N5 O1
N6 T1M6
N7 F1200S2000M3
N8 G49I0Q0 [input desired spherical cutter radius
N9 Z100R
N10 X12Y0R
N11 Z10R
N12 G736I.5Q2
N13 G42
N14 G20X12Y0
N15 G13J180
N16 G20X-12.95Y0
N17 G40
N18 G737
N19 G41
N20 G20X-15.5Y0
N21 G20X0Y0I15.5
N22 G20X15.5Y0
N23 G40
N24 G738
N25 Z10R
N26 X-12.95Y0R
N27 G736I.5Q2
N28 G42
N29 G20X-12.95Y0
N30 G13J180
N31 G20X-25Y0

106 Programming Examples


S3000 – S4000 SERIES CNC

N32 G40
N33 G737
N34 G41
N35 G20X-13Y0
N36 G13X0Y0I13J-90
N37 G13J-30
N38 G13Y-13.2J0
N39 G13X0Y0I13J30
N40 G13J90
N41 G20X13Y0
N42 G40
N43 G738
N44 Z10R
N45 X0Y-25.6R
N46 G736I.5Q2
N47 G42
N48 G20Y-25.6X0
N49 G13J90
N50 G20Y-12X0
N51 G40
N52 G737
N53 G41
N54 G20X-9.5Y0
N55 G20X0Y0I9.5
N56 G20X9.5Y0
N57 G40
N58 G738
N59 Z10R
N60 X0Y14R
N61 G736I.5Q2
N62 G42
N63 G20Y14X0
N64 G13J90
N65 G20Y45X0
N66 G40
N67 G737
N68 G41
N69 G20X-5Y0
N70 G13J-87
N71 G20X0Y20I25K2
N72 G13X5Y0J87
N73 G20
N74 G40
N75 G738
N76 Z100R
N77 M30

Programming Examples 107


S3000 – S4000 SERIES CNC

PROG91 Three-dimensional push-button


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-15.I16.3Y-12.J7.98K45.Q30.
N2 [punch for a three-dimensional push-button
N3 G17
N4 O1
N5 T1M6
N6 F1000S2000M3
N7 G49I0Q0 [input spherical cutter radius zeroed at centre
N8 [skim the z0 plane and set at zero T1Z radius
N9 [ES G49I5Q5 diam 10 spherical cutter: zero: T1Z5
N10 Z100R
N11 X0Y0R
N12 Z10R
N13 G736I.5
N14 G42
N15 P1=22.5/2 [semiside X
N16 P2=P1-8 [circle centre
N17 G20XP1Y0
N18 G20XP2Y0I8
N19 G13J180
N20 G20X-P2Y0I8
N21 G13J0
N22 G20XP2Y0I8
N23 G20XP1Y0
N24 G40
N25 G737
N26 G41
N27 G20X-8Y0 N32 G20X0Y-4.6
N28 G20X-8Y-51I-51 N33 G40
N29 G21I-2 N34 G738
N30 G13X0Y-4.1J-75 N35 Z100R
N31 G13J-90 N36 M30

108 Programming Examples


S3000 – S4000 SERIES CNC

PROG92 Cogs
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-62.1I63.2Y-52.8J27.2K45.Q30.
N2 [grooved surfaces to create 6 cogs around a cyilinder
N3 G17
N4 O1
N5 T1M6
N6 F1000S2000M3
N7 G49I0Q0 [input desired cutter radius
N8 L=1
N9 Z100R
N10 P1=84/2
N11 P2=65/2
N12 X0YP1R N30 G42
N13 Z20R N31 G20X0YP1
N14 G726Z0I.3 [I=cut distance N32 G20X0Y0IP1
N15 G42 N33 G21I2
N16 G20X0YP1 N34 G13X-11.5J-90
N17 G20X0Y0IP1 N35 G21
N18 G21I1 N36 G20X0Y0I-P2
N19 G13X-3J-90 N37 G21
N20 G21 N38 G13X11.5J90
N21 P3=P1-6 N39 G21
N22 G20X0Y0I-P3 N40 G20X0Y0IP1
N23 G21 N41 G20X0YP1
N24 G13X3J90 N42 G40
N25 G21 N43 G728
N26 G20X0Y0IP1 N44 Z100R
N27 G20X0YP1 N45 G51J60I
N28 G40 N46 L1K5
N29 G727Z-24 N47 M30

Programming Examples 109


S3000 – S4000 SERIES CNC

PROG93 Tub with different depths


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-57.8I67.4Y-52.7J27.3K-45.Q30.
N2 [rectangular tub with two sections to obtain different
depths
N3 G17
N4 O1
N5 T1M6
N6 F2000S4000M13
N7 G49I5J.5 [diam 10 toric cutter input radius 0.5
N8 P1=35.19 [largest depth of piece
N9 P2=0.1 [start point z quote
N10 P10=0 [ P10=1 : roughing P10=0 : finishing
N11 P11=1 [cut depth
N12 L1
N13 Z100R
N14 M30
N15 L=1 N31 G13Y-P1J0
N16 Z30R N32 G40
N17 X33.56Y0R N33 G737 Q2 K1
N18 G736IP11X33.56Y0D0=P10D8=1 N34 G41
N19 G41K2 N35 G13X0YP2J0
N20 G13X48.27J90 Q1 N36 G13X0Y0J270.5
N21 G13Y25.14J180 Q1 N37 G13X4.93Y-17.09I2.01J-66
N22 G13X-48.27J-90 Q2 N38 G21I2.01
N23 G13Y-25.14J0 Q1 N39 G13X4.93Y-17.09I2.01J0
N24 G13X48.27J90 Q1 N40 G13X69.43Y-33.18I2.01J-75
N25 G40K2X33.56Y0 N41 G21I2.01
N26 G737 Q1 N42 G13Y-P1J0
N27 G41 N43 G40
N28 G13X0YP2J0 N44 G738X33.56Y0J.8
N29 G13X0Y0J270.5 N45 Z30R
N30 G21I2.01 N46 G32

110 Programming Examples


S3000 – S4000 SERIES CNC

PROG94 Hourglass
(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-156.I158.Y-111.J89.9K45.Q30.
N2 [revolution solid to create an hourglass
N3 G17
N4 O1
N5 T1M6
N6 F1000S1000M3
N7 Z100R
N8 X-160Y-40R
N9 Z10R
N10 G49I5 [diam. 10 spherical cutter radius zeroed at centre
N11 P1=0
N12 L=2
N13 G751ROTXP1
N14 L1
N15 P1=P1+5
N16 G751ROTXP1
N17 G754
N18 L1
N19 G753
N20 P1=P1+5
N21 {P1<=180}L2
N22 M30
N23 L=1
N24 X-160Y-40Z0
N25 G41 N31 G10X6.5Y-20
N26 G20X-156.5Y-52 N32 G11X141.5Y-52
N27 G13J0 N33 G13J0
N28 G10X-141.5Y-52 N34 G20X156.5Y-52
N29 G11X-6.5Y-20 N35 G40
N30 G13J0 N36 G32

Programming Examples 111


S3000 – S4000 SERIES CNC

PROG95 Parametric conical pocket


(CNC S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

$2X-157.I157.Y-104.J96.5K45.Q30. N29 [P55=y attachment point of circular


N1 [parametric conical pocket pocket
N2 [conical ( or cylindrical) pocket that is spherical N30 P1=110
at the top and bottom N31 P2=90
N3 G17 N32 P3=30
N4 O1 N33 P4=10
N5 T1M6 N34 P5=15
N6 F4000S12000M13 N35 P6=20
N7 [set in G49 : I=0 finishing with spherical cutter N36 P7=30.5
N8 [ I=insert centre radius for finishing with toric N37 P8=3
cutter N38 P9=.5
N9 [ I=cutter radius for roughing N39 P10=5
N10 G49I0 N40 P11=5
N11 [P1=major semiside N41 P51=0
N12 [P2=minor semiside N42 P52=0
N13 [P3=pocket joint radius N43 P53=0
N14 [P4=upper radius N44 P54=0
N15 [P5=lower radius N45 P55=50
N16 [P6=taper ratio >=0 0=cylindrical N46 G51XP51YP52JP53
N17 [P7=absolute value depth N47 XP54YP55R
N18 [P8=angular increment on upper radius N48 Z2R
N19 [P9=cut depth along the cone N49 [start calculations for upper radius
N20 [P10=angular increment on inferior radius N50 [calculate angle in relation to taper
N21 [P11=maching allowance on walls ratio'
N22 [when roughing define N51 P6=90-P6
P11=finishing machining allowance N52 [P16=number of repetitions rounded
N23 [finishing with spherical cutter P11=spherical off
cutter radius N53 P16=INT(P6/P8)+1
N24 [finishing with toric cutter P11= insert radius N54 [recalculate angular increment
N25 [P51=x centre pocket N55 P18=P6/P16
N26 [P52=y centre pocket N56 P16=P16-1
N27 [P53=pocket rotation angle N57 [P20 P21 centre radius position in
N28 [P54=x attachment point of circular pocket relation to corner

112 Programming Examples


S3000 – S4000 SERIES CNC

N58 P20=P4*TAN(P6/2)
N59 P21=-P4
N60 P22=0
N61 [P22= initial angle
N62 [P14=radius plus machining allowance
N63 P14=P4+P11
N64 [repetitive cycle
N65 L=99
N66 P22=P22+P18
N67 P30=P20-P14*SINP22
N68 P31=P21+P14*COSP22
N69 P40=P1+P30
N70 P41=P2+P30
N71 P42=P3+P30
N72 ZP31
N73 [recall contouring L1
N74 L1
N75 L99KP16
N76 [start calculations for taper ratio'
N77 [P22=length of conic section
N78 P22=P7/SINP6-P4*TAN(P6/2)-P5*TAN(P6/2)
N79 [P23=height of conic section
N80 P23=P22*SINP6
N81 [P16=number of repetitions rounded off
N82 P16=INT(P23/P9)+1
N83 [P19=recalculate depth of cut
N84 P19=P23/P16
N85 [P30=deviation in relation to taper ratio'
N86 P30=(P22/P16)*COSP6
N87 P16=P16-1
N88 L=98
N89 P31=P31-P19 N115 P30=P20-P14*COSP22
N90 P40=P40-P30 N116 P31=P21+P14*SINP22
N91 P41=P41-P30 N117 P40=P1-P30
N92 P42=P42-P30 N118 P41=P2-P30
N93 ZP31 N119 P42=P3-P30
N94 G42K2 N120 Z-P31
N95 [recall contouring L1 N121 [recall contouring L1
N96 L1 N122 L1
N97 L98KP16 N123 L97KP16
N98 [start calculation for lower radius N124 Z100RM5
N99 [P16=n. of repititions N125 M30
N100 P16=INT(P6/P10)+1 N126 L=1
N101 [recalculate angular increment N127 [pocket contouring
N102 P18=P6/P16 N128 (G21I-P42)
N103 P16=P16-1 N129 G42K2
N104 [P20 P21 position of lower centre radius N130 G13YP41J0
N105 [in relation to upper corner N131 *
N106 [P22=initial angle N132 G13XP40J-90
N107 P20=P7*TAN(90-P6)+P5*TAN(P6/2) N133 *
N108 P21=P7-P5 N134 G13Y-P41J180
N109 P22=90-P6 N135 *
N110 [P14=lower radius – machining allowance N136 G13X-P40J90
N111 P14=P5-P11 N137 *
N112 [repetitive cycle N138 G13YP41J0
N113 L=97 N139 G40XP54YP55K2
N114 P22=P22+P18 N140 G32

Programming Examples 113


S3000 – S4000 SERIES CNC

PROG96 Parametric conical punch


(CNC S3040/S3040GE/S3045/S3045P)
(CNC S4060D/S4040/S4040GE/S4045/S4045P)

N1 $2X-157.I157.Y-82.5J118.K45.Q30. N29 [P54=x attachment point of circular


N2 [PARAMETRIC CONICAL PUNCH pocket
N3 [conical (or cylindrical) punch that is spherical at the N30 [P55=y attachment point of circular
top and bottom pocket
N4 G17 N31 P1=100
N5 O1 N32 P2=90
N6 T1M6 N33 P3=20
N7 F4000S12000M13 N34 P4=10
N8 [set in G49: I=0 finishing with spherical cutter N35 P5=10
N9 [ I=insert centre radius for finishing with toric cutter N36 P6=15
N10 [ I=cutter radius for roughing N37 P7=50.5
N11 G49I0 N38 P8=5
N12 [P1=major semiside N39 P9=1
N13 [P2=minor semiside N40 P10=5
N14 [P3=puch joint radius N41 P11=0
N15 [P4=lower radius N42 P51=0
N16 [P5=upper radius N43 P52=0
N17 [P6=taper ratio >=0 0=cylindrical N44 P53=0
N18 [P7=absolute value height N45 P54=0
N19 [P8=angular increment on lower radius N46 P55=120
N20 [P9=cut depth along the cone N47 G51XP51YP52JP53
N21 [P10=angular increment on upper radius N48 XP54YP55R
N22 [P11=machining allowance on wall N49 Z2R
N23 [when roughing define P11=machining allowance N50 [start calculations for lower radius
for finishing N51 [calculate angle in relation to the
N24 [finishing with spherical cutter P11=spherical cutter taper ratio'
radius N52 P6=90-P6
N25 [finishing with toric cutter P11=insert radius N53 [P16=number of repetitions
N26 [P51=x punch centre rounded off
N27 [P52=y punch centre N54 P16=INT(P6/P8)+1
N28 [P53=punch rotation angle N55 [recalculate angular increment

114 Programming Examples


S3000 – S4000 SERIES CNC

N56 P18=P6/P16
N57 P16=P16-1
N58 [P20 P21 radius centre position in relation to corner
N59 P20=P4*TAN(P6/2)
N60 P21=-P4
N61 P22=0
N62 [P22= initial angle
N63 [P14=radius minus machining allowance
N64 P14=P4-P11
N65 [repetitive cycle
N66 L=99
N67 P22=P22+P18
N68 P30=P20-P14*SINP22
N69 P31=P21+P14*COSP22
N70 P40=P1+P30
N71 P41=P2+P30
N72 P42=P3+P30
N73 Z-P31
N74 [recall contouring L1
N75 L1
N76 L99KP16
N77 [start calculations for taper ratio'
N78 [P22=conical section length
N79 P22=P7/SINP6-P4*TAN(P6/2)-P5*TAN(P6/2)
N80 [P23=conical section height
N81 P23=P22*SINP6
N82 [P16=number of repetitions rounded off
N83 P16=INT(P23/P9)+1
N84 [P19=recalculate cut depth N113 [repetitive cycle
N85 P19=P23/P16 N114 L=97
N86 [P30=deviation in relation to taper ratio' N115 P22=P22+P18
N87 P30=(P22/P16)*COSP6 N116 P30=P20-P14*COSP22
N88 P16=P16-1 N117 P31=P21+P14*SINP22
N89 L=98 N118 P40=P1-P30
N90 P31=P31-P19 N119 P41=P2-P30
N91 P40=P40-P30 N120 P42=P3-P30
N92 P41=P41-P30 N121 ZP31
N93 P42=P42-P30 N122 [recall contouring L1
N94 Z-P31 N123 L1
N95 G42K2 N124 L97KP16
N96 [recall contouring L1 N125 Z100RM5
N97 L1 N126 M30
N98 L98KP16 N127 L=1
N99 [start calculations for upper radius N128 [pocket contouring
N100 [P16=n.of repetitions N129 (G21I-P42)
N101 P16=INT(P6/P10)+1 N130 G41K2
N102 [recalculate angular increment N131 G13YP41J0
N103 P18=P6/P16 N132 *
N104 P16=P16-1 N133 G13XP40J-90
N105 [P20 P21 lower radius centre position N134 *
N106 [in relation to upper corner N135 G13Y-P41J180
N107 [P22=initial angle N136 *
N108 P20=P7*TAN(90-P6)+P5*TAN(P6/2) N137 G13X-P40J90
N109 P21=P7-P5 N138 *
N110 P22=90-P6 N139 G13YP41J0
N111 [P14=lower radius + machining allowance N140 G40XP54YP55K2
N112 P14=P5+P11 N141 G32

Programming Examples 115


S3000 – S4000 SERIES CNC

PROG97 Grooved between 2 specular profiles


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-203.I110.Y-69.8J130.K45.Q30.
N2 [grooved surfaces achieved by uniting 2 specular profiles on Z
N3 G17
N4 O1
N5 T1M6
N6 F1200S2000M3
N7 G49I2Q2 [diam 4 sperical cutter zeroed at radius centre
N8 Z100R
N9 X-100Y0R
N10 Z10R
N11 G726I2Z0
N12 G41
N13 G20X-100Y0
N14 G20X-70Y0I-30
N15 G20X0Y0I40
N16 G20X70Y0I-30
N17 G20X100Y0
N18 G40
N19 G727Z-150
N20 G41
N21 G20X-100Y0
N22 G20X-70Y0I30
N23 G20X0Y0I-40
N24 G20X70Y0I30
N25 G20X100Y0
N26 G40
N27 G728ROTX90
N28 Z100R
N29 M30

116 Programming Examples


S3000 – S4000 SERIES CNC

PROG98 Parametric conical punch on a


circumference (CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-394.I389.Y-242.J258.K45.Q30.
N2 [repetition of parametrical punch on a circumference
N3 G17
N4 O1
N5 T1M6
N6 F1000S1000M3
N7 P50=0 [X circumference centre
N8 P51=0 [Y circumference centre
N9 P52=12 [number of figures
N10 P53=300 [circumference radius
N11 P54=10 [initial angle
N12 P55=1 [P55=1 figure rotates P55=0 figure does not rotate
N13 G797XP50YP51D1=P52D2=P53D3=P54D5=P55
N14 {P99=5}L3 [SKIP FIGURE N. 5
N15 {P99=8}L3 [SKIP FIGURE N. 8
N16 [
N17 L2 [recall machining
N18 L=3
N19 G780
N20 M30
N21 L=2
N22 L10 [ subprogram to initialise parameters
N23 P0=P0/2 [ transform diameter into cutter radius
N24 P1=P1/2 [ halve X axis dimensions
N25 P2=P2/2 [ halve Y axis dimensions
N26 P20=P1+P0+TANP7*P6+2 [ X quote for initial positioning
N27 Z100R
N28 XP20Y0R [ initial positioning
N29 P21=P5+2 [ safety quote

Programming Examples 117


S3000 – S4000 SERIES CNC

N30 ZP21R
N31 P22=INT(P6/P8+0.999) [ calculates number of cuts
N32 P8=P6/P22 [ if necessary reduces cut increment
N33 P22=P22-1 [ subtracts a cut in that the first
N34 [ is carried out previous to the recall
N35 P23=P8*TANP7 [ calculates shifting as a result of the taper ratio
N36 L=1
N37 P5=P5-P8 [ descent on Z
N38 ZP5
N39 P0=P0+P23 [ adds shifting to correct radius in relation to
N40 [ the taper ratio
N41 [
N42 [ Profile definition
N43 G49IP0
N44 G41K2
N45 G13XP1J270
N46 G21I-P3
N47 G13Y-P2J180
N48 G21
N49 G13X-P1J90
N50 G21
N51 G13YP2J0
N52 G21
N53 G13XP1J270
N54 G40K2XP20Y0
N55 [
N56 [ Profile end
N57 L1KP22
N58 Z100R
N59 G32
N60 L=10
N61 [
N62 [ initialise punch parameters
N63 [
N64 P0=10 [ cutter diameter
N65 P1=100 [x side
N66 P2=70 [ y side
N67 P3=15 [ joint radius
N68 P4=0 [ angle of single figure
N69 P5=0 [ initial Z quote
N70 P6=30 [ total depth quote
N71 P7=15 [ taper ratio
N72 P8=2 [ increment on Z
N73 G32

118 Programming Examples


S3000 – S4000 SERIES CNC

PROG99 Parametric conical punch on a grid


(CNC S3045/S3045P)
(CNC S4060D/S4045/S4045P)

N1 $2X-338.I445.Y-80.1J420.K45.Q30.
N2 [repetition of a parametric punch on a linear grid
N3 G17
N4 O1
N5 T1M6
N6 F1000S1000M3
N7 [
N8 [
N9 [ initialise grid parameters
N10 P9=0 [X quote for first figure
N11 P10=0 [Y quote for first figure
N12 P11=4 [ number of figures on X axis
N13 P12=150 [ pitch along X axis
N14 P13=0 [ angle on X axis
N15 P14=4 [ number of figures on Y axis
N16 P15=120 [ pitch along Y axis
N17 P16=90 [ angle on Y axis
N18 [
N19 [
N20 G787XP9YP10D1=P11D2=P12D3=P13D4=P14D5=P15D6=P16D7=P4
N21 {P99=7}L3 [skip figure N. 7
N22 {P99=11}L3 [skip figure N. 11
N23 {P99=13}L3 [skip figure N. 13
N24 L2
N25 L=3
N26 G780
N27 M30
N28 L=2
N29 L10 [ subprogram to initialise parameters
N30 P0=P0/2 [ transform diameter into cutter radius
N31 P1=P1/2 [ halve X axis dimensions

Programming Examples 119


S3000 – S4000 SERIES CNC

N32 P2=P2/2 [halve X axis dimensions


N33 P20=P1+P0+TANP7*P6+2 [X quote for initial positioning
N34 Z100R
N35 XP20Y0R [ initial positioning
N36 P21=P5+2 [ safety quote
N37 ZP21R
N38 P22=INT(P6/P8+0.999) [ calculates number of cuts
N39 P8=P6/P22 [ if necessary reduces cut increment
N40 P22=P22-1 [ subtracts a cut in that the first
N41 [ is carried out prior to the recall
N42 P23=P8*TANP7 [ calculates shifting for the taper ratio
N43 L=1
N44 P5=P5-P8 [ descent on Z
N45 ZP5
N46 P0=P0+P23 [ adds shifting to the correct radius in relation to
N47 [ the taper ratio
N48 [
N49 [ Profile definition
N50 G49IP0
N51 G41K2
N52 G13XP1J270
N53 G21I-P3
N54 G13Y-P2J180
N55 G21
N56 G13X-P1J90
N57 G21
N58 G13YP2J0
N59 G21
N60 G13XP1J270
N61 G40K2XP20Y0
N62 [
N63 [ Profile end
N64 L1KP22
N65 Z100R
N66 G32
N67 L=10
N68 [
N69 [ initialise punch parameters
N70 [
N71 P0=10 [ cutter diameter
N72 P1=100 [ x side
N73 P2=70 [ y side
N74 P3=15 [ joint radius
N75 P4=0 [ single figure angle
N76 P5=0 [ initial Z quote
N77 P6=30 [ total depth quote
N78 P7=15 [ taper ratio
N79 P8=2 [ increment on Z
N80 G32

120 Programming Examples

You might also like