Fanuc 10T MS [AMF] L424 85 1


{ ********** FORMATS ********** }

#1 = '#.00'
#2 = '###.0###;0.0'
#3 = '########;0'
#4 = '###^##0'
#5 = '#.######;0.'
#6 = '###0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FirstMoveEPZ#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)

{ ***** TOOL NOSE RAD COMP ***** }

GetCRC:
IF Turning? OR RoughContour? AND NOT Drilling? AND NOT Threading?
IF FirstFeat?
CRCOn
END
END
RETURN

DropCRC:
IF Turning? OR RoughContour? AND NOT Drilling? AND NOT Threading?
CRCOff
END
RETURN

{ ***** COOLANT ***** }

GetCoolant:
IF CoolOff?
CoolOff
ELSE
'/' CoolOn
END
RETURN

{ ********** CHECK RAPID MOVES ********** }

CheckRapid1:
IF LAST NOT ApproachID?
IF LAST NOT CannedCycle?
RapidC
END
END
RETURN

CheckRapid2:
IF NOT CannedCycle?
RapidC
END
RETURN

{ ********** OPERATION COMMENTS ********** }

DoOpComments:
IF UseComments?
IF FirstOperation? OR IF NewTool?
IF ToolComment?
'(T' Tool# ' - ' ToolComment$ ')' EOL
END
IF ToolTypeComment?
'(T' Tool# ': ' ToolDiameter# ' ' ToolType$ ')' EOL
END
IF OperationComment?
'(' OperationComment$ ')' EOL
END
IF OperationIDComment?
'(OP' Operation# ')' EOL
END
IF WorkGroupComment?
'(' WorkGroupComment$ ')' EOL
END
ELSE
IF OperationComment?
'(' OperationComment$ ')' EOL
END
IF OperationIDComment?
'(OP' Operation# ')' EOL
END
IF WorkGroupComment?
'(' WorkGroupComment$ ')' EOL
END
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
END
END
RETURN

{ ********** POSTSCRIPT STUFF ********** }

PSInit: {reset flags from last Op, .70}
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

{ ********** STOCK ********** }

StockOnNoCan:
IF NOT CannedCycle?
StockOn {need stock for SP positioning, if not a canned cycle}
END
RETURN

{ ********** APPROACH MOVES - NO TAILSTOCK ********** }

Approach1: { ***** NEW TOOL ***** }
ZeroPosReg
StockOff

IF ApproachOD?
XCP ZCP GetCoolant EOL
StockOnNoCan
ZSPC EOL
XSPC EOL
END

IF ApproachFace?
IF Drilling?
StockOff XCSP ZCP GetCoolant EOL
END
IF NOT Drilling?
StockOff XCP ZCP GetCoolant EOL
StockOnNoCan ZSPC EOL
XSPC EOL
END
END

IF ApproachID?
StockOnNoCan XOpCD StockOff ZCP StockOnNoCan GetCoolant EOL
ZSPC EOL
XSPC EOL
END

RETURN

Approach2: { ***** SAME TOOL ***** }
ZeroPosReg
StockOff

IF ApproachOD?
IF StraightConnect?
XOpCDC EOL
ZSPC EOL
XSPC GetCoolant EOL
ELSE
IF CannedCycle?
XCPC ZCPC EOL
ZCSP EOL
XCSP GetCoolant EOL
ELSE
XCPC ZCPC GetCoolant EOL
ZSPC EOL
XSPC EOL
END
END
END

IF ApproachFace?
IF StraightConnect?
ZOpCPC EOL
XSPC EOL
ZSPC GetCoolant EOL
ELSE
XSPC ZCPC GetCoolant EOL
ZOpCPC EOL
END
END

IF ApproachID?
IF StraightConnect?
XOpCDC EOL
ZSPC EOL
XSPC GetCoolant EOL
ELSE
XOpCDC ZCPC GetCoolant EOL
ZSPC EOL
XSPC EOL
END
END

RETURN

{ ********** EXIT MOVES ********** }

DoExit1: { ***** SAME TOOL ***** }

IF ApproachOD? AND NEXT ApproachOD?
IF NEXT StraightConnect?
RapidC XOpCDC EOL
ELSE
RapidC XCPC EOL
ZCPC EOL
END
END

IF ApproachFace? AND NEXT ApproachOD?
RapidC ZCPC EOL
XCPC EOL
END

IF ApproachID?
CheckRapid2
XOpCDC {XOpECDC} EOL
END

RETURN

DoExit2: { ***** NEW TOOL ***** }

IF LAST ApproachOD?
IF LAST CannedCycle?
IF Threading?
Rapid
END
XCPC EOL
ELSE
RapidC XCPC EOL
END
ZCPC EOL
END
IF LAST ApproachFace?
RapidC ZCPC EOL
END
IF LAST ApproachID?
IF LAST CannedCycle?
XOpCDC EOL
ELSE
RapidC LAST XOpCDC EOL
END
ZCPC EOL
END
RETURN

{ ********** CHECK OFFSET ********** }

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
CoolOff EOL
END
END
IF NewToolOffset?
LOfstOff '00' EOL
OpToolID LatheOffset EOL
END
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
SpeedC EOL
ELSE
'G50' MaxRPM EOL
CSSOn 'G96' Speed EOL
END
ELSE
IF LAST ConstantSurfaceFeed?
CSSOff 'G97' Speed EOL
ELSE
SpeedC EOL
END
END
IF LAST ProgStop?
SpinOn EOL
CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn EOL
END
END
DoPostScript
RETURN

{ ********** ARC COMMAND OUTPUT ********** }

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXC MoveZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

{ ********** TOOLPATH ********** }

ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SpinOff EOL
'G4P2000' EOL
Speed InverseSpinOn EOL
ELSE
IF Dwell?
'G4P' Dwell# EOL
END
END
END
END
IF PointFeat?
MoveSXYC EOL
ELSE
IF RapidFeat?
RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
FeedC MoveXC MoveZC FeedRateC EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
FormatArc FeedRateC EOL
NEXTQuadrant
ELSE
IF ThreadFeat?
'G32' MoveXC MoveZC ThrdLead EOL
Rapid
END
END
END
END
END
NEXTFeat
RETURN

{ ********** SET-UP AND INITIALIZATIONS ********** }

IF ToolTipProgram?
GetToolTip
END
InitProg
InitWFONum
PosSideLathe
SetMaxRPM('10000')
SetMaxFeed('500')
IF PSComment? AND UseComments?
'PostScript:' EOL
' Literals: put between single or double quotes.' EOL
' Separate commands and literals with at least one space.' EOL
' A CR ( RETURN key ) will start a new line.' EOL
' Commands: must be all capital letters when typed in.' EOL
' ENDOP -' EOL
' all literals and commands before an ENDOP command' EOL
' will appear at the beginning of the operation. All ' EOL
' literals and commands after an ENDOP command will appear' EOL
' at the end of the operation. ' EOL
END

{ ********** PROGRAM HEADER ********** }

InitProg
OpenSub
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'(' ProgramName$ ')' EOl
ELSE
EOL
END
IF ProgramComment?
'(' ProgramComment$ ')' EOL
ELSE
'(OPERATION _____ OF _____)' EOL
'(X0 Z0 IS CENTER OF FACE)' EOL
'(REF G54 IS X____ Z____)' EOL
'(REF G55 IS X____ Z____)' EOL
' ' EOL
END
IF UseComments?
'(T1 - STOCK STOP)' EOL
EACHOp
IF FirstOperation?
'(T' Tool# ' - ' ToolComment$ ')' EOL
END
IF NOT FirstOperation?
IF NewTool?
'(T' Tool# ' - ' ToolComment$ ')' EOL
END
END
NextOp
END
' ' EOL
IF UseComments?
IF ProgramComment?
'(' ProgramComment$ ')' EOL
END
IF FormatNameComment?
'(FORMAT: ' FormatName$ ')' EOL
END
IF TimeComment?
'(' Date$ ' AT ' Time$ ')' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
{'(BY CNC ONE 271-5354/998-4610)' EOL}
END
' ' EOL

{ ********** PROGRAM OPERATIONS ********** }

InitProg

'N1 (T1 - STOCK STOP)' EOL
'G0G54X0Z0T0' EOL
'T0101' EOL
'X0Z.03' EOL
'M0 (POSITION MATL)' EOL
'Z.25' EOL
'X0Z0T0' EOL
'M1' EOL
' ' EOL

EachOp
GetLCycle

IF FirstOperation? { ***** FIRST OPERATION ***** }
StockOff
Plane
'N' Tool#
DoOpComments
Rapid
IF NeedWFO1?
'G' NewWFO#
END
'X0Z0T0M42' EOL
IF ConstantSurfaceFeed?
Preset MaxRPM EOL
END
OpToolID LatheOffset EOL
CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn EOL
Approach1
END

IF NOT FirstOperation? { ***** FOLLOWING OPERATIONS ***** }

IF NewTool? { ***** NEW TOOL ***** }
StockOff
DoExit2
DoEndOpPS
IF LAST ConstantSurfaceFeed?
CSSOff 'G97' CalcRPM2 EOL
END
CoolOff EOL
RapidC 'X0Z0T0' EOL
IF LAST ProgStop?
'M0' EOL
ELSE
ProgStop EOL
END
' ' EOL
'N' Tool#
DoOpComments
DoPostScript
Rapid
IF NeedWFO1?
'G' NewWFO#
END
'X0Z0T0M42' EOL
IF ConstantSurfaceFeed?
Preset MaxRPM EOL
END
OpToolID LatheOffset EOL
CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1 SpinOn EOL
ELSE
Speed SpinOn EOL
END
Approach1
END

IF SameTool? { ***** SAME TOOL ***** }
' ' EOL
DoOpComments
StockOff
DoExit1
CheckOffset
Approach2
END
END

IF ConstantSurfaceFeed? AND NOT SameTool?
CSSOn 'G96' Speed EOL
END

IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
IF ApproachFace?
LCycle 'Z' FirstMoveEPZ# XatFinZ XTapAtZ FeedRate EOL
ELSE
LCycle XatFinZ FinZ XTapAtZ FeedRate EOL
END
SimpleRough
ELSE
TagInc
IF RoughContour?
SetPass2
LCycle 'P' Tool# Operation# '0''Q' Tool# Operation# '1' XStkLeft ZStkLeft CutDepth FeedRate EOL
'N' Tool# Operation# '0' StepMove
IF ApproachOD? OR ApproachID?
XCSP EOL
END
IF ApproachFace?
ZCSP EOL
END
ToolPath
'N' Tool# Operation# '1' Rapid
IF ApproachOD?
ZCSP EOL
END
IF ApproachFace?
XCSP EOL
END
IF ApproachID?
ZCSP EOL
END
IF AutoFinish?
'G70' 'P' Tool# Operation# '0' 'Q' Tool# Operation# '1' EOL
END
ELSE
IF RoughPatternShift?
SetPass2
LCycle 'P' Tool# Operation# '0' 'Q' Tool# Operation# '1' XStkLeft ZStkLeft NumCuts FeedRate EOL
'N' Tool# Operation# '0' StepMove StrtPos EOL
ToolPath
'N' Tool# Operation# '1' EOL
IF AutoFinish?
'G70' 'P' Tool# Operation# '0' 'Q' Tool# Operation# '1' EOL
END
END
END
END
ELSE
IF Threading?
IF Chamfer?
'M23' EOL
END
LCycle XatFinZ FinZ XTapAtZ CutMethod ThrdHeight CutDepth ThrdLead ToolAngle EOL
IF AutoFinish?
'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL
END
IF Chamfer?
'M24' EOL
END
ELSE
IF Drilling?
IF Tap?
LCycle ZDepth 'E' FeedIPR# EOL
SpinOff EOL
'G4P2000' EOL
Speed InverseSpinOn EOL
ZSP EOL
ELSE
IF PeckChipBreaker?
LCycle FromCP ZDepth RLevel Dwell Peck Retract FeedRate EOL
IF AutoFinish?
Feed ZDepth EOL
IF Dwell?
'G4P' Dwell# EOL
END
Rapid ZCP EOL
END
END
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving?
StockOff
IF Turning?
SetPass1
ELSE
SetPass2
END
RapidC StrtPos EOL
ToolPath
END
END
END
IF Drilling? AND Tap?
SpinOff EOL
'G4P2000' EOL
Speed SpinOn EOL
END

DoExit1

NextOp

StockOff
IF NOT ApproachID?
CheckRapid2
END
IF ApproachOD?
XCPC EOL
END
ZCPC CoolOff EOL
DoEndOpPS
IF ConstantSurfaceFeed?
CSSOff 'G97S' CalcEPRPM# EOL
END
RapidC 'X0Z0T0' SpinOff EOL
EOP EOL
Post
EOR EOL
Close

IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END


Wyszukiwarka

Podobne podstrony:
Fanuc 10T MS [PT] L703 85 1
Fanuc 10T MS [BMR] L768 85
Fanuc 10T MS [ TPM] L455 85
Fanuc 10T MS [ CES] L107 85
Fanuc 10T MS [RHB] L458 85
Fanuc 10T MS ( ót) L131 85 1
Fanuc 10T MS [ BI] L441 85
Fanuc 10T MS [ G54PM] L498 85 2
Fanuc 10T MS ( AG) L092 85 1
Fanuc 10T MS [R PSI] L648 85 1
Fanuc 10T MS [R PSI] L647 85 1
Fanuc 10T MS [DMW] L745 85 2

więcej podobnych podstron