Fanuc 0TC [Rands] L328 82 4


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

{1/20/95
Copied: Fanuc 0T Mate MS L031.82.1
Created: Fanuc 0TC [CG] L320.82.1
For: Clough Group
Machine: Victor V Turn CNC Lathe 26/110
Control: Fanuc 0TC, G Code Group A
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.04/Compost 4.21.25
Changes made per Keith McIver and sample manual.
DWB}

{2/21/95
Modified: Fanuc 0TC [CG] L320.82.1
For: Clough Group
Versions: ncCad 4.33.01/ncCAM 4.33/ncPost 4.33.05/Compost 4.21.27
Versions: Catalyst v2.14.30C/Catalyst v2.14.30PPC/Compost 4.21.27
Changes made per Robin Evans of Clough Group.
Moved call to DoEndOpPS to just before EOP [M30] at end of Prog.
Customer outputs literal M12 and M26 codes to retract TailStock at end of output and does not want
them to appear until last.
DWB}

{3/2/95
Modified: Fanuc 0TC [CG] L320.82.2
For: Clough Group
Versions: ncCad 4.33.01/ncCAM 4.33/ncPost 4.33.05/Compost 4.21.27
Versions: Catalyst v2.14.30C/Catalyst v2.14.30PPC/Compost 4.21.27
Changes made per Fax from Robin Evans of Clough Group.
Moved DoEndOpPS to follow NewHome block at NewTool.
DWB}

{5/2/95
Copied & Modified: Fanuc 0TC [CG] L320.82.3
For: Rands Systems Inc.
Versions: ncCad 4.33.01/ncCAM 4.33/ncPost 4.33.05/Compost 4.21.27
Versions: Catalyst v2.14.30C/Catalyst v2.14.30PPC/Compost 4.21.27
Created Custom Processor per Documents and Sample.

Marc Sickles}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,2)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(SPX#,2)
FORMAT(SPZ#,2)
FORMAT(CutDepth#,2) { Canned RoughContour }
FORMAT(FinishXDia#,2)
FORMAT(Taper#,2)
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)
FORMAT(RapidF#,7)
FORMAT(Peck#,8)
FORMAT(CutDepth#,8) { Canned Threading }

{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

DoToolTypeComment:
IF UseComments? AND ToolTypeComment?
SetScale('1')
'(TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ')'
RestoreScale
END
RETURN

DoToolComment:
IF UseComments? AND ToolComment?
'(' ToolComment$ ')' 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

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

ODApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
RETURN

IDApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL { for SameTool ApproachID }
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
RETURN

FaceApproachSP:
SeqC StockOnNoCan XSPC EOL { for SameTool ApproachFace }
SeqC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqC FeedNoCan ZSPC FeedRateNoCan EOL
END
RETURN

AppMove:
StockOff ZCP OpToolID LatheOffset
RETURN

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

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

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

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

CheckRapid:
IF LAST CannedCycle?
IF LAST Drilling? AND LAST AutoFinish? AND LAST NOT FIFO? AND LAST NOT Tap?
ELSE
Rapid
END
ELSE
RapidC
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
PosSideLathe
StandardXZArcs
SetMaxRPM('5000')
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

EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'(' ProgramName$ ')'
END
EOL
IF UseComments?
SetScale('1') {restore scale for comments}
IF ProgramComment?
'(' ProgramComment$ ')' EOL
END
IF FormatNameComment?
'(FORMAT: ' FormatName$ ')' EOL
END
IF TimeComment?
'(' Date$ ' AT ' Time$ ')' EOL
END
IF MovesComment?
'(OUTPUT IN ABSOLUTE INCHES)' EOL
END
IF ToolTypeComment?
EachTool
SetFlag('1')
EachOp
IF Equal? TLNum# Tool#
IF Flag?('1')
SetFlagF('1')
DoToolTypeComment EOL
DoToolComment
END
END
NextOp
NextTool
END
RestoreScale
END


EachOp {Start of post processing *********************}
GetLCycle
IF FirstOperation?
OpenSub
RestoreScale
StockOff {.71.2}
SetHome
DoPostScript

ASCII('13') 'N' Tool# '00' Rapid Plane 'G28U0W0' EOL
SeqC 'G40' Preset Home
IF ConstantSurfaceFeed?
MaxRPM
END
EOL

DoOpComments
SeqC OpToolID '00' EOL
'M1' DoToolTypeComment EOL
DoToolComment

IF ConstantSurfaceFeed?
SeqC CSSOff 'G97' CalcRPM1 CoolOn EOL
ELSE
SeqC CSSOff 'G97' Speed CoolOn EOL
END

Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}

IF LAST ApproachOD?
SeqC RapidC XCPC EOL
ELSE
IF LAST ApproachID?
SeqC RapidC LAST XOpECDC EOL
END
END
SeqC RapidC ZCP EOL
IF LAST ConstantSurfaceFeed?
SeqC CSSOff 'G97' CalcRPM2 EOL
END

DoEndOpPS
IF LAST ProgStop?
SeqC 'M0' EOL
END

{Start new Operation}

DoPostScript


ASCII('13') 'N' Tool# '00' Rapid Plane 'G28U0W0' EOL
IF ConstantSurfaceFeed?
SeqC Preset MaxRPM EOL
END
EOL

DoOpComments
SeqC OpToolID '00' EOL
'M1' DoToolTypeComment EOL
DoToolComment

IF ConstantSurfaceFeed?
SeqC CSSOff 'G97' CalcRPM1 CoolOn EOL
ELSE
SeqC CSSOff 'G97' Speed CoolOn EOL
END

Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
DoOpComments
DoToolTypeComment EOL
DoToolComment
IF LAST StraightConnect?
CheckOffset
SeqC RapidC StockOnNoCan XSP ZSP EOL
ELSE

IF ApproachOD?
IF LAST ApproachOD?
SeqC RapidC LAST XOpECD EOL
ELSE {around}
IF LAST ApproachID?
SeqC RapidC LAST XOpECD EOL
SeqC ZCPC EOL
SeqC XCPC EOL
ELSE
SeqC RapidC ZCP EOL
SeqC XCPC EOL
END
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqC RapidC LAST XOpECD EOL
ELSE
IF LAST ApproachOD? {around}
SeqC RapidC XCP EOL
SeqC ZCPC EOL
SeqC XOpCDC EOL
ELSE
SeqC RapidC ZCP EOL
SeqC XOpCDC EOL
END
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqC RapidC LAST ZOpECP EOL
ELSE
IF LAST ApproachOD? {around}
SeqC RapidC XCP EOL
ELSE {LAST ApproachID}
SeqC RapidC LAST XOpECD EOL
END
SeqC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqC CSSOn 'G96' Speed EOL
END
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
SeqC LCycle XatFinZ
IF ApproachFace?
'Z' FirstMoveEPZ#
ELSE
FinZ
END
XTapAtZ FeedRate EOL
SimpleRough
ELSE
{TagInc}
SetPass2
IF RoughContour?
SeqC LCycle CutDepth
FORMAT(CutDepth#,2)
'R' CutDepth# EOL
{SeqC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft FeedRate EOL}
{'>' Tag# EOL}
SeqC LCycle 'P1' 'Q3' XStkLeft ZStkLeft FeedRate EOL
{Rands prefers P1/N1 and Q3/N3 for all cycles}
{still allowing sequencing by 2 (even numbers only) -M Sickles}

IF ApproachFace?
'N1' StepMove 'Z' SPZ# EOL
SeqC 'X' SPX# EOL
ELSE
'N1' StepMove 'X' SPX# EOL
SeqC 'Z' SPZ# EOL
END
ELSE
IF RoughPatternShift?
SeqC LCycle XminusU ZminusW NumCuts EOL
{SeqC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft FeedRate EOL}
{'>' Tag# EOL}
SeqC LCycle 'P1' 'Q3' XStkLeft ZStkLeft FeedRate EOL
{Rands prefers P1/N1 and Q3/N3 for all cycles}
{still allowing sequencing by 2 (even numbers only) -M Sickles}
'N1' Rapid StrtPos EOL
END
END
ToolPath
{'<' Tag# EOL}
{Rands prefers P1/N1 and Q3/N3 for all cycles}
{still allowing sequencing by 2 (even numbers only) -M Sickles}

IF AutoFinish?
{SeqC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL}
{as Above -M Sickles}
SeqC 'G70' 'P1' 'Q3' EOL
END
SetPass1
TrackXNO# CycleStartX#
TrackZNO# CycleStartZ#
END
ELSE
IF Threading?
SeqC LCycle 'P'
IF AutoFinish?
'02' {2 finish passes}
ELSE
'01'
END
IF Chamfer?
'12' {1.2 thread lead distance for chamfer}
ELSE
'00'
END
IF SingleEdgeCut?
'60' {using 60 for standard tool angle, need ToolAnge# command}
ELSE
'00'
END
'Q'
IF ConstantVolumeCut?
'20' {.0020 minimum cut depth}
ELSE
{if not ConstantVolumeCut? CutDepth is min depth, volume increases with depth}
FORMAT(CutDepth#,4)
CutDepth#
END
'R0' {using zero for no finish stock allowance, need XStkLeft# command}
EOL
SeqC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead EOL
ELSE
IF Drilling?
SeqC LCycle ZDepth FeedRate RLevel
IF Peck?
'Q' Peck#
END
IF Dwell?
'P' Dwell#
END
EOL
{SeqC DrillOff EOL} {Rands Requests No G80s -M Sickles}
IF AutoFinish? AND NOT Tap?
SeqC Feed ZDepth EOL
IF Dwell?
SeqC 'G4P' Dwell# EOL
END
IF FIFO? OR Tap?
ELSE
RapidC
END
SeqC ZSP EOL
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
SetPass1
RapidC
IF ApproachFace?
SeqC ZOpECPC EOL
FaceApproachSP
ELSE
SeqC XOpECDC EOL
IF ApproachOD?
ODApproachSP
ELSE {ApproachID}
IDApproachSP
END
END
SeqC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqC RapidC XSPC ZSPC EOL
SeqC StockOff StrtPosC EOL
ToolPath
ELSE
IF Threading?
SetPass1
SeqC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL
SeqC 'G32'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SeqC Rapid XSP EOL
SeqC ZSP EOL
END
END
END
END
IF Drilling? AND Tap?
SeqC SpinOff EOL
SeqC 'G4P2000' EOL
SeqC Speed SpinOn EOL
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
IF CannedCycle?
IF Drilling? AND AutoFinish? AND NOT FIFO? AND NOT Tap?
ELSE
Rapid
END
ELSE
RapidC
END
IF ApproachOD?
SeqC XCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC EOL
END
END
SeqC ZCPC ASCII('13') EOL
SeqC CoolOff EOL
IF ConstantSurfaceFeed?
SeqC CSSOff 'G97S' CalcEPRPM# EOL
END
SeqC Rapid Plane 'G28U0W0' EOL
{SeqC FirstHome OpToolID '00' SpinOff EOL}
IF ProgStop?
SeqC 'M0' EOL
END
DoEndOpPS
SeqC 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 0TC BND34S [A&B] L760 82
Fanuc 2000C Mazak L168 82
Fanuc 0T (Anzon1) L077 82 1m
Fanuc 0T Miyano [A&B] L247 82 6
Fanuc 0T Nakamora L248 82
Fanuc 0TA T Mate L175 82
Fanuc 0MC [Rands] M785 87
Fanuc 6T Tsugami 6 L199 82
Fanuc 10T MS [ R] L294 82 1
Fanuc 6T Tsugami 4 L198 82
Fanuc 0TC [CG] L320 85m
Fanuc 10T Wasino L209 82
Fanuc 10T Monarch L354 82
Fanuc 10TF MS [ r] L020 82
Fanuc 10T (Anzon) L076 82
Fanuc 0T [RWMT] L369 82 2
Fanuc 0TC [TC] L784 85m

więcej podobnych podstron