Vous êtes sur la page 1sur 90

FANUC macroprogram programming

1. variable
general workpiece program appoints G code and ship distance with numerical value directly; for example,
GO1 and X100.0. When user macro is used, numerical value can be appointed directly or by variable.
When variable is used, variable value can be changed by program or operation in MDI panel.
#1 #2 100
G01 X# 1 F 300
illustration
variable expression
variable is permitted by computer, but user macro is not. Variable is appointed by variable number #
and latter variable number.
for example #1
expression can be used to appoint variable number. Here, expression must be closed in bracket.
for example #[#1+#2-12]
variable type
variable can be divided into four types according to variable number .
variable
number
#0
#1-#33

variable type function


dummy
variable
local
variable

#100-#199
#500-#999

common
variable

#1000

system
variable

the variable is always empty, no value is assigned to the


variable.
local variable is only used to store data in macroprogram, such
as operation outcome When power is cut, local variable is
initialized to empty. And when macroprogram is called,
independent variable assign local variable.
common variable has the same meaning in different macro
program. when power is cut, variable #100-#199 are initialized
to empty. Data of variable #500-#999 is stored even if power is
cut.
system variable is used to read and write transformation of all
kinds of data when CNC is running, such as tool current
position and compensation value.

variable value range


local variable and common variable can have value 0 or values as following shows:
-1047 to -10-29 or -10-2 to -1047
If output oversteps effective range, P/S warning NO.111 is issued.
decimal omission
when variable value is defined in program, decimal can be ignored.
for example When define #1 123 actual value of variable #1 is 123.000.
variable citation
to use variable value in program, variable number follows it after appointing. when using expression to
specify variable, put expression in bracket.
for example G01X[#1+#2]F#3;
cited variable value is rounded automatically according to minimum setting unit.
for example
when G00X# is executed as 1/ 1000mm , CNC assign 123456 to #1, and actual instruction value is
G00X12346.
to change the sign of cited variable, put negative sign before #.
for example G00X #1
when you cite undefined variable, variable and address are all ignored.

for example When value of variable #1 is 0 and value of #2 is empty, the executing outcome of
G00X#1 Y# 2 is G00X0.
common variable of double locus(double locus control)
for double locus control, system provides every locus individual macro variable. But, some common
variables can use two locus at one time according to the setting of parameter N0.6036 and 6037.
undefined variable
when variable value is undefined, this variable becomes empty variable. Variable #0 is always empty. And
it can not be written but only be read.
citation
when an undefined variable is cited, address itself is ignored.
when #1=< empty >
when#10
G90 X100 Y#1
G90 X100 Y#1
G90 X100
G90 X100 Y0
(b) operation
<empty> is the same with 0 except the condition that use <empty> to assign.
when #1=< empty >
when #10
#2#1
#2<>

#2#1
#20

#2#*5
#20

#2#*5
#20

#2#1+#1
#20

#2#1+#1
#20

(c) condition expression


in EQ and NE < empty > is differ from 0.
when #1=< empty >
when #10
#1EQ#0 true

#1EQ#0 false

#1 NE #0 true

#1 NE #0 false

#1 GE #0 true

#1 GE #0 false

#1 GT #0 false

#1 GT #0 false

limitation
program number, sequence number and optional segment jumping number can not use variable.
foe example variable can not be used in below conditions
0#1
/# 2G 00X100.0;
N#3Y200.0;
2. arithmetic and logic operation

the operations listed below can be executed in variable. expression at the right of operator can include
constant and variable composed with function or operator. Variable #j and #k can be assigned by constant.
the left variable can be assigned by expression.
function
definition
addition

format
#i=#j
#i=#j+#k;

subtraction

#i=#j-#k;

multiplication

#i=#j*#k;

division
sin

#i=#j/#k ;
#i=sin[#j;

arcsine

#i=asin[#j];

cos

#i=cos[#j];

arccosine

#i=acos[#j];

tangent

#i=tan[#j]

arc tangent
square root

#i=atan[#j]/[#k]
#i=SQRT[#j];

absolute value

#i=ABS[#j];

rounding

#i=ROUNG[#j];

up rounding

#i=FIX[#j];

down rounding

#i=FUP[#j];

natural logarithm

#i=LN[#j];

exponential
function
Or

#i=EXP[#j];

Xor

#i=#jXOR#k;

and
Change BCD to
BIN

#i=#jAND#k;

Change BIN to
BCD

#i=BCD[#j];

remark

angle is appointed with degree. 90o30' denote 90.5 degree.

#i=#jOR#k;
logic operation is executed one bit by one bit according to binary
number.

#i=BIN[#j];
used for handshaking with PMC.

illustration
angle unit
angle unit of function SIN ,COS,ASIN,ACOS,TAN and ATAN is degree, for example 90 30' denote 90.5
degree.
ARCSIN # i= ASIN[#j]

1 numeric area
when parameter NO.6004#0 NAT bit place is set to 0, 270 90
when parameter NO.6004#0 NAT bit place is set to 1, 90 90
2 when #j overstep the range of 1 to 1, P/S warning NO.111 is issued.
3 variable #j can be replaced by constant.
ARCCOS #iACOS[#j] numeric area is from 180 to 0 . When #j overstep the range of 1 to 1,
P/S warning NO.111 is issued. Variable #j can be replaced by constant.
3. program example
mill ellipse

locus

program code for ellipse


N10 G54 G90 G0 S1500 M03
N12 X0 Y0 Z20.
N14 G0 Z1
N16 G1 Z-5. F150.
N18 G41 D1
N20 #1=0
N22 #2=34
N24 #3=24
N26 #4=#2*COS[#1]
N28 #5=#3*SIN[#1]
N30 #10=#4*COS[45]-#5*SIN[45]
N32 #11=#4*SIN[45]+#5*COS[45]
N34 G1 X#10 Y#11
N36 #1=#1+1
N38 IF [#1 LT 370] GOTO26
N40 G40 G1 X0 Y0
N42 G0 Z100
N44 M30
mill rectangular channel

Code for milling rectangular channel


#102=0.
N3#100=0.
#101=0.
#103=200.
#104=400.
G91G28Z0.
G0G90G54X0.Y0.
G43H1Z20.
M3S2000.
N4G0X#100Y#101
G01Z#102F200.
#102=#102-2.
IF[#102EQ-50.]GOTO1
GOTO2
N2
N4X#104F500.
Y#103
X#100
Y#101
#100=#100+10.
#101=#101+10.
#103=#103-10.
#104=#104-10.
IF[#100EQ100.]GOTO3
GOTO4
N3
N1
M5
M9
G91G28Z0.
G28Y0.
M30

Mill surface inclining to 3 degree

locus

code for milling surface inclining to 3 degree


O0001
#[#1+1*2]=1
G65P9012L1A0B0.1C4I100J3K0
M30
macro O9012 code :
G54 G90 G00 X[#3] Y0 Z100
S500 M3

G01 Z0 F300
WHILE[#1LE10]DO1
#7= #1/TAN[#5]+#3
G1Z-#1 X#7
#8=#6/2-ROUND[#6/2]
IF[#8EQ0]GOTO10
G1Y0
GOTO20
N10 Y#4
N20#1=#1+#2
#6=#6+1
END1
G0
Z100
mill semisphere

locus

code for milling semisphere


G90G0G54X-10.Y0M3S4500
G43Z50.H1M8
#1=0.5
WHILE[#1LE50.]DO1
#2=50.-#1
#3=SQRT[2500.-[#2*#2]]
G1Z-#1F20
X-#3F500
G2I#3
#1=#1+0.5
END1
G0Z50.M5
M30
mill trumpet

code for milling trumpet


M03 S500
M06 T01
#1=0
#2=0
G0 Z15
X150 Y0
N11
#2=30*SIN[#1]
#3=30+30*[1-COS[#1]]
G01 Z-#2 F40
G41 X#3 D01
G03 I-#3
G40 G01 X150 Y0

#1=#1+1
IF [#1 LE 90] GOTO 11
G0 Z30
M30

Remote assistance can make students' computer be eyeable to teachers' computer, and the students'
can even be controled by teachers'.
1.Set teachsers' computer in server

2.Students' computer apply assistance to teachers' computer

3.Teachers' computer accept application of students' computer, and start remote assistance.So it
can observe and control students' computer

Swan has published software accessory tool(SGD)-- visualized NC code debug tool
SWANSC G-code debug tool.
SWANSC G-code debug tool (for short SGD) is issued by Swan NC simulation software recently. It is a
simple and effective built-in tool which can call simulation NC code intuitionisticly, simplely and rapidly.
SGD help you call G code rapidly and correctly and check format of each command intuitionisticly. With
SGD you can even check every G code and check every corresponding locus in the condition of a
visualized three-dimensional graphics.
SGD support kernel code of many NC systems such as FANUC SIEMENS HUAZHONG NC
MITSUBISHI.
Example SINUMERIK 802DM

FANUC0iT

HNC21 macro programming


HNC -21M NC system equips powerful macro function similar with high language.
Consumer can use variable to do arithmetic operation, logical operation and functional hybrid operation.
Moreover, macro provides loop statement, branch statement and subprogram calling statement to make
program editing of complex components easy, and reduce , even avoid, cockamamie numerical
evaluation.
1. macro variables and constant
(1) macro variables
#0#49 current local variable
#50 #199 global variable
#200 #249 0 layer local variable
#250 #299 1 layer local variable
#300 #349 2 layer local variable
#350 #399 3 layer local variable
#400 #449 4 layer local variable
#450 #499 5 layer local variable
#500 #549 6 layer local variable
#550 #599 7 layer local variable
#600 #699 register of tool length H0 H99
#700 #799 register of tool radius D0 D99
#800 #899 register of cutting life
(2) constant
PI
TRUE condition true (T)
FALSE condition false (F)
2. operator and expression
(1) arithmetical operator + - * /
(2) conditional operator
EQ = NE GT
GE LT LE
(3) logical operator
AND OR NOT
(4) function
SIN COS TAN ATAN ATAN2
ABS INT SIGN SQRT EXP
(5) expression
Constant s and macro variables linked by operators compose expression.
For example 175/SQRT[2] * COS[55 * PI/180 ]
#3*6 GT 14
3. assignment statement
Format macro variables = constant or expression
Sending values of constant or expression to a macro variable is called assignment .

For example #2 = 175/SQRT[2] * COS[55 * PI/180 ]


#3 = 124.0
conditional judgment statement IF ELSE ENDIF
Format (i) IF conditional expression

ELSE

ENDIF
Format (ii) IF conditional expression

ENDIF

4. loop statement WHILE ENDW


Format WIIILE conditional expression

ENDW
Using of conditional judgment statement see also example of macro programming
Using of loop statement see also example of macro programming
5. example

locus

program code
%0010
#10=10.0
#11=10.0
#12=124.0
#13=124.0
#101=8.0
#102=6.5
#103=6.0
N01 G92 X0.0 Y0.0 Z10.0
#0=0
N06 G00 X[-#12] Y[-#13]
N07 G01 Z[-#10] M03 S600 F200
WHILE #0 LT 3
N[08+#0*6] G01 G42 X[-#12/2] Y[-90/2] F280.0 D[#0+50]
N[09+#0*6] X[0] Y[-90/2]
N[10+#0*6] G03 J[90/2]
N[11+#0*6] G01 X[#12/2] Y[-90/2]
N[12+#0*6] G40 X[#12] Y[-#13]
N[13+#0*6] G00 X[-#12] Y[-#13]
#0=#0+1
ENDW
N100 Z[-#10-#11]
#2=90/SQRT[2]*COS[55*PI/180]
#3=90/SQRT[2]*SIN[55*PI/180]
#4=90*COS[10*PI/180]
#5=90*SIN[10*PI/180]
#0=0
WHILE #0 LT 3
N[101+#0*8]G01 G42 X[-#12/2] Y[-90/2] F280.0 D[#0+50]
N[102+#0*8]X[-#2] Y[-#3]
N[103+#0*8]G91 X[+#4] Y[+#5]
N[104+#0*8]X[-#5] Y[+#4]

N[105+#0*8]X[-#4] Y[-#5]
N[106+#0*8]X[+#5] Y[-#4]
N[107+#0*8] G90 X[#12/2] Y[-90/2]
N[108+#0*8]G00 G40 X[-#12] Y[-#13]
#0=#0+1
ENDW
G00 X0 Y0 M05 M30

Horizontal and vertical auto-toochange systems switching

SINUMERIK parameter programming


1. counting parameter R
(1).function
In order to use a NC program not only for just once machining applying a specified value or must work
out a value, counting parameter can be used.
you can compute or set the value you need by controller when program is running;
parameter value can be set through panel. If parameters are assigned, they can assign address specified by
variable.
(2).programming
R0=...
to
R249=...
(3).illustration
aggregately 250 counting parameters can be used
R0...R99 use freely
R100...R249 -pass parameter of machining cycle
If machining cycle is not used, these counting parameters of this part can be used freely.
(4).assignment
xample 1
R0=3.5678 R1=-37.3 R2=2 R3=-7 R4=-45678.1234
You can assign a bigger range using exponential notation
10 300...10 300 .
exponential quantity is after EX maximum symbolic number 10 including symbol and decimal
.
EX value range 300 300
Example 2
R0=-0.1EX-5 meaning R0=-0.000 0001
R1=1.874EX8 meaning R1=187 400 000
notation There can be more than one assignment statement in a program segment; Also you can assign
by computation expression.
(5). Assignment for other address
commonality of NC program can be increased by other NC address assignment computing or parameter
expression. You can assign any NC address with numerical value, arithmetic expression or R parameter
except address N, G and L.
When assigning writes in symbol after address character.
assignment statement can assign negative sign.
When assigning coordinate axis address running command , there must be an undependent program
segment .
example
N 10 G 0 X=R2 assign X axis
(6). parametric computing
follow digital operation rule when counting parameter. Operation in former bracket is precedence. In
addition, multiplication and division take precedence of addition and subtraction.
2. marker program jumping aim
(1).function
1 marker is used mark object program segment jumping to, and the jumping function can make

program run branch.


2 marker can be selected freely, but it must be composed with one letter or number and the first two
symbol must be letter or underline.
3) colon must be after marker of object program segment jumping to. The marker is in the front of
program segment. If program has paragraph number, marker follows paragraph number to heel.
4)marker can not have other meaning in a program segment.
(2).program example
N10 MARKE1:G1 X20 MARKE1 is marker, object program segment jumping to
...
TR789:G0 X10 Z20 TR789 is marker, object program segment jumping to has no paragraph number
3. absolute jumping
(1).function
When NC program is running, program segment is executed according to sequence of writing in.
When program is running, change executing sequence by inserting skip instruction
jumping aim only can be program segment with marker. The program segment must lie in this program.
absolute skip instruction must occupy an undependent program segment.
(2).programming
GOTOF Lable Forwards jumping
GOTOB Lable Backwards jumping
AWL illustration
GOTOF Forwards jumping
GOTOB Backwards jumping
Lable Selected marker
4. conditional jumping
(1).function
Conditional jumping can be denoted with IF- conditional statement. If jumping condition is satisfied,
jump. Jumping aim must be program segment with marker. The program segment must lie in this
program.
Conditional jumping instruction must occupy an undependent program segment. There are several
Conditional jumping instructions in one program segment.
(2).programming
IF condition GOTOF Lable Forwards jumping
IF condition GOTOB Lable Backwards jumping
AWL

Illustration

GOTOF

Forwards jumping

GOTOB

Backwards jumping

Lable

Selected marker

IF

Conditional lay in symbol for jumping

condition

Counting parameter as condition, computation expression

(3). comparison operation

operator

meaning

==

equal to

unequal

greater than

smaller than

greater than or equal to

smaller than or equal to

These comparison operations denote jumping condition. Computation expression can be used for
comparison operation.
There are two outcomes of comparison operation: one is satisfaction, the other is dissatisfaction.
When it is dissatisfaction, the end value of operation is 0.
(4).comparison operation programming example
R1 1 R1 greater than 1
1 R1 1 smaller than R1
R1 R2+R3 R1 smaller than R2 adding R3
R6 =SIN(R7*R7) R6 greater than or equal to SIN(R7)2
5. program jumping example

L1( semisphere ):

L2( ellipse ):

Effect drawing :

code
G54X0Y0Z10F100M03S100
R10=-15 R11=-9.06
L1
R10=15 R11=-9.06
L1
R10=0
L2
Code of subprogram L1 :
G0 X=R10+12.5-4 Y=R11
G1 Z-6 F100
G3 I=4-12.5
G1 X=R10+8 Y=R11
G41 D1 X=R10+4 Y=R11
G2 I-4
G0 Z5
R1=4
R2=90
AAA:
R3=R1*COS(R2)+4+R10
R4=R1*SIN(R2)-R1
G0 X=R3 Y=R11
G1 Z=R4 F300
G2 I=R10-R3
G0 Z1
R2=R2-1
IF R2>=0 GOTOB AAA
G0 Z10
M17
Code of subprogram L2 :
R1=35
R2=15
R3=0
G0 X=R1+R10 Y=R11
G1 Z-5 F100
AAA:
R4=R1*COS(R3)+R10
R5=R2*SIN(R3)+R11
G1 X=R4 Y=R5 F100
R3=R3+1
IF R3<=360 GOTOB AAA
G0 Z5
M17
6. subprogram
(1). application
in principle there is no difference between main program and subprogram
Use subprogram to program often repeated machining, such as a certain figure. One form that subprogram
is in main program is machining cycle including generally universal working procedure such as thread
cutting. Many concrete machining is realized through specified counting parameter assigning.

(2). structure
The structure of subprogram is the same with main program's, and subprogram is stopped by M 2 in the
last segment. main program return after subprogram end.
(3). end of program
You can end subprogram by using RET besides M2.
When use RET to end subprogram or return main program G64 continuous path mode is not interrupted,
while using M2 will interrupt G64 and come into halt state.

(4). subprogram name


to select a subprogram expediently, you must give a name to the subprogram. Program name can be
choosed freely but accord with:
initial two symbols must be letters
Other symbols are letters, number or underline
at best 8 symbols
no separator
The means is the same with program name choosing in main program.
(5). subprogram call
you can use program name to call subprogram in one program(main program or sunprogram).
subprogram calling must occupy an undependent program segment.
Example
N 10 L 785 P3 call subprogram L785
N20 WELLE7 call subprogram WELLE7
(6).repeated call of program
If you want to continuously run a subprogram time and time, you must write calling times in address P
after program name of called subprogram, and the maximum times is 9999(P1...P9999)
example:
N 10 L 785 P3 call L785 ,run 3 times
(7). Depth of nesting
Subprogram can be called not only in main program but also in other programs, and the procedure is
called subprogram nesting. Subprogram nesting depth can be three level, that is to say four grades
program interface(including main program interface).
notation: when you use machining cycle to process, please take the attention that machining cycle also
belongs to four grades program interface.
(8). illustration
Take attention to parameter R too, and please do not change counting parameter of lower lever program
interface by using the used counting parameter in higher lever program interface .

SINUMERIK802D T
SINUMERIK802D T

FIRST SHENYANG SIEMENS802DT panel

ANYANG XINSHENG SIEMENS802DT panel

GREATWALL operation panel

FAGOR8055M

FAGOR8055T

FANUC0i-T
BEIJING-FANUC Series 0i Mate-TB

BEIJING-FANUC Series 0i Mate-TC

All FANUC0i T panels


FANUC 0i-T standard panel
NANJING MAISHUN FANUC 0i Mate-TC panel

NANJING FANUC 0i MATE-TB panel


YUNNAN FANUC 0i Mate panel
SECOND NANJING Fanuc 0i Mate panel
JINAN FANUC Power Mate panel
JIANAN FANUC 0i MATE-TB panel
DALIAN FANUC 0i Mate panel
FIRST SHENYANG FANUC 0i Mate panel
BAOJI FANUC 0i Mate panel
Standard panel
DALIAN FANUC 0i MATE-TB panel
YOUJIA FANUC 0i MATE-TB panel
DALIAN FANUC 0i MATE-TC panel
FIERST SHENYANG FANUC 0i MATE-TC panel
GREATWALL FANUC 0i MATE-TB panel
BAOJI FANUC 0i MATE-TB panel
SHENYANG CAK61 series F0i MATE-TC panel

FANUC0i T

BAOJI FANUC0i Mate-TC panel

NANJING MAISHUN FANUC 0i Mate-TC panel

SECOND NANJING control panel

NANJING control panel

FIRST SHENYANG FANUC Series 0i-T control panel

BAOJI FANUC Series 0i-T control panel

JINAN FANUC Series 0iMate-TB control panel

DALIAN FANUC Series 0i Mate-TB control panel

YOUJIA FANUC Series 0i-T control panel

NANTONG FANUC Series 0i-TMate control panel

DALIAN FANUC Series 0i Mate-TC control panel

FIRST SHENYANG FANUC Series 0i-TC control panel

GREATWALL FANUC Series 0i-TB control panel

Manual operation unit

SSCNC Machine Simulation

Param CNC
ParamCNC finishs three advanced manufacturing technology experiments on the simulation experiment
platform.

Cutting parameters' influence to cutting force

Cutting parameters' influence to cutting temperature

Cutting parameters' influence to tool life

Common methods for workpiece orgin setting of Fanuc system NC


lathe
Tool presetti ng by test cutting directly
1.First use billmpse tool to turn a excircle for test, and remember the current
X coordinate. After excircle diameter is measured, use X coordinate subtrac
excircle diameter, then input the result into X on "offset" interface.
2.Use billmpse tool to turn a excircle face for test, and remember the current
Z coordinate.Then input it into X on "offset" interface
Use G50 to set work orgin
1.First use billmpse tool to turn a excircle for test. After excircle diameter is
measured, back off the tool along postive direction of Z axis, then cut face to
centre.
2.Select MDI mode.Input G50 X0 Z0, then press START, and set current
point to orgin.
3.Select MDI mode.Input G0 X150 Z150 . Make tool start machining.
4.Begining of the programG50 X150 Z150 .
5.NoteWhen use G50 X150 Z150, your start point and end point must be
X150 Z150.
6.You can also use G30 to avoid tool confusion.Here, the begining of
program: G30 U0 W0 G50 X150Z150
7.In FANUC system, the position of 2nd reference point is setted in
parameter. And in SSCNC software, when you press mouse right key dialog
box displays,and press left key for confirm.
Use work movment to set work orgin
1.In Offset of FANUC0-TD system there is a work moving interface where
you can input orgin offset value.
2.Use billmpse tool to turn a excircle face for test.Here,the position of Z
coordinateZ200.
3.Select Ref.Press XZ axis return to reference point.Now, workpiece
orgin coordinate system is setted.
4.NoteThis orgin is holding, untill offset value Z0 is resetted.
Use G54-G59 to set work orgin
1.Use billmpse tool to turn a excircle for test. After excircle diameter is
measured, back off the tool along postive direction of Z axis, then cut face to
centre.

2.Input current X and Z coordinate value into G54----G59.Call


program:G54X50Z50.
3.Note:You can use G53 to clear G54-----G59 workpiece coordinate system.

M function code
M
code
M00
M01
M02
M03
M04
M05
M06
M08
M09
M16
M28
M30
M48
M49
M60
M80
M81
M98
M99

illustration
Program stop
Optional stop
End of program
Spindle on clockwise (CW)
Spindle on counterclockwise (CCW)
Spindle stop
Toochange
Coolant on
Coolant off
Cutter joining tool rest
Tool rest return to orgin
Program end and reset
Cancel M49
Bypass Override
APC cycle start
Rotary table corotation (CW)
Rotary table reversion (CCW)
Subprogram call
Subprogram end

Domestic typic NC system is FANUC and SINUMERIK


Now we give a comparison and conclusion of excircle turning in FANUC 0i
and SINUMERIK 802s/c 802D
Environment Swan simulation software
1.FANUC 0i
G71 Excircle rough turning canned cycle
1.1 format
G71U(d)R(e)
G71P(ns)Q(nf)U(u)W(w)F(f)S(s)T(t)
N(ns)

.F__ Program segments from ns to nf specify moving commands from A to B


.S__
.T__
N(nf)
d: Cutting depth(radius specifing)
Sign symbol is not specified. Cutting direction is determined by direction of
AA',and it will not change before a value is specified.FANUC system
parameter NO.0717 specifing.
e: Travel of back off
This command is state command.It will not change before a value is
specified. FANUC system parameter NO.0718 specifing.
ns: First segment number of finish maching shap program.
nf: Last segment number of finish maching shap program.
u Distance and direction of finish machining obligated amount in X
direction. diameter/radius
w: Distance and direction of finish machining obligated amount in Z
direction.
1.2 function
As the following Fig shows, finish maching shape from A to A'to B is
determined byprogram,and finish machining obligated amount u/2 and
w is obligated in specified area turned by d(cutting depth).

Fig.1
A three-dimensional display of software machining

Fig.2
B program
M03S1000
T0101
G0X70Z2
G73U5W0R4
G73P10Q11U0.2W0.1F0.1
N10G01X50Z0
G3X40Z-15R22
G2Z-45R25
N11G1Z-50
G70P10Q11
G0X100Z200

T0100
C two-dimensional graphic

Fig.3

2.SINUMERIK 802S/c 2.1 function


Use the cycle to machine figure set by subprogram in the direction parallel to
coordinate axis, and process portrait and cross direction machining, and
process inside and outside figure machining.
You can select different cutting techincs roughing finish machining or
Integration machining. If cutter collision won't be occurred you can call it in
any place. Before calling cutter compensation parameter must have been
activated in the used program.
2.2 call
LCYC95

Fig.4
2.3 precondition
diameter programming command G23 must be effective.
System must has installed SGUD.DEF.

You can call this cycle from third program interface in program nesting at
most two level nesting .
2.4 Parameter
parameter
R105
R106
R108
R109
R110
R111
R112

meaning number range


Machining mode
numerical value 1...12
allowance for finish
unsigned
cut-in depth unsigned
cut-in angle of roughing
Back off quantity of
roughing
Feeding rate of roughing
cutting
Feeding rate of finish
cutting

illustration
R105 parameter of machining mode. Use parameter to conform following
machining modes:
portrait machining / cross direction machining
interior machining / exterior machining
roughing / finish machining / Integration machining
feeding is processed in the direction of cross direction axis when portrait
machining, while feeding is processed in the direction of portrait axis when
cross direction machining.

value

portrait/
cross
direction

exterior/
interior

1
2
3
4
5
6
7
8
9
10
11
12

portrait
cross direction
portrait
cross direction
portrait
cross direction
portrait
cross direction
portrait
cross direction
portrait
cross direction

exterior
exterior
interior
interior
exterior
exterior
interior
interior
exterior
exterior
interior
interior

roughing / finish
machining /
Integration
machining
roughing
roughing
roughing
roughing
finish
finish
finish
finish
Integration
Integration
Integration
Integration

R106 parameter of allowance for finish


The machining before allowance for finish is roughing. If allowance for finish
is not set, roughing is processed all the way till final figure.
R108 cut-in depth parameter. Set maximal cut-in depth of roughing, but the
maximal cut-in depth of current roughing is computed automatically by cycle.
R109 cut-in angle of roughing
R110 back off quantity parameter of roughing. Back off from figure after
roughing parallel to axis, then return to initial point by G0. back off quantity is
conformed by parameter R110.
R111 parameter of roughing feeding rate. The parameter is ineffective when
machining mode is finish machining
R112 parameter of finish machining feeding rate. The parameter is
ineffective when machining mode is roughing.
figure definition :
workpiece figure to be machined is set in a subprogram, and cycle is called
through subprogram name under parameter _CNAME.
figure is composed with line or arc, and can be inserted by fillet and chamfer.
The arc set can be quarter round at most. The programming direction of
figure must be accordant with machining direction selected when finish
machining.
For that figures whose machining mode is endface exterior figure
machining, you must programme along direction from P8(35,120) to
P0(100,40). The arrived position before sequential procedure starts: position
is optional, but it must be ensured that cutter collision will not be occurred
when back initial point of figure from this position. This cycle has following
sequential procedure:
rough cutting
Use G0 to return to initial point in the direction of two axis at the same time
interior computation .Deepness feeding is processed according to
angle set in parameter R109. Return to crossing point in direction parallel to
coordinate axis by using G1 and feed rate under R111. Use G1/G2/G3 to
process roughing according to feed rate set by parameter R111 till machining
to last point along fiture+ allowance for finish. Back off according to
quantity of back off set in R 110 in each axis direction and return by
G0.Reoeat above procedure till machining to last depth.
finish machining
Use G0 to return to initial point of cycle machining separately according to
different axis. Use G0 to return to initial point in the direction of two axis at
the same time. Use G1/G2/G3 to process finish machining according to
feeding rate set by parameter R112 along figure.
When finish machining, nose radius compensation activated automatically
inside cycle. And initial point is computed automatically. When roughing, two
axis return to initial point together; When finish machining, return to initial
point separately according to different axis, and the first to run is cutting feed

axis.
integration machining is after last roughing, and dose not return to initial
point of interior computing any more.
A three-dimensional display of software machining

Fig.5
B. program
main program mpf
T1D1
M03S800
G0X50Z2
_CNAME="L42"
R105=1 R106=0.3 R108=2 R109=7
R110=1.5 R111=0.4 R112=0.25
LCYC95
R105=5 R106=0
LCYC95
G0X200Z200
T1D0
T3D1
G0X40Z-43
R100=38 R101=-45 R102=38 R103=-60
R104=1.5 R105=1 R106=0.2 R109=2
R110=3 R111=0.975 R112=0 R113=4
R114=1
LCYC97
G0X100
Z100
T3D0

M05
M02
L42.spf
G1X0Z0
G3X20.8Z-25.8K-15I0
G2X31.6Z-39.5CR=8
G1Z-45
X35
X38Z-46.5
Z-58.5
X35Z-60
Z-65
X39
X42Z-66.5
Z-75
M02
C. two-dimension display

Fig.6
chamfers are al 45*1.5
3. SINUMERIK 802D 3.1 programming
CYCLE95(NPPMIDFALZFALXFALFF1FF2FF3VARID
TDAM_VRT)
NPP
MID

String
Rcal

FALZ

Rcal

FALX

Rcal

Name of contour subroutine


Infeed depth (enter without sign)
Finishing allowance in the longitudinal
axis (enter without sign)
Finishing allowance in the transverse
axis (enter without sign)

FAL

Rcal

FF1

Rcal

FF2

Rcal

FF3

Rcal

VARI

Rcal

DT

Rcal

DAM

Rcal

_VRT

Rcal

Finishing allowance according to the


contour (enter without sign)
Feedrate for roughing without undercut
Feedrate for insertion into relief cut
elements
Feedrate for finishing
Machining type
Range of values: 1 ... 12
Dwell time fore chip breaking when
roughing
Path length after which each roughing
step is interrupted for chip
breaking
Travel of retraction from contour when
roughing, incremental
(to be entered without sign)

3.2function
Using the rough turning cycle, you can produce a contour, which has been
programmed in a subroutine, from a blank by paraxial stock removal. The
contour may contain relief cut elements.
It is possible to machine contours using longitudinal and face machining,
both externally and internally. The technology can be freely selected
(roughing, finishing, complete machining).
When roughing the contour, paraxial cuts from the maximum programmed
infeed depth are programmed and burrs are also removed parallel to the
contour after an intersection point with the contour has been reached.
Roughing is carried out up to the programmed finishing allowance.
3.3 sequence
Position reached prior to cycle start:
The starting position is any position from which the contour starting point can
be approached without collision.
The cycle creates the following sequence of motions:
The cycle starting point is calculated internally and approached with G0 in
both axes at the same time.
Roughing without relief cut elements:
The paraxial infeed to the current depth is calculated internally and
approached with G0.
Approach of paraxial roughing intersection point with G1 and at feedrate
FF1.
Rounding parallel to the contour along the contour + finishing allowance
with G1/G2/G3 and FF1.
Retraction by the amount programmed under _VRT in each axis and

retraction with G0.


This sequence is repeated until the total depth of the machining step is
reached.
When roughing without relief cut elements, retraction to the cycle starting
point is carried out axis by axis.
A three-dimensional display of software machining

Fig.7
B workpiece programme
main program
T1D1
M03S800
G0X0Z2
CYCLE95("L18",1.5,0.3,0.3,0.2,0.2,0.2,0.2,9,0,0,1)
G0X100Z100
T1D0
T2D1
G0X32Z-30.5
G1X27
G0X100
Z100
T2D0
T3D1
G0X28Z-14
CYCLE97(1.5,3,-16,-27.5,30,30,2,2,1.35,0.1,0,0,3,2,3,1)
G0X100
Z100
T3D0
M05

M02
L18.spf
G1X0Z0F0.2
G03X20Z-10CR=10
G1Z-16
X27
X30Z-17.5
Z-30.5
X40
Z-35.5
G02Z-50CR=20
G1X50Z-58
Z-70
RET
C two-dimension display of machining

Fig.8
chamfer 45*1.5
Brief summary Through parsing above, we can see that FANUC
series editing way of excircle cycle processes cycle through G71, and
SINUMERIK series process cycle through 95 by calling subprogram.

FANUC 0TD
1. Machining program listing
O002
N010M3
N015S1500T0101
N020G96S150
N025G00X65.Z0.T0101
N030G01X-1.6F0.5
N035G00X65.Z3.
N040G71U2.R0.5
N045G71P50Q115U0.4W0.2F0.4
N050G00X10.
N055G01Z0.
N060X18.
N065Z-2.X20.
N070Z-15.
N075Z-30.X26.
N080G03Z-35.X36.K-5.I0.
N085G01Z-45.X36.
N090Z-55.X45.
N095Z-70.
N100X56.
N105Z-72.X60.
N110Z-75.
N115X61.
N120G00Z30.
N125X150.Z150.T0100
N130G00X65.Z30.T0202
N135G70P50Q115
N140G00X150.Z150.T0200
N145M05
N150M02
2. 3DM machining window

3. Two-dimensional machining trochoid

FANUC 0MD
1. Machining program listing
%
N0001G40G49G80
N0002G21
N0003G91G28Z0.
G28X0.Y0.
G90G92X450Y250Z260.
N0005M06T01
N0006G00X0.Y0.Z150.
N0007M3S800
N0008M08
N0009X10.Y10.
N0010Z100
N0011G01X20.F100

N0012G42Y20.D1
N0013Z50
N0014X115.
N0015X120.Y40.
N0016X115.
N0017G02X85.R15.
N0018X57.268Y49.378R20.
N0019X57.Y50.624R3.03
N0020G01Y65.
N0021G03X47.R5.
N0022G01Y50.
N0023G02X25.R11.
N0024G01X20.
N0025Y20.
N0026Z50
N0027G40
N0028X10.
N0029Y10.
N0030G00X10.Y10.
N0031Z150.
N0032M05
N0033M30
%
2. 3DM machining window

3. Machining trochoid

FANUC 0i T
1. Machining program listing
N1T0101
N2M03S400
N3G00X6Z3
G72W1.2R1
G72P5Q15X-0.2Z0.5F100
N5G00x0z0
G01x66
Z-10
X46Z-20
Z-30
G03U-8W-4R4
G01X30
Z-44
N15X0
N16G00Z80
N17X100
N18M05
N19M30
2.3DM machining window

3. Two-dimensional machining trochoid

FANUC 0iM
1. Machining program listing
N10 G40 G49 G80 G17 M06 T01

N20 G54 G90 G0 X-80 Y-80 Z0


N40 M03 S800
N50 M08
N60 G99 G83 Z-30 R1 Q2 F200
N70 G91 X40 K4
N80 Y80
N90 G91 X-40 K4
N100 Y80
N110 X40 K4
N120 G80 G90 G0 Z50
N130 M05 M09
N140 G91 G28 Z0 Y0
N150 M2
2. Machining trochoid

3. 3DM machining window

FANUC 18iT
1. Part drawing

2. Machining program listing


N10T0101

N20M03S100
N30G01X75.Z0.F100.M8
N50G71U2.R0.5
N60G71P70Q140U0.4W0.2F0.4
N70G0X20.Z0.
N80G01X30.Z-5.
Z-34.
N90G02X38.Z-38.R4.
N100G01Z-51.
N110X50.
N120G01Z-70.
N130G01X60.
N140G01Z-90.
N150G00X100.Z100.T0100
N160T0202
N170G70P70Q140
N180G0Z200T0200
N181T0303
N182G0X27.Z2.
N182G76P051060Q100200
N183G76X27.Z-34.P1083Q300F1.5
N184G0X150.Z200.T0300
N185T0404
N186G0X0Z5.
N187G01Z-60.
N188G01Z5.
N194G0X150.Z200.
N195M05
3. Two-dimensional machining trochoid

4. 3DM machining window

FANUC 18iM
1Machining program listing
N01G54X0Y0Z100.0
N02G90G00X-35.0Y35.0S800M03

N03Z-15.0M08
N04G41G01X-10.0Y35.0D01F100
N05X0
N06G02X30.668Y16.867R35.0
N07G02X31.15Y15.603R5.0
N08G02X25.502Y-17.628R43.65
N09G02X25.396Y-17.777R5.0
N10G02X-25.396Y-17.777R31.0
N11G02X-25.502Y-17.628R5.0
N12G02X-31.15Y15.603R43.65
N13G02X-30.668Y16.867R5.0
N14G02X0Y35.0R35.0
N15G01X10.0
N16G40G00X35.0Y35.0M09
N17Z100.0
N18X0Y0
M05
M19M30
2Two-dimensional machining trochoid

33DM machining window

SINUMERIK parameter programming


1. counting parameter R
(1).function
In order to use a NC program not only for just once machining applying a
specified value or must work out a value, counting parameter can be used.
you can compute or set the value you need by controller when program is
running;
parameter value can be set through panel. If parameters are assigned, they
can assign address specified by variable.
(2).programming
R0=...
to
R249=...
(3).illustration
aggregately 250 counting parameters can be used
R0...R99 C use freely
R100...R249 -pass parameter of machining cycle
If machining cycle is not used, these counting parameters of this part can be
used freely.
(4).assignment
xample 1
R0=3.5678 R1=-37.3 R2=2 R3=-7 R4=-45678.1234
You can assign a bigger range using exponential notation
10 300...10 300 .
exponential quantity is after EX maximum symbolic number 10
including symbol and decimal .
EX value range 300 300
Example 2
R0=-0.1EX-5 meaning R0=-0.000 0001
R1=1.874EX8 meaning R1=187 400 000
notation There can be more than one assignment statement in a program
segment; Also you can assign by computation expression.
(5). Assignment for other address
commonality of NC program can be increased by other NC address
assignment computing or parameter expression. You can assign any NC

address with numerical value, arithmetic expression or R parameter except


address N, G and L.
When assigning writes in symbol after address character.
assignment statement can assign negative sign.
When assigning coordinate axis address running command , there
must be an undependent program segment .
example
N 10 G 0 X=R2 assign X axis
(6). parametric computing
follow digital operation rule when counting parameter. Operation in former
bracket is precedence. In addition, multiplication and division take
precedence of addition and subtraction.
2. markerDD program jumping aim
(1).function
1 marker is used mark object program segment jumping to, and the
jumping function can make program run branch.
2 marker can be selected freely, but it must be composed with one letter
or number and the first two symbol must be letter or underline.
3) colon must be after marker of object program segment jumping to. The
marker is in the front of program segment. If program has paragraph
number, marker follows paragraph number to heel.
4)marker can not have other meaning in a program segment.
(2).program example
N10 MARKE1:G1 X20 MARKE1 is marker, object program segment
jumping to
...
TR789:G0 X10 Z20 TR789 is marker, object program segment jumping to
has no paragraph number
3. absolute jumping
(1).function
When NC program is running, program segment is executed according to
sequence of writing in.
When program is running, change executing sequence by inserting skip
instruction
jumping aim only can be program segment with marker. The program
segment must lie in this program.
absolute skip instruction must occupy an undependent program segment.

(2).programming
GOTOF Lable Forwards jumping
GOTOB Lable Backwards jumping
AWL illustration
GOTOF Forwards jumping
GOTOB Backwards jumping
Lable Selected marker
4. conditional jumping
(1).function
Conditional jumping can be denoted with IF- conditional statement. If
jumping condition is satisfied, jump. Jumping aim must be program segment
with marker. The program segment must lie in this program.
Conditional jumping instruction must occupy an undependent program
segment. There are several Conditional jumping instructions in one program
segment.
(2).programming
IF condition GOTOF Lable Forwards jumping
IF condition GOTOB Lable Backwards jumping
AWL

Illustration

GOTOF

Forwards
jumping
Backwards
jumping
Selected
marker
Conditional
lay in symbol
for jumping
Counting
parameter as
condition,
computation
expression

GOTOB
Lable
IF
condition

(3). comparison operation


operator
==

meaning
equal to
unequal

=
=

greater than
smaller than
greater than
or equal to
smaller than
or equal to

These comparison operations denote jumping condition. Computation


expression can be used for comparison operation.
There are two outcomes of comparison operation: one is satisfaction, the
other is dissatisfaction. When it is dissatisfaction, the end value of
operation is 0.
(4).comparison operation programming example
R1 1 R1 greater than 1
1 R1 1 smaller than R1
R1 R2+R3 R1 smaller than R2 adding R3
R6 =SIN(R7*R7) R6 greater than or equal to SIN(R7)2
5. program jumping example

L1( semisphere ):

L2( ellipse ):

Effect drawing :

code
G54X0Y0Z10F100M03S100
R10=-15 R11=-9.06
L1
R10=15 R11=-9.06
L1
R10=0
L2
Code of subprogram L1 :
G0 X=R10+12.5-4 Y=R11
G1 Z-6 F100
G3 I=4-12.5
G1 X=R10+8 Y=R11
G41 D1 X=R10+4 Y=R11
G2 I-4
G0 Z5
R1=4
R2=90
AAA:
R3=R1*COS(R2)+4+R10
R4=R1*SIN(R2)-R1
G0 X=R3 Y=R11
G1 Z=R4 F300

G2 I=R10-R3
G0 Z1
R2=R2-1
IF R2>=0 GOTOB AAA
G0 Z10
M17
Code of subprogram L2 :
R1=35
R2=15
R3=0
G0 X=R1+R10 Y=R11
G1 Z-5 F100
AAA:
R4=R1*COS(R3)+R10
R5=R2*SIN(R3)+R11
G1 X=R4 Y=R5 F100
R3=R3+1
IF R3<=360 GOTOB AAA
G0 Z5
M17
6. subprogram
(1). application
in principle there is no difference between main program and subprogram
Use subprogram to program often repeated machining, such as a certain
figure. One form that subprogram is in main program is machining cycle
including generally universal working procedure such as thread cutting.
Many concrete machining is realized through specified counting parameter
assigning.
(2). structure
The structure of subprogram is the same with main program's, and
subprogram is stopped by M 2 in the last segment. main program return
after subprogram end.
(3). end of program
You can end subprogram by using RET besides M2.
When use RET to end subprogram or return main program G64 continuous
path mode is not interrupted, while using M2 will interrupt G64 and come into
halt state.

(4). subprogram name


to select a subprogram expediently, you must give a name to the
subprogram. Program name can be choosed freely but accord with:
initial two symbols must be letters
Other symbols are letters, number or underline
at best 8 symbols
no separator
The means is the same with program name choosing in main program.
(5). subprogram call
you can use program name to call subprogram in one program(main
program or sunprogram). subprogram calling must occupy an undependent
program segment.
Example
N 10 L 785 P3 call subprogram L785
N20 WELLE7 call subprogram WELLE7
(6).repeated call of program
If you want to continuously run a subprogram time and time, you must write
calling times in address P after program name of called subprogram, and the
maximum times is 9999(P1...P9999)
example:
N 10 L 785 P3 call L785 ,run 3 times
(7). Depth of nesting
Subprogram can be called not only in main program but also in other
programs, and the procedure is called subprogram nesting. Subprogram
nesting depth can be three level, that is to say four grades program
interface(including main program interface).
notation: when you use machining cycle to process, please take the

attention that machining cycle also belongs to four grades program interface.
(8). illustration
Take attention to parameter R too, and please do not change counting
parameter of lower lever program interface by using the used counting
parameter in higher lever program interface .

SIEMENS 802D/810D/840D M typical cycles


Nanjing Swan simulation software has perfected some classical cycles of
SIEMENS 802DM and SIEMENS 810D/840D M
CYCLE71face milling
LONGHOLElong hole
POCKET4circular pocket
POCKET3square pocket
SLOT1milling a slot
SLOT2milling a circumferential slot
Cycle examples
1 face millingCYCLE71
1.1 programming specification format
CYCKE71 (_RTP, _RFP, _SDIS, _DP, _PA, _PO, _LENG, _WID, _STA,
_MID, _MIDA, _FDP, _FALD, _FFP1, _VARI, _FDP1)
1.2 parameter explanation Fig.1-1
_RTP real
Retraction plane (absolute)
_RFP real
Reference plane (absolute)
_SDIS real
Safety clearance (enter without sign)
_DP
real
Final drilling depth (absolute)
_PA
real
Starting point (absolute), 1st axis of the plane
_PO
real
Starting point (absolute), 2nd axis of the plane
Rectangle length along the 1st axis,
_LENG real
incremental. The corner from which the
dimension starts results from the sign.
Rectangle length along the 2nd axis,
_WID real
incremental. The corner from which the
dimension starts results from the sign.
Angle between the longitudinal axis of the
rectangle and the 1st axis of the plane
_STA real
(abscissa, enter without sign); Range of
values: 0 _STA < 180
_MID real
Maximum infeed depth (enter without sign)

_MIDA real
_FALD real
_FFP1 real

Maximum infeed width during solid machining


in the plane as a value (enter without sign)
Finishing dimension in the depth (incremental,
enter without sign)
Feedrate for surface machining
Machining type (enter without sign)
UNITS DIGIT: Values:1 Roughing .2 Finishing
TENS DIGIT: Values:

1 Parallel to the 1st axis of the plane,


_VARI integer unidirectional
2 Parallel to the 2nd axis of the plane,
unidirectional
3 Parallel to the 1st axis of the plane,
changing direction
4 Parallel to the 2nd axis of the plane,
changing direction
Overrun travel in the direction of the plane
_FDP1 real
infeed (incremental, enter without sign)
1.3 function
You can mill a optional rectangular plane by using CYCLE71. The cycle
distinguishes roughing and finish machining. The cycle machines without
radius compensation of milling cutter. Deepness machining is executed
when dry run
1.4 graphic programming

Fig.11

1.5 Generated trochoid by visualized NC code debugging tool (SGD)

Fig.12
notation Swan published a accessory tool SGD on a near
dayvisualized NC code debugging tool (SGD)
SWANSC G-code debug tool (for short SGD) is a simple and effective builtin tool which can call simulation NC code intuitionisticly, simplely and rapidly.
SGD help you call G code rapidly and correctly and check format of each
command intuitionisticly. With SGD you can even check every G code
and check every corresponding locus in the condition of a visualized threedimensional graphics. SGD support kernel code of many NC systems such
as FANUC SIEMENS HUAZHONG NC MITSUBISHI.
1.6 program G code
M03S1000
M06 T1D1
N110 G17 G0 G90 G94 F2000
G54 X0 Y0 Z20
CYCLE71( 10, 0, 2,-11, 0, 0,
100, 100, 0, 6, 3, 5, 0, 4000, 11, 2)
N125 G0 G90 X0 Y0
N130 M30
1.7 graphic display of Swan 3DM machining

Fig.13
2square pocketPOCKET3
2.1 programming specification format
POCKET3 (_RTP, _RFP, _SDIS, _DP, _LENG, _WID, _CRAD, __PA, _PO,
_STA, _MID, _FAL, _FALD, _FFP1, _FFD, _CDIR, _VARI, _MIDA, _AP1,
_AP2, _AD, _RAD1, _DP1)
2.2 function
The cycle can be used in roughing and finish machining. A face mill is asked
in finish machining
cutting feed in depth direction start from center of groove, or upright feeding
there. So, you can pre-mill a hole in this place.
2.3 parameter explanation
_RTP
_RFP
_SDIS
_DP

real
real
real
real

_LENG real
_WID

real

_CRAD real
_PA
real

Retraction plane (absolute)


Reference plane (absolute)
Safety clearance (enter without sign)
Pocket depth (absolute)
Pocket length, for dimensioning from the
corner with sign
Pocket width, for dimensioning from the
corner with sign
Pocket corner radius (enter without sign)
Reference point for the pocket (absolute), 1st

axis of the plane


Reference point for the pocket (absolute), 2nd
_PO
real
axis of the plane
Angle between the pocket longitudinal axis
_STA real
and the first axis of the plane (enter without
sign); Value range: 0 _STA < 180
_MID real
Maximum infeed depth (enter without sign)
Finishing allowance at the pocket edge (enter
_FAL real
without sign)
Finishing allowance at the base (enter without
_FALD real
sign)
_FFP1 real
Feedrate for surface machining
_FFD real
Feedrate for depth infeed
Milling direction: (enter without sign)
Values: 0 Synchronous milling (according to
the spindle direction)
_CDIR integer
1 Conventional milling
2 With G2 (independent of spindle direction)
3 With G3
Machining type: UNITS DIGIT
Values: 1 Roughing
2 Finishing
TENS DIGIT:
Values: 0 Perpendicular to the pocket center
_VARI integer
with G0
1 Perpendicular to the pocket center with G1
2 Along a helix
3 Perpediculation along a pocket longitudinal
axis
Maximum infeed width as a value in solid
_MIDA real
machining in the plane
_AP1 real
Blank dimension of pocket length
_AP2 real
Blank dimension of pocket width
Blank pocket depth dimension from reference
_AD
real
plane
Radius of the helical path on insertion
(relative to the tool center point path) or
_RAD1 real
maximum insertion angle for reciprocating
motion
Insertion depth per 360 revolution on
_DP1 real
insertion along helical path
2.4 graphic programming Fig.2-1

Fig.21
2.5 Generated trochoid by visualized NC code debugging tool (SGD)
Fig.2-2

Fig.22
2.6 program G code
M3S800
M06T01D01
G54G0X0Y0Z50
POCKET3 (5, 0, 1, -31, 50,
50, 6, 0, 0, 30, 3, 0.5,
0.5, 100, 100, 2, 11, 3)
M5

M30
2.7 graphic display of Swan 3DM machiningFig.2-3

Fig.23
3milling a circumferential slotSOLT2
3.1 programming specification format
SLOT2 (RTP, RFP, SDIS, DP, DPR, NUM, AFSL, WID, CPA, CPO, RAD,
STA1, INDA,
FFD, FFP1, MID, CDIR, FAL, VARI, MIDF, FFP2, SSF, _FFCP)
3.2 function
Cycle SLOT2 is a combined roughing finish machining cycle. This cycle
can machine ring slot, and these slots lie on an arc.
3.3
_RTP
_RFP

real
real

_SDIS

real

_DP

real

_DPR

real

_NUM
_AFSL

integer
real

Retraction plane (absolute)


Reference plane (absolute)
Safety clearance (enter without sign)
Safety clearance (enter without sign)
Slot depth (absolute)
Slot depth relative to the reference plane
(enter without sign)
Number of slots
Angle for the slot length (enter without

_WID

real

_CPA

real

_CPO

real

_RAD
_STA1
_INDA
_FFD
_FFP1

real
real
real
real
real

_MID

real

_CDIR

integer

_FAL

real

_VARI

integer

_MIDF
_FFP2
_SSF
_FFCP

real
real
real
real

sign)
Circumferential slot width (enter without
sign)
Center point of circle of holes (absolute),
1st axis of the plane
Center point of circle of holes (absolute),
2nd axis of the plane
Radius of the circle (enter without sign)
Starting angle
Incrementing angle
Feedrate for depth infeed
Feedrate for surface machining
Maximum infeed depth for one infeed
(enter without sign)
Mill direction for machining the
circumferential slot
Values: 2 (for G2) 3 (for G3)
Finishing allowance at the slot edge (enter
without sign)
Machining type
Values: 0 = complete machining
1 = roughing
2 = finishing
Maximum infeed depth for finishing
Feedrate for finishing
Speed when finishing
Interfix feed, circular orbit, unit:mm/m

3.4 graphic programming Fig.3-1

Fig31

3.5 Generated trochoid by visualized NC code debugging tool (SGD)


Fig.3-2

Fig.32
3.6 program G code
M3S1000
T01D01
G54G0X0Y0Z20
SLOT2 (10, 0, 5, -10, 10,
4, 40, 15, 0, 0, 25, 60,
0, 100, 100, 3, 3, 0.5, 2,
3)
M5
M30
3.7 graphic display of Swan 3DM machiningFig.3-3

Fig.33

SIEMENS 801
1Program listing
M03S100T01D01
G00X100
Z50
R100=80R101=0R102=100R103=-100
R104=2R105=1R106=0.5
R109=5R110=35R111=15
R112=0R113=8R114=1
LCYC97
M05
M2
2Generating two-dimensional trochoid

33DM machining window

SIEMENS 802ST
1Part drawing

2Program listing
main program
T1D1
M03S800
G0X50Z2
_CNAME="L42"
R105=1 R106=0.3 R108=2 R109=7
R110=1.5 R111=0.4 R112=0.25
LCYC95
R105=5 R106=0
LCYC95
G0X200Z200
T1D0

T2D1
G0X40Z-43
R100=38 R101=-45 R102=38 R103=-60
R104=1.5 R105=1 R106=0.2 R109=2
R110=3 R111=0.975 R112=0 R113=4
R114=1
LCYC97
G0X100
Z100
T2D0
M05
M02
L42.spf
G1X0Z0
G3X20.8Z-25.8K-15I0
G2X31.6Z-39.5CR=8
G1Z-45
X35
X38Z-46.5
Z-58.5
X35Z-60
Z-65
X39
X42Z-66.5
Z-75
M02
3.Generating two-dimensional trochoid

4.3DM machining window

Vous aimerez peut-être aussi