AB Sheldon [BRL+] L142 82 2


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

{1/10/90
Copied & modified: AB Sheldon [-] L141.53
For: Bio-Rad
Machine: Sheldon 1710
Control: Allen Bradley
Front Turret consists of tools 1-4 and 9-12.
Front Turret situation will have Positive Home.
Rear Turret consists of tools 5-8.
Rear Turret situation will have Negative Home.
Modified for output to be ReverseXZArcs and PosSideLathe, regardless of Turret being used.
However, if Rear Turret is selected, will temporarily set NegSideLathe for output of
Home in FirstOperation and NewTool, NewHome in NewTool, and FirstHome at end of Prog.
NOTE: We need a command to output current 'X' position for use with 'G96' CSSOn.
Control requires block to be 'G96R' CurrXPos# when activating CSS.
DWB}

{6/1/90
Modified: AB Sheldon [BRL+] L142.69.3
For: Gibbs & Associates
Added CycleStartXRadius# per NOTE of 1/10/90.
DWB}

{6/11/91
Modified: AB Sheldon [BRL+] L142.70
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 10T MS [-] L001.80 Format.
Changed CycleStartXRadius# to CycleStartX#.
Changed SpinFor and SpinRev to SpinOn as this is handled in 4.0.
Only Canned Cycles supported are Threading and Tapping.
DWB}

{01/24/92
Modified: AB Sheldon [BRL+] L142.80
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 10T MS [-] L001.82.1 Format.
Kim Michelman}

{02/14/92
Modified: AB Sheldon [BRL+] L142.82.1
For: BioRad
Reversed the 'G2' and 'G3' (CW/CCW) in the form, per request.
Kim Michelman}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,2)
FORMAT(CycleStartX#,2)
FORMAT(CycleStartZ#,2)
FORMAT(FinishXRadius#,2)
FORMAT(FinishZ#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(CalcEPRPM#,6)
FORMAT(ToolOffset#,7)

{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

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
SeqC Feed StockOnNoCan XSPC FeedRate EOL
RETURN

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

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

AppMove:
ZCP CoolOn
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 '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?
SeqC SpeedC EOL
ELSE
SeqC Preset MaxRPM EOL
SeqC CSSOn 'G96R' CycleStartX# Speed EOL
END
ELSE
IF LAST ConstantSurfaceFeed?
SeqC CSSOff 'G97' Speed EOL
ELSE
SeqC SpeedC EOL
END
END
IF LAST ProgStop?
SeqC SpinOn EOL
SeqC CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
DoPostScript
RETURN

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

ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqC SpinOff EOL
SeqC 'G94G4F2.' EOL
SeqC 'G95' Speed InverseSpinOn EOL
SeqC Feed MoveXC MoveZC FeedRate EOL
ELSE
IF Dwell?
SeqC 'G94G4F' Dwell# EOL
IF RapidFeat?
SeqC 'G95' Rapid MoveXC MoveZC EOL
ELSE
SeqC 'G95' Feed MoveXC MoveZC FeedRate EOL
END
END
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 'G33' MoveXC MoveZC FeedRateC EOL
Rapid
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid1:
IF LAST CannedCycle?
IF LAST Threading?
IF LAST NOT AutoFinish?
Rapid
END
ELSE
IF LAST Drilling? AND LAST Tap?
Rapid
END
END
ELSE
RapidC
END
RETURN

CheckRapid2:
IF CannedCycle?
IF Threading?
IF NOT AutoFinish?
Rapid
END
ELSE
IF Drilling? AND Tap?
Rapid
END
END
ELSE
RapidC
END
RETURN

SetUpTurret:
IF ToolOver?('4') AND NOT ToolOver?('8')
NegSideLathe
END
RETURN

SetUpLastTurret:
IF LAST ToolOver?('4') AND LAST NOT ToolOver?('8')
NegSideLathe
END
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
PosSideLathe
XsAreRadii
NoIJKSigns
SetMaxRPM('2000')
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
'(TN,' Program# ')' EOL
IF UseComments?
IF ProgramNameComment?
'( ' 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 Rapid CSSOff AbsOrInc 'G95G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
OpToolID ToolOffset# SpinOn EOL
SetUpTurret
SeqC Preset Home
IF ConstantSurfaceFeed?
MaxRPM
END
EOL
PosSideLathe
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
CheckRapid1
IF LAST ApproachOD?
SeqC XCPC EOL
ELSE
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
END
IF LAST ConstantSurfaceFeed?
SeqC CSSOff 'G97' ZCPC CalcRPM2 CoolOff EOL
ELSE
SeqC ZCPC CoolOff EOL
END
SetUpLastTurret
SeqC NewHome EOL
PosSideLathe
SeqC Preset 'X0Z0T0000'
IF LAST ProgStop?
'M0'
ELSE
ProgStop
END
EOL

{Start new Operation}

DoOpComments
DoPostScript
Seq Rapid CSSOff AbsOrInc 'G95G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
OpToolID ToolOffset# SpinOn EOL
SetUpTurret
SeqC Preset Home
IF ConstantSurfaceFeed?
MaxRPM
END
EOL
PosSideLathe
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

DoOpComments
StockOff
IF LAST StraightConnect?
CheckOffset
CheckRapid1
SeqC StockOnNoCan XSPC ZSPC EOL
ELSE
CheckRapid1
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 ConstantSurfaceFeed? AND NOT SameTool?
SeqC CSSOn 'G96R' CycleStartX# Speed EOL
END
IF CannedCycle?
StockOff
IF Threading?
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF Taper?
SeqC 'X' ADD# FinishXRadius# MUL# Taper# NumSc#('1') EOL
SeqC LCycle 'X' FinishXRadius# 'Z' FinishZ# FeedRateC EOL
ELSE
SeqC 'X' FinishXRadius# EOL
SeqC LCycle 'Z' FinishZ# FeedRateC EOL
END
SeqC Rapid 'X' CycleStartX# EOL
SeqC 'Z' CycleStartZ# EOL
END
ELSE
IF Drilling?
IF Tap?
SeqC LCycle ZDepth FeedRateC EOL
SeqC SpinOff EOL
SeqC 'G94G4F2.' EOL
SeqC 'G95' Speed InverseSpinOn EOL
SeqC LCycle ZSP FeedRate EOL
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving?
StockOff
IF Turning?
SetPass1
IF ApproachOD?
SeqC RapidC XOpECDC EOL
ODApproachSP
ELSE
IF ApproachID?
SeqC RapidC XOpECDC EOL
IDApproachSP
ELSE {ApproachFace}
SeqC RapidC ZOpECPC EOL
FaceApproachSP
END
END
ELSE
SetPass2
END
SeqC RapidC StrtPosC EOL
ToolPath
END
END
END
IF Drilling? AND Tap?
SeqC SpinOff EOL
SeqC 'G94G4F2.' EOL
SeqC 'G95' Speed SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
IF NOT ApproachID? {.71.2}
CheckRapid2
END
IF ApproachOD?
SeqC XCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC EOL
END
END
IF ConstantSurfaceFeed?
SeqC CSSOff 'G97' ZCPC 'S' CalcEPRPM# CoolOff EOL
ELSE
SeqC 'G97' ZCPC CoolOff EOL
END
SetUpTurret
SeqC FirstHome EOL
SeqC Preset 'X0Z0T0000' 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