{Change Comments ***********************************************************}
{10/3/95, L265.82.1, Updated for Catalyst v2.20 per Fanuc 10T MS [-] L001.85.02 Format, DWB}
{4/11/97
Initial: Siemens 810T EM L265.85
Created: GN Siemens 810T Hrdng Lxxx.85
ForUser: Lovejoy
Control: General Numeric Siemens 810T
Machine: Hardinge CHNC-1
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: New processor per sample readout and conversations with Mark Harrison.
Jim Radcliffe}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '####.####;0'
#3 = '#######0'
#4 = '#####.###;0'
#5 = '0000'
#6 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(CycleStartXDia#,2)
FORMAT(CycleStartZ#,2)
FORMAT(StockXRadius#,2)
FORMAT(LastCutXRadius#,2)
FORMAT(RunInZ#,2)
FORMAT(RunOutZ#,2)
FORMAT(StockZ#,2)
FORMAT(CutDepth#,2)
FORMAT(FeedIPR#,2)
FORMAT(FinishXDia#,2)
FORMAT(FinishZ#,2)
FORMAT(ThreadXInc#,2)
FORMAT(Retract#,2)
FORMAT(Peck#,2)
FORMAT(HomeX#,2)
FORMAT(HomeZ#,2)
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(ToolOffset#,3)
FORMAT(SpringPasses#,3)
FORMAT(InFeedAngle#,3)
FORMAT(CalcNumCuts#,3)
FORMAT(Dwell#,4) {.72}
FORMAT(RapidF#,4)
FORMAT(Program#,5) {.72}
{Command Subroutines *******************************************************}
OpenCollet:
'M21'
RETURN
CloseCollet:
'M22'
RETURN
OpenPartsCatcher:
'M26'
RETURN
ClosePartsCatcher:
'M25'
RETURN
BarFeedDwell:
'G4X.3'
RETURN
CheckG1:
IF Flag?('3')
'G1'
SetFlagF('3')
END
RETURN
CheckRapid1:
CheckG1 CRCOffC
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN
CheckRapidF1:
IF LAST CannedCycle?
RapidF
ELSE
RapidFC
END
RETURN
CheckRapid2:
CheckG1 CRCOffC
IF CannedCycle?
Rapid
ELSE
RapidC
END
RETURN
CheckRapidF2:
IF CannedCycle?
RapidF
ELSE
RapidFC
END
RETURN
GetSequence:
IF MinimizeSequencing?
'N' ToolOffset#
ELSE
Seq
END
RETURN
ckBarFeedOp:
IF Flag?('1') AND Drilling? AND Equal? Tool# Num#('8') AND Equal? ToolOffset# Num#('8')
SetFlag('2')
ELSE
SetFlagF('2')
END
RETURN
{Prog Subroutines **********************************************************}
RestoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
RestoreScale
END
RETURN
DoToolComments:
IF UseComments?
SetScale('1')
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ' )' EOL
END
RestoreScale
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
StockOnNoCan:
IF NOT CannedCycle?
StockOn {need stock for SP positioning, if not a canned cycle}
END
RETURN
FeedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN
FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN
ApproachSP:
IF ApproachFace?
SeqC StockOnNoCan XSPC EOL
SeqC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqC FeedNoCan ZSPC FeedRateNoCan EOL
END
ELSE { ODApproach/IDApproach }
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
END
RETURN
AppMove:
StockOff ThisOpEntryZCP
RETURN
Approach: { NOT FOR TAILSTOCK, .82 }
IF ApproachOD?
SeqC 'G1' Rapid ThisOpEntryXCP AppMove RapidF EOL
ELSE
IF ApproachID?
SeqC 'G1' Rapid XOpCD AppMove RapidF EOL
ELSE {ApproachFace}
SeqC 'G1' Rapid StockOnNoCan XSP AppMove RapidF EOL
END
END
ApproachSP
RETURN
CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
DoOpComments
DoPostScript
SeqC
IF ConstantSurfaceFeed?
{ handled in main common }
ELSE
IF LAST ConstantSurfaceFeed?
CSSOff 'G97' Speed
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
Speed
END
END
END
IF LAST ProgStop?
SpinOn EOL
SeqC CoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
IF NewToolOffset?
SeqC OpToolID LatheOffset EOL
END
RETURN
FormatArc:
IF ArcCW?
'G2'
ELSE
'G3'
END
MoveXC MoveZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
CkCRC: { 4.2 }
IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets }
IF NOT LastFeat?
CRCOnC
END
END
IF LastFeat? AND EmptyLine? { Exit Length Feature }
CRCOffC
END
RETURN
ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF CutOff?
SeqC CkCRC CheckG1 FeedC 'X' TrackX# ADD# EPX# Num#('.125') MoveZC FeedRateC EOL
SeqC CSSOff 'G97S1200' EOL
SeqC OpenPartsCatcher EOL
SeqC 'G4X.8' EOL
ELSE
IF Flag?('2')
SeqC OpenCollet EOL
SeqC BarFeedDwell EOL
END
END
IF Drilling?
IF Tap?
SeqC InverseSpinOn EOL
ELSE
IF Dwell?
SeqC 'G4X' Dwell# EOL
END
END
END
END
IF PointFeat?
SeqC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqC CheckG1 RapidC MoveXC MoveZC RapidFC EOL
ELSE
IF LineFeat?
SeqC CkCRC CheckG1 FeedC MoveXC MoveZC
IF CutOff? AND LastFeat?
'F.0011'
ELSE
FeedRateC
END
EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
SeqC FormatArc FeedRateC EOL
SetFlag('3')
NEXTQuadrant
ELSE
IF ThreadFeat?
SeqC 'G33' MoveXC MoveZC ThrdLead EOL
SetFlag('3')
END
END
END
END
END
IF LastFeat?
IF CutOff?
SeqC ClosePartsCatcher EOL
ELSE
IF Flag?('2')
SeqC BarFeedDwell EOL
SeqC CloseCollet EOL
SeqC BarFeedDwell EOL
END
END
END
NEXTFeat
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
PosSideLathe
StandardXZArcs
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') { BarFeed Program }
SetFlagF('2') { BarFeed Operation }
SetFlagF('3') { G1 needs to be output }
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 { check for cut off operation to signify bar feed program output }
IF CutOff?
SetFlag('1') { this is a BarFeed Program }
END
NextOp
EachOp {Start of post processing *********************}
GetLCycle
IF FirstOperation?
EOR 'MPF' Program# 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
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
Plane
SeqC 'H1012R1=' HomeX# 'R2=' HomeZ# EOL
ckBarFeedOp
GetSequence 'G0' DoToolComments EOL
DoOpComments
DoPostScript
SeqC 'G54'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn CoolOn EOL
SeqC 'L1P1' EOL {Safe Start-up}
SeqC OpToolID 'D' ToolOffset# EOL
Approach
ELSE
IF NewTool?
{Finish off last Operation}
StockOff {.62}
CheckRapid1
IF LAST ApproachOD?
SeqC LAST OpExitXCPC CheckRapidF1 EOL
SeqC LAST OpExitZCPC EOL
ELSE
IF LAST ApproachID?
SeqC LAST XOpECDC CheckRapidF1 EOL
SeqC LAST OpExitZCPC EOL
ELSE { LAST ApproachFace }
SeqC LAST OpExitZCPC CheckRapidF1 EOL
END
END
DoEndOpPS
SeqC 'L2P1' EOL {Safe Start Block}
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
{Start new Operation}
SetLineStrtChr('/')
' ' EOL
SetLineStrtChr('')
ckBarFeedOp
GetSequence 'G0' DoToolComments EOL
DoOpComments
DoPostScript
SeqC 'G54'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn CoolOn EOL
SeqC 'L1P1' EOL {Safe Start-up}
SeqC OpToolID 'D' ToolOffset# EOL
Approach
ELSE
IF SameTool? {.62}
{Start new Operation}
StockOff
IF LAST StraightConnect?
CheckOffset
CheckRapid1
SeqC StockOnNoCan XSPC ZSPC CheckRapidF1 EOL
ELSE
CheckRapid1
IF ApproachOD?
IF LAST ApproachOD?
SeqC LAST XOpECDC CheckRapidF1 EOL
ELSE {around}
IF LAST ApproachID?
SeqC LAST XOpECDC CheckRapidF1 EOL
SeqC LAST OpExitZCPC EOL
ELSE { LAST ApproachFace }
SeqC LAST OpExitZCPC CheckRapidF1 EOL
END
SeqC LAST OpExitXCPC EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqC LAST XOpECDC CheckRapidF1 EOL
ELSE
IF LAST ApproachOD? {around}
SeqC LAST OpExitXCPC CheckRapidF1 EOL
SeqC LAST OpExitZCPC EOL
ELSE { LAST ApproachFace }
SeqC LAST OpExitZCPC CheckRapidF1 EOL
END
SeqC XOpCDC EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqC LAST ZOpECPC CheckRapidF1 EOL
ELSE
IF LAST ApproachOD? {around}
SeqC LAST OpExitXCPC CheckRapidF1 EOL
ELSE {LAST ApproachID}
SeqC LAST XOpECDC CheckRapidF1 EOL
END
SeqC LAST OpExitZCPC EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed?
IF SameTool? AND LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqC Preset MaxRPM EOL
END
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqC Speed EOL
END
ELSE
SeqC Preset MaxRPM EOL
SeqC CSSOn 'G96' Speed EOL
END
END
IF CannedCycle?
StockOff
IF Roughing?
IF RoughContour?
NewProg
SeqC
FORMAT(Program#,6)
'R20=' Program#
'R21=' CycleStartXDia#
'R22=' CycleStartZ#
'R24=' StockXRadius#
'R25=' StockZ#
'R26=' CutDepth#
'R27=40'
IF ApproachOD?
'R29=11'
ELSE
IF ApproachID?
'R29=13'
ELSE {OD ApproachFace}
'R29=12' {R29=14 is for ID ApproachFace}
END
END
EOL
SetPass2
SeqC 'L95P1' Feedrate EOL
OpenSub
'L' Program# EOL
DoSubComment
SeqC StepMove StrtPos EOL
ToolPath
SeqC 'M17' EOL
CloseSub
IF AutoFinish?
SeqC 'R24=0R25=0'
IF ApproachID?
'R29=22'
ELSE
'R29=21'
END
EOL
SeqC 'L95P1' Feedrate EOL
END
END
ELSE
IF Threading?
SeqC
'R20=' FeedIPR#
'R21='
IF ApproachOD?
MUL# Num#('2') ADD# FinishXRadius# ThreadXInc#
ELSE
MUL# Num#('2') SUB# FinishXRadius# ThreadXInc#
END
'R22=' CycleStartZ#
'R23=' SpringPasses#
IF ApproachOD?
'R24=-' ThreadXInc#
ELSE
'R24=' ThreadXInc#
END
'R25=' LastCutXRadius#
'R26=' RunInZ#
'R27=' RunOutZ#
EOL
SeqC
'R28=' CalcNumCuts#
'R29=' InFeedAngle#
'R31='
IF ApproachOD?
MUL# Num#('2') ADD# ADD# FinishXRadius# Taper# ThreadXInc#
ELSE
MUL# Num#('2') SUB# ADD# FinishXRadius# Taper# ThreadXInc#
END
'R32=' FinishZ#
'L97P1'
EOL
ELSE
IF Drilling?
IF PeckChipBreaker?
SeqC
'R22=' CycleStartZ#
'R24=' Retract# {Peck decrease amount}
'R25=' Peck#
'R26=' FinishZ#
'R27=' Dwell# {Dwell at start}
'R28=' Dwell# {Dwell at end}
'L98P1' Feedrate
EOL
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
IF ApproachFace?
SeqC RapidC ZOpECPC RapidFC EOL
ELSE
SeqC RapidC XOpECDC RapidFC EOL
END
ApproachSP
SeqC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqC RapidC XSPC ZSPC RapidFC EOL
SeqC StockOff StrtPosC EOL
ToolPath
SetPass1
ELSE
IF Threading?
SeqC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL
SeqC 'G33'
IF Taper?
'X' FinishXDia#
END
'Z' FinishZ# ThrdLead EOL
SeqC Rapid XSP RapidF EOL
SeqC ZSP EOL
END
END
END
END
END
IF Drilling? AND Tap?
SeqC SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
StockOff
SeqC CoolOff EOL
CheckRapid2
IF ApproachOD?
SeqC OpExitXCPC CheckRapidF2 EOL
SeqC OpExitZCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC CheckRapidF2 EOL
SeqC OpExitZCPC EOL
ELSE { ApproachFace }
SeqC OpExitZCPC CheckRapidF2 EOL
END
END
DoEndOpPS
SeqC 'L2P1' EOL {Safety Code}
SeqC EOP EOL
Post
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:
Siemens 810T EM L265 85Siemens 810T EM L155 85Siemens 810T [TCR] EM L390 85 9Siemens 810T Em340 [FA] L511 85Siemens 805 [Gimbel] L634 85 4mSiemens 880T [CGB] L746 85 5Siemens Tos 5 [GT] L636 85 1Siemens 810T EM L155 85mSiemens Tos 4 [GT] L635 85 1Siemens 3T4C [LTV] L505 85 1Siemens 810T 110A L826 85mFanuc 0T Hard ST25 L510 85 1Siemens 3T Tacchi NE L614 85 2AB 7370 Hard [PP] L782 85 2Fanuc 21T Hard [JT] L751 85 2Fanuc 18T Hard [SMT] L545 85 1Fanuc 0TB Hard [AM] L391 85 1Fanuc 18T Hard [DMAFB] L542 85więcej podobnych podstron