'the code which is used by the instruction G
'the range is:600~999
'0~99 which adds 600 is the subprogram
'SIMENS fixed circle instruction which only used in the milling machine system
'the meaning and sequence of variable in the fixed circle
' X--#1----the value of the axis X of the drill center
' Y--#2----the value of the axis Y of the drill center
' Z--#3----the distance from plane R to plane Z(plane Z is the bottom plane of the drill)
' the distance from the reference point to the plane R(the plane R is the height plane at which the tools change the mode)
' each machining depth(increment value is positive)
' P--#6----the pause time that the tools stay at the bottom of the drill(Unit ms)
' F--#7----feedrate(mode value,it will affect next instructions)
' L--#8----the repeat times for certain drill
' I--#9----offset in the axis X
' J--#10---offset in the axis Y
....
'''''''''''''''''''''''''''''''''''''
'fixed circle,G83,drill (deeper) hole
'parameter:
' #51 (in the G83 machining mode)
' #52(in the G83 machining mode)
O683
#51=2.0
G0 X=#1 Y=#2
G0 Z=#4
G1 Z=-ABS(#5) F=#7
G0 Z=ABS(#5)
#52=1
G65 P783 L=INT(ABS(#3)/#5)-1
G0 Z=-(ABS(#5)*INT(ABS(#3)/ABS(#5))-#51)
G1 Z=-((ABS(#3)-ABS(#5)*INT(ABS(#3)/ABS(#5)))+#51) F=#7
G0 Z=ABS(#3)
G65 P883 L=#8-1
G0 Z=ABS(#4)
M17
'for G83
O783
G0 Z=-(#52*ABS(#5)-#51)
G1 Z=-(ABS(#5)+#51) F=#7
G0 Z=ABS(#5)*(#52+1)
#52=#52+1
M17
'for G83
O883
G0 X=#1 Y=#2
G1 Z=-ABS(#5) F=#7
G0 Z=ABS(#5)
#52=1
G65 P783 L=INT(ABS(#3)/#5)-1
G0 Z=-(ABS(#5)*INT(ABS(#3)/ABS(#5))-#51)
G1 Z=-((ABS(#3)-ABS(#5)*INT(ABS(#3)/ABS(#5)))+#51) F=#7
G0 Z=ABS(#3)
M17'''''''''''''''''''''''''''''''''''''
'fixed circle,G83,drill (deeper) hole
'parameter:
' #51 (in the G83 machining mode)
' #52(in the G83 machining mode)
O683
#51=2.0
G0 X=#1 Y=#2
G0 Z=#4
G1 Z=-ABS(#5) F=#7
G0 Z=ABS(#5)
#52=1
G65 P783 L=INT(ABS(#3)/#5)-1
G0 Z=-(ABS(#5)*INT(ABS(#3)/ABS(#5))-#51)
G1 Z=-((ABS(#3)-ABS(#5)*INT(ABS(#3)/ABS(#5)))+#51) F=#7
G0 Z=ABS(#3)
G65 P883 L=#8-1
G0 Z=ABS(#4)
M17
'for G83
O783
G0 Z=-(#52*ABS(#5)-#51)
G1 Z=-(ABS(#5)+#51) F=#7
G0 Z=ABS(#5)*(#52+1)
#52=#52+1
M17
'for G83
O883
G0 X=#1 Y=#2
G1 Z=-ABS(#5) F=#7
G0 Z=ABS(#5)
#52=1
G65 P783 L=INT(ABS(#3)/#5)-1
G0 Z=-(ABS(#5)*INT(ABS(#3)/ABS(#5))-#51)
G1 Z=-((ABS(#3)-ABS(#5)*INT(ABS(#3)/ABS(#5)))+#51) F=#7
G0 Z=ABS(#3)
M17
....