Anilam Crusader L051 82


{Change Comments ***********************************************************}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{2/19/91, Updated Anilam Crusader L051.52 to .71 format, JR}

{3/26/91
Modified: Anilam Crusader L051.71
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
Only Canned Cycles supported are SimpleRough, Threading and PeckChipBreaker.
DWB}

{08/06/91
Updated: Anilam Crusader L051.80
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.82 Format.
Kim Michelman}

{Prog Numeric Format Definitions *******************************************}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FeedIPR#,2)
FORMAT(FinishZInc#,2)
FORMAT(FinishXRwithTaperInc#,2)
FORMAT(ZCutDepth#,2)
FORMAT(FinishXRadiusInc#,2)
FORMAT(FinishZwithTaperInc#,2)
FORMAT(XCutDepth#,2)
FORMAT(ThreadXInc#,2)
FORMAT(ZDepthInc#,2)
FORMAT(Peck#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Thread#,4)
FORMAT(Taper#,5)

{Prog Subroutines **********************************************************}

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' 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
RETURN

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

PSStuff:
RETURN

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

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

GetFeedRate:
SeqC 'G29LV21 ' FeedIPR# EOL
SeqC 'G95' EOL
RETURN

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

ODApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL
GetFeedRate
SeqC Feed StockOnNoCan XSPC EOL
RETURN

IDApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL { for SameTool ApproachID }
GetFeedRate
SeqC Feed StockOnNoCan XSPC EOL
RETURN

FaceApproachSP:
SeqC StockOnNoCan XSPC EOL { for SameTool ApproachFace }
SeqC StockOff ZOpCPC EOL
GetFeedRate
SeqC Feed StockOnNoCan ZSPC EOL
RETURN

AppMove:
ZCP
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
IF ApproachOD?
SeqC Rapid XCP AppMove EOL
ODApproachSP
ELSE
IF ApproachID?
SeqC Rapid XOpCD AppMove EOL
IDApproachSP
ELSE {ApproachFace}
SeqC Rapid StockOnNoCan XSP StockOff AppMove EOL
FaceApproachSP
END
END
RETURN

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqC 'G4' EOL
SeqC SpinOn EOL
END
DoPostScript
RETURN

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

ToolPath:
EACHFeat
GetToolTip
IF PointFeat?
SeqC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqC RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqC FeedC MoveXC MoveZC EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
SeqC FormatArc EOL
NEXTQuadrant
ELSE
IF ThreadFeat?
SeqC 'G32' MoveXC MoveZC ThrdLead EOL
Rapid
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid:
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
PosSideLathe
XsAreRadii
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
EachOp {Start of post processing *********************}
GetLCycle
IF FirstOperation?
EOR EOL
IF UseComments?
IF ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
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
END
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
OpenSub
StockOff {.71.2}
SetHome
DoOpComments
DoPostScript
Plane
Seq 'G0G70' AbsOrInc EOL
SeqC 'M1401' EOL
SeqC 'G29C1' EOL
SeqC OpToolID EOL
SeqC SpinOn EOL
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
CheckRapid
IF LAST ApproachOD?
SeqC XCPC EOL
ELSE
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
END
SeqC ZCPC EOL
DoEndOpPS
SeqC 'G29C1' EOL
IF LAST ProgStop?
SeqC 'G4' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

DoOpComments
DoPostScript
Seq OpToolID EOL
SeqC SpinOn EOL
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

DoOpComments
StockOff
IF LAST StraightConnect?
CheckOffset
CheckRapid
SeqC StockOnNoCan XSPC ZSPC EOL
GetFeedRate
ELSE
CheckRapid
IF ApproachOD?
IF LAST ApproachOD?
SeqC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
SeqC ZCPC EOL
SeqC XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC XCPC EOL
END
SeqC ZCPC EOL
SeqC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC XCPC EOL
ELSE {LAST ApproachID}
SeqC LAST XOpECDC EOL
END
SeqC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
IF ApproachFace?
SeqC 'G29LV50 ' FinishZInc# EOL
SeqC 'G29LV51 ' FinishXRwithTaperInc# EOL
SeqC 'G29LV52 ' ZCutDepth# EOL
SeqC 'G29LV53 ' FinishXRadiusInc# EOL
SeqC 'G29LV54 0' EOL
SeqC 'G82' EOL
ELSE
SeqC 'G29LV50 ' FinishXRadiusInc# EOL
SeqC 'G29LV51 ' FinishZwithTaperInc# EOL
SeqC 'G29LV52 ' XCutDepth# EOL
SeqC 'G29LV53 ' FinishZInc# EOL
SeqC 'G29LV54 0' EOL
SeqC 'G81' EOL
END
END
ELSE
IF Threading?
IF SingleEdgeCut?
SeqC 'G29LV42 ' Thread# EOL
SeqC 'G29LV50 ' FinishZInc# EOL
SeqC 'G29LV51 ' ThreadXInc# EOL
SeqC 'G29LV52 ' XCutDepth# EOL
SeqC 'G29LV53 ' Taper# EOL
SeqC 'G29LV54 0' EOL
IF AutoFinish?
SeqC 'G29LV55 2' EOL
ELSE
SeqC 'G29LV55 1' EOL
END
SeqC 'G29LV56 60' EOL
SeqC 'G86' EOL
ELSE
SeqC 'G29LV42 ' Thread# EOL
SeqC 'G29LV50 ' FinishZInc# EOL
SeqC 'G29LV51 ' ThreadXInc# EOL
SeqC 'G29LV52 ' XCutDepth# EOL
SeqC 'G29LV53 ' Taper# EOL
SeqC 'G29LV54 0' EOL
IF AutoFinish?
SeqC 'G29LV55 2' EOL
ELSE
SeqC 'G29LV55 1' EOL
END
SeqC 'G84' EOL
END
ELSE
IF Drilling?
IF PeckChipBreaker?
SeqC 'G29LV50 ' ZDepthInc# EOL
SeqC 'G29LV51 -' Peck# EOL
SeqC 'G81' EOL
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving?
StockOff
IF Turning?
SetPass1
ELSE
SetPass2
END
SeqC RapidC StrtPos EOL
ToolPath
END
END
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
StockOff
IF CannedCycle?
Rapid
ELSE
RapidC
END
IF ApproachOD?
SeqC XCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC EOL
END
END
SeqC ZCPC EOL
DoEndOpPS
SeqC 'G29C1' EOL
SeqC 'G29E' EOL
SeqC 'G29S1' EOL
SeqC 'T0' EOL
SeqC Rapid 'X0Z0' EOL
SeqC SpinOff EOL
IF ProgStop?
SeqC 'G4' EOL
END
SeqC 'G29E' 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