Meldas 500 Mit [SMP] CX73 12 1


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

{5/24/96
Modified: Meldas 500M 0KK B970.12.2
Created: Meldas 500M 0KK B970.12.3
For: Armstrong Blum
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.05C/Compost 4.21.37/1.0a
Changes made per Jeff Myers of Gibbs & Associates.
Customer requested method of outputting true G10XYZ coordinate values.
Jeff instructed them to use machine coordinates in stock size dialogue and not use CS#1.
Added restriction of G10 Block for CS#1 at StartUpStuff sub.
Added CS#1 Warning at DoOpComments.
DWB}

{5/30/96
Modified: Meldas 500M 0KK B970.12.3
Created: Meldas 500M 0KK B970.12.4
For: Armstrong Blum
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.05C/Compost 4.21.37/1.0a
Changes made per Lee Hensch of Armstrong Blum.
Customer reported that some Operations were not outputting a FeedRate.
This was caused by a Pocketing Operation with Rapid Entry whose FeedRate was identicle to
previous Operation.
Added FORMAT#9 at Prog Numeric Format Definitions.
Added RapidF# to FORMAT#9 at Prog Numeric Format Definitions.
Added RapidF# at start of OpGuts sub.
DWB}

{6/26/96
Updated: Meldas 500M 0KK B970.12.4
Modified: Meldas 500M 0KK B970.12.5
For: Armstrong Blum
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.05C/Compost 4.21.37/1.0a
Changes made per Lee Hensch of Armstrong Blum.
Customer reported problem of outputting true G10XYZ coordinate values, see 5/24/96.
Not sure, but I think it has to do with creating the CSOrigins in machine coordinates.
Distance from Machine Home to Center of Table Rotation is always the same.
Instructed user to us normal dimensions from center of table rotation.
Added SUB# to FORMAT#4 at Prog Numeric Format Definitions.
Subtracting 14.1732 from CSOffsetX# and 31.1023 from CSOffsetZ# at DoCSWFOComment and G10Block.
Deleted changes made on 5/24/96.
Deleted condition to output warning when CS#1 is current at DoOpComments.
Deleted NotEqual CS#1 condition at StartUpStuff.
Customer reported bad CSOffsetB# values.
Changed CSOffsetB# from FORMAT#7 to FORMAT#8 at Prog Numeric Format Definitions.
Modified formulas at ModCSOffsetB.
Post was not calculating negative angles correctly.
Customer requested that Tapping Cycles output Speed and SpinOn at Cycle block, not StrtPos block.
Added GetSpeedOn sub to suppress from StrtPos block of Tapping Cycles.
GetSpeedOn sub is called from FirstOp3, FirstOp3a, NewToolOp5, NewToolOp5a and two places at
SameToolOp3
Added output of Speed SpinOn to Cycle block at OpGuts IF Drilling.
DWB}

{7/2/96
Modified: Meldas 500M 0KK B970.12.5
Created: Meldas 500M 0KK B970.12.6
For: Armstrong Blum
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.05C/Compost 4.21.37/1.0a
Changes made per Lee Hensch of Armstrong Blum.
Added call to GetCoolOn for ChangeCS at SameToolOp3.
Indexing B-Axis causes CoolOff.
Calling sub allows to turn CoolOn back on.
DWB}

{8/8/97
Initial: Meldas 500M OKK [FR] CZ22.12
Created: Mitsubishi [SM]CXXX.12
For: Spacecraft Machine
Changed to standard Fanuc style sub calls,
Eliminated StartUpStuff calls,
Changed to standard Fanuc style WFOs,
Moved call to NotSameToolWFO into FirstOp1,
Made output of Speed SpinOn in FirstOp, NewTool, and SameTool conditional
upon Tap? being false, Speed SpinOn for tap is output on the block before the cycle call,
Added Rapid Plane DrillOff CRCOff block to FirstToolOp1,
Added IncValue to G30 blocks,
Moved G30 block in FirstOp1 to before Tool call,
Added M11 (unclamp table) before all rotary table moves and M10 (clamp table) after,
MPK}

{8/20/97,
Initial: Meldas 500 Mit MH5A [SMP] CX73.12
Created: Meldas 500 Mit MH5A [SMP] CX73.12.1
Changed the A axis to output 'B' and B to output 'A',
MPK}


{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FourthDegree#,4) { Web Drill ZRapidStart OptCyc1 FIFO }
FORMAT(SUB#,4)
FORMAT(CalcZSurf#,4) { Web Drill ZRapidEnd OptCyc1 FIFO }
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(DIV#,4)
FORMAT(TrackZNO#,4)
FORMAT(ToolDiameter#,4)
FORMAT(CallMasterNum#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Recall#,7)
FORMAT(CSOffsetA#,7)
FORMAT(CSOffsetB#,8)
FORMAT(RapidF#,9)

{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
IF MultipleParts? AND OneToolAllParts? NOT SameTool?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
END
RETURN

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# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

CSWFO:
'G' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CalcCSWFO: {(iPart-1)*NumOfCS#)}
'G' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1')
RETURN

RecallWFO: {Should be expanded later to handle multiple parts}
IF WFOCS?
CSWFO
ELSE
SeqC 'G' NewWFO#
END
IF AAxisAvail?
'B0'
END
IF BAxisAvail?
'A0'
END
EOL
RETURN

CSAngleA:
IF AAxisAvail?
'B' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'A' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

DoCSWFOComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
'( ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# 'Z' CSOffsetZ# ' )' EOL
RETURN

DoCSG52Comment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

PSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
ResetCool
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
SubID EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

StdSub:
SeqC SubCall CallLab RepLab RepCycs EOL
StartSub
RETURN

FinishSub1: {part 1}
SeqC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

OpenMP:
NewProg
IF Flag?('2') OR WFOCS?
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
IF WorkFixtureOffsets?
NewWFO
EachWFO {simple eachPart}
SeqC SetWFO EOL
SeqC SubCall CallLab RepLab OnePart EOL
IncWFO
NextWFO {simple NextPart}
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
END
RETURN

CloseMP:
IF Flag?('2') OR WFOCS?
SeqC EndSub EOL
CloseSub
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
IF Flag?('2')
SeqC SetWFO EOL
EachCSOp
DoCSG52Comment
ClearCSOffset
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ELSE
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
END
ClearCSOffset
IncWFO
NextWFO {simple NextPart}
ELSE
LastWFO
EachWFO {simple eachPart}
IF Flag?('2')
SeqC SetWFO EOL
EachCSOp
DoCSG52Comment
ClearCSOffset
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ELSE
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
END
ClearCSOffset
DecWFO
NextPrevWFO {simple NextPart}
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
NewProg
StartSub
SaveCSProg
END
ClearCSOffset
END
RETURN

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
SetFlag('5') { CRCOffsetC }
CRCOnC
END
END
RETURN

FormatLine:
DoAbsOrInc ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
IF Flag?('5')
SetFlagF('5')
CRCOffsetC
END
RETURN

ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC DoDrillAbsOrInc MoveSXYZC EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatLine FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC FormatLine DecelFeed ckCRCNum EOL
ELSE
SeqC FormatLine FeedRateC ckCRCNum EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
Seq IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
ToolPath
SeqC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{removed RapidC}
{removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SeqC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Feed IncValue StrtPosC EOL
SeqC AbsOrInc
ELSE
SeqC Feed
END
ELSE
SeqC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqC AbsOrInc ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqC Rapid ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC SubCall CallLab EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC Feed ZCP2 FeedEnt EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL {changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better}
END
END
SeqC SubCall CallLab EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN

GetCoolOn:
IF NOT CoolOff?
IF ThruSpin?
'M58'
SetFlag('6') { For SameTool }
ELSE
CoolOn
SetFlagF('6') { For SameTool }
END
END
RETURN

{
GetOfstOff:
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
Rapid ZCP1 {OfstOff}
ELSE
'G30Z0.' {OfstOff}
END
RETURN
}
ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { use WFO for CS changes }
SetFlag('3') {True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP}
SetFlag('4') {True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') { CRCOffsetC }
SetFlagF('6') { SameTool GetCoolOn }
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: may be capital and/or lower case letters. Separate commands with a space.' 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
' SetFlood, SF' EOL
' This is a modal command affecting all operations.' EOL
' Outputs flood coolant, M8, for all following operations.' EOL
' This is the default setting.' EOL
' FloodCoolant, FCool' EOL
' This is a non-modal command affecting the current operation only.' EOL
' Outputs flood coolant, M8, for the current operation.' EOL
' SetThruSpindle, STS' EOL
' This is a modal command affecting all operations.' EOL
' Outputs thru-the-spindle coolant, M58, for all following operations.' EOL
' ThruSpindleCoolant, TSCool' EOL
' This is a non-modal command affecting the current operation only.' EOL
' Outputs thru-the-spindle coolant, M58, for the current operation.' EOL
' OptionalCycle1, OptCyc1' EOL
' This command, combined with now-obsolete 4thAxisCW(n) command will cause Post' EOL
' to output a non-Canned LongHand Web Drilling Cycle.' EOL
' 4thAxisCW(-1.25), 4ACW(-1.25) -' EOL
' This command, combined with OptionalCycle1 command will cause the Post Processor to' EOL
' output a non-Canned LongHand Web Drilling Cycle. Argument should contain ZRapidStart' EOL
' value. For this example, ZRapidStart value is equal to Z-1.25. In addition to this,' EOL
' Post Processor uses the the ZSurface Edit Field for ZRapidEnd position.' EOL
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('48')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlag('2')
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to G52 style output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('48') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to G52 style output. )' EOL
END
END
END
RETURN

SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN

OpGuts:
RapidF# { No Output }
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
SetFlag('1') { Milling ZShiftOnly SepSubs }
ZonlyRep
SetFlagF('1')
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
IF FIFO?
SeqC FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC DrillCP EOL
GetCycle
IF FIFO? AND OptCyc1? AND FourthCW? { Web Drill Cycle }
EachFeat
IF NOT FirstFeat?
SeqC RapidC MoveSXYC EOL
SeqC RapidC ZCP2C EOL
END
SeqC FeedC 'Z' FourthDegree# FeedEnt EOL
SeqC RapidC 'Z' CalcZSurf# EOL
SeqC FeedC ZDepth FeedEnt EOL
SeqC SpinOff EOL
SeqC 'M19' EOL
SeqC IncValue Feed 'Y-.005' EOL
SeqC AbsOrInc EOL
IF RetractToCP1?
SeqC RapidC ZCP1 EOL
ELSE
SeqC RapidC ZCP2 EOL
END
SeqC SpinOn EOL
NextFeat
ELSE
IF Tap?
SeqC Speed SpinOn EOL
END
IF Tap? AND NOT CWSpindle?
'G74'
ELSE
IF FIFO? AND NOT Dwell?
'G76'
ELSE
Cycle
END
END
SeqC FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF FIFO? AND NOT Dwell?
'J-.005' { Shift away from wall }
END
IF Tap?
'E' DIV# Num#('1') FeedTapIPR#('1') { # of Threads per Inch }
ELSE
FeedEnt
END
EOL
IF CallMasterOp?
SeqC SubCall 'P' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqC SubCall CallLab EOL
StartSub
ToolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqC Rapid 'G80' ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
END
RETURN

NotSameToolWFO:
IF WFOCS?
DoCSWFOComment
SeqC CSWFO EOL
ELSE
IF ChangeCS?
DoCSG52Comment
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
ELSE
IF NeedWFO1?
SeqC 'G' NewWFO# EOL
END
END
END
ClearCSOffset
RETURN

SameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
SeqC CSWFO EOL
END
ELSE
IF ChangeCS?
DoCSG52Comment
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
END
END
ClearCSOffset
RETURN

InitOp:
EOR EOL
ProgID1 EOL
IF UseComments? AND ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ToolChangeAtHome?
SetHome
END
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 PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
SeqC Rapid Plane DrillOff CRCOff EOL
SeqC 'G30' IncValue 'X0.Y0.Z0.' EOL
IF NOT MultipleParts?
NotSameToolWFO
END
SeqC OpToolID EOL
IF AChange? OR BChange?
SeqC 'M11' EOL
SeqC Rapid AbsOrInc CSAngleAC CSAngleBC EOL
SeqC 'M10' EOL
END
SeqC ToolChng EOL
SeqC ProgStop EOL
DoOpComments
DoPostScript
RETURN

FirstOp2:
{ Speed SpinOn moved to FirstOp3 and FirstOp3a }
RETURN

FirstOp3:
CheckPass
SeqC Rapid AbsOrInc StrtPos
IF NOT Tap?
Speed SpinOn
END
EOL
SeqC OfstOn PreTool GetCoolOn EOL
RETURN

FirstOp3a: {can't XY position before WFO}
CheckPass
SeqC Speed SpinOn EOL
SeqC OfstOn PreTool GetCoolOn EOL
RETURN

NewToolOp1:
SeqC CoolOff EOL
{ SeqC SpinOff EOL}
{ SeqC GetOfstOff EOL}
RETURN

NewToolOp2:
DoEndOpPS
SeqC 'G30' IncValue 'X0.Y0.Z0.' SpinOff EOL
IF AChange? OR BChange?
SeqC 'M11' EOL
SeqC Rapid AbsOrInc CSAngleAC CSAngleBC EOL
SeqC 'M10' EOL
END
SeqC ToolChng EOL
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
Seq ' ' EOL
SeqC PlaneC EOL
DoOpComments
DoPostScript
RETURN

NewToolOp4:
{ Speed SpinOn moved to NewToolOp5 and NewToolOp5a }
RETURN

NewToolOp5:
CheckPass
SeqC Rapid AbsOrInc StrtPos
IF NOT Tap?
Speed SpinOn
END
EOL
SeqC OfstOn PreTool GetCoolOn EOL
RETURN

NewToolOp5a:
CheckPass
SeqC Speed SpinOn EOL
SeqC OfstOn PreTool GetCoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC 'G30' IncValue 'X0.Y0.Z0.' SpinOff EOL
IF AChange? OR BChange?
SeqC Rapid AbsOrInc CSAngleAC CSAngleBC EOL
END
SeqC 'M0' EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC CoolOff EOL
SeqC SpinOff EOL
SeqC 'G30' IncValue 'X0.Y0.Z0.' SpinOff EOL
IF AChange? OR BChange?
SeqC 'M11' EOL
SeqC Rapid AbsValue CSAngleAC CSAngleBC EOL
SeqC 'M10' EOL
END
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqC PlaneC AbsOrInc Rapid StrtPos
IF NOT Tap?
Speed SpinOn
END
GetCoolOn EOL
SeqC OfstOn EOL
ELSE
SeqC PlaneC AbsOrInc Rapid StrtPos
IF ChangeCS?
Speed SpinOn GetCoolOn
ELSE
IF Drilling?
GetCycle
IF NOT Tap?
SpeedC
END
END
IF NOT CoolOff? AND LAST CoolOff?
GetCoolOn
ELSE
IF ThruSpin? AND NOT Flag?('6')
GetCoolOn
ELSE
IF NOT ThruSpin? AND Flag?('6')
GetCoolOn
END
END
END
END
EOL
IF NewToolOffset? OR ChangeCS?
SeqC OfstOn EOL
END
END
RETURN

End1:
SeqC CoolOff EOL
SeqC 'G30X0.Y0.Z0.' SpinOff EOL
RETURN

End2:
DoEndOpPS
IF AAxisAvail? OR BAxisAvail?
SeqC 'M11' EOL
END
IF AAxisAvail?
SeqC 'G28' CSAngleA EOL
END
IF BAxisAvail?
SeqC 'G28' CSAngleB EOL
END
SeqC 'M10' EOL {Clamp Table}
SeqC 'M60' EOL { Change Pallets }
IF ProgStop?
SeqC 'M0' EOL
END
RETURN

End3:
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
InitOp
EachOp {Start of post processing}
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
OpenMP
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
End1
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
InitOp
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp1
FirstOp2
OpenMP
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
OpenMP
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
End1
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
InitOp
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
FirstOp1
FirstOp2
OpenMP
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
IF NOT WorkFixtureOffsets?
SeqC WFO1 EOL
END
NewToolOp4
OpenMP
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
End1
CloseMP
End2
End3
RETURN

NoMPs: {no multiple parts}
InitOp
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NotSameToolWFO
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolWFO
SameToolOp3
END
END
OpGuts
NextOp
End1
End2
End3
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END


Wyszukiwarka

Podobne podstrony:
Meldas 500 Mit [SMP] PMX73 17 3
Meldas 500 Mit [EE] CU06 12 1
Meldas 500M 0KK [FR] CZ22 12
Okuma 5000M G [SMP] CX87 12
Mit Meldas 320M [SAV] MY34 89 1
Mit Meldas 320M [SI] PMY34 17 4
Mit Meldas 50M [DC] MU33 89 2
Mit Meldas 50M LW M134 89 2
Mit Meldas 300 [SM] MT99 16 1
Mit Meldas M520 MZ72 89 5m
Mit Meldas 300 [PE] M548 89 1
Mit 330M Comet [SRW] C620 12
Mit Meldas 520L DP [IP] L669 85

więcej podobnych podstron