Mit Meldas 3 [SM] C044 13 1


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

{1/22/93
Copied & modified: Mitsubishi 320M M466.81.2
For: Paxton Engineering
Machine:
Control:
Changes made per Steve at Paxton Engineering.
Changed Sub Call Label from 'L' to 'P' in Forms Strings 2 dialog.
Changed Sub Repeat Label from 'P' to 'L' in Forms Strings 2 dialog.
Changed Program ID Label from 'L' to 'O' in Forms Strings 2 dialog.
Changed Call Sub from 'G22' to 'M98' in Forms Commands 3 dialog.
Changed Return From Sub from 'G23' to 'M99' in Forms Commands 3 dialog.
Changed End Program from 'M2' to 'M30' in Forms Commands 3 dialog.
Changed FORMAT for G Address from '00' to '#0' in Forms Default Formats dialog.
Changed FORMAT for M Address from '00' to '#0' in Forms Default Formats dialog.
Added EOR EOL at StartSub.
Activated UseSeparateSubCalls and SetMaxSeparateSubCalls at setup and initializations.
Changed SetMaxRPM value from 10000 to 8000 at setup and initializations.
Added Rapid AbsOrInc 'G49G28Z0' at FirstOperation, NewTool, SameTool and end of Prog.
Deleted literal 'G28Z' at NewTool, SameTool and end of Prog.
Deleted Rapid and Moved GetSpinOn at FirstOperation, NewTool, SameTool and end of Prog.
Deleted PreTool at FirstOperation and NewTool.
Added SpinOff at NewTool, SameTool and end of Prog.
Added OpToolID at NewTool.
Modified to output CRCOff and CoolOff on separate blocks.
Changed Rapid FirstHome to literal 'G30X0Y0' at end of Prog.
DWB}

{12/9/93
Copied & modified: Mit Meldas 300 [PE] M548.81.2
For: CIM Solutions
Added program header blocks.
Moved CoolOn to OfstOn line.
Added ToolChng to 1st op, First Tool Not In Spindle.
Added PreTool, and other change to operation start up format per requests.
Modified CRCOffset to output Tool# + 20.
Modified end of tool and end of program formats, using IncValue OfstOff, M30.
Jim Radcliffe}

{7/26/96
Copied: Mit Meldas [MT] M634.81.2
Created: Mit Meldas [SM] B044.13.1
For: Schneider Manufacturing
Machine:
Control:
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 Tom Schneider, sample part, printouts and phone conversations.
Updated for Catalyst v3.05C per Fanuc 6M M001.13 Format
Most changes involved sample part combining MultipleParts, WorkFixtureOffsets, OneToolAllParts,
FullUp with PalletChanges.
DWB}

{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(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(FeedEntry#,4)
FORMAT(ADD#,5)
FORMAT(MUL#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Recall#,7)
FORMAT(PartNum#,7)

{Added 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

MPSubInit:
Save# Num#('2') Num#('1') { MPSubID }
RETURN

NewMPSub:
Save# Num#('2') ADD# Recall# Num#('2') Num#('1') { MPSubID }
RETURN

MPSubID:
Tool# Recall# Num#('2')
RETURN

OpenMPSub:
OpenSub
EOR EOL
FORMAT(Recall#,5)
'O' MPSubID EOL
IF UseComments? AND SubComment?
'( SUB NUMBER: ' MPSubID ' )' EOL
END
FORMAT(Recall#,7)
RETURN

MPSeq:
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
'N' Tool# Recall# Num#('1')
RETURN

CalcMPCSWFO:
IF AllToolsOnePart?
IF AAxisAvail? OR BAxisAvail?
Save# Num#('4') MUL# SUB# CS# Num#('2') MUL# Parts# Num#('4')
Save# Num#('4') SUB# Recall# Num#('4') MUL# Parts# Num#('4')
ELSE
Save# Num#('4') MUL# Parts# Num#('4')
END
ELSE
IF FirstPart?
SeqC 'M11' EOL { UnClamp }
SeqC AbsValue Rapid 'B' CSOffsetB# EOL
SeqC 'M10' EOL { Clamp }
IF AAxisAvail? OR BAxisAvail?
Save# Num#('4') MUL# SUB# CS# Num#('2') MUL# Parts# Num#('4')
ELSE
Save# Num#('4') MUL# Parts# Num#('4')
END
Save# Num#('4') SUB# Recall# Num#('4') MUL# Parts# Num#('4')
ELSE
Save# Num#('4') ADD# Recall# Num#('4') Num#('4')
END
IF Flag?('8') { RestoreMPCSWFO }
SetFlagF('8')
Save# Num#('5') Recall# Num#('4')
END
END
RETURN

CSWFONum:
IF GTEqual? ADD# Recall# Num#('6') Recall# Num#('4') Num#('200')
Save# Num#('4') ADD# Recall# Num#('4') Num#('300')
END
SeqC '#5221=#' ADD# Recall# Num#('4') ADD# Recall# Num#('6') Num#('0') EOL
SeqC '#5222=#' ADD# Recall# Num#('4') ADD# Recall# Num#('6') Num#('1') EOL
SeqC '#5223=#' ADD# Recall# Num#('4') ADD# Recall# Num#('6') Num#('2') EOL
SeqC '#5224=#' ADD# Recall# Num#('4') ADD# Recall# Num#('6') Num#('3') EOL
IF GTEqual? ADD# Recall# Num#('6') Recall# Num#('4') Num#('500')
Save# Num#('4') SUB# Recall# Num#('4') Num#('300')
END
RETURN

RestoreMPCSWFO:
SeqC '(0 DEGREES)' EOL
SeqC 'M11' EOL { UnClamp }
SeqC AbsValue Rapid 'B0.' EOL
SeqC 'M10' EOL { Clamp }
Save# Num#('4') Recall# Num#('5')
CSWFONum
RETURN

MPSubCall:
FORMAT(Recall#,5)
SeqC SubCall 'P' Tool# Recall# Num#('3') EOL
FORMAT(Recall#,7)
RETURN

PalletProgID1:
Save# Num#('13') ADD# Recall# Num#('13') Num#('1')
'O' MUL# Recall# Num#('13') Num#('1000')
RETURN

NewPallet: {Start new Pallet}
Save# Num#('5') Num#('0') { RestoreMPCSWFO }
SetFlag('8') { RestoreMPCSWFO }
SeqC EndSub EOL
EOR EOL
PalletProgID1
IF UseComments?
'('
IF ProgramNameComment?
ProgramName$
END
')'
END
EOL
IF UseComments?
SetScale('1')
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
RestoreScale
END
SeqC Rapid PlaneC IncValue 'G30X0.Y0.Z0.' EOL
RETURN

GetSpinOn:
IF Drilling? AND Tap?
ELSE
SpeedC
IF SameTool?
IF LAST ProgStop?
SpinOn
END
ELSE
SpinOn
END
END
RETURN

{Prog Subroutines ****}

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
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
{ ToolComment$ moved to FirstOperation and NewTool. }
RestoreScale
END
RETURN

CSWFO:
IF AAxisAvail? OR BAxisAvail?
Save# Num#('4') MUL# Num#('4') ADD# SUB# CS# Num#('2') SUB# NewWFO# Num#('1')
Save# Num#('4') SUB# Recall# Num#('4') Num#('4')
ELSE
Save# Num#('4') MUL# Num#('4') SUB# NewWFO# Num#('1')
END
CSWFONum
RETURN

CalcCSWFO: {(iPart-1)*NumOfCS#)}
IF AAxisAvail? OR BAxisAvail?
Save# Num#('4')
MUL# Num#('4')
ADD#
MUL# NumOfCS# SUB# PartNum# Num#('1')
ADD# SUB# CS# Num#('2') SUB# NewWFO# Num#('1')
Save# Num#('4') SUB# Recall# Num#('4') Num#('4')
ELSE
Save# Num#('4') MUL# Num#('4') ADD# SUB# PartNum# Num#('1') SUB# NewWFO# Num#('1')
END
CSWFONum
RETURN

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

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B' 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
PalletInF
PalletOutF
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
EOR EOL
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:
IF Flag?('2') OR WFOCS?
IF Flag?('2')
NewProg
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE { WFOCS }
IF AllToolsOnePart?
NewProg
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
MPSubInit
OpenMPSub
SaveCSOpStart
ClearCSOffset
END
END
ELSE
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO {simple eachPart}
SeqC SetWFO EOL
SeqC SubCall CallLab 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')
IF Flag?('2')
NewWFO
EachWFO {simple eachPart}
SeqC SetWFO EOL
EachCSOp
DoCSG52Comment
ClearCSOffset
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
SeqC SubCall CallLabB CSSubID# EOL
NextCSOp
ClearCSOffset
IncWFO
NextWFO {simple NextPart}
ELSE
IF AllToolsOnePart?
NewWFO
EachWFO {simple eachPart}
EachCSOp
DoCSWFOComment
ClearCSOffset
CalcCSWFO
SeqC SubCall CallLabB CSSubID# EOL
NextCSOp
ClearCSOffset
IncWFO
NextWFO {simple NextPart}
ELSE
Save# Num#('1') Num#('0') { MPSeq }
Save# Num#('3') Num#('0') { MPSubCall }
Save# Num#('4') Num#('0') { CalcMPCSWFO }
EachCSOp
Save# Num#('3') ADD# Recall# Num#('3') Num#('1') { MPSubCall }
EachPart
DoCSWFOComment
ClearCSOffset
MPSeq '(' CSOffsetB# ' DEGREES)' EOL
CalcMPCSWFO
CSWFONum
MPSubCall
NextPart
NextCSOp
ClearCSOffset
RestoreMPCSWFO
END
END
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# EOL
NextCSOp
ELSE
EachCSOp
DoCSWFOComment
ClearCSOffset
CalcCSWFO
SeqC SubCall CallLabB CSSubID# EOL
NextCSOp
END
ClearCSOffset
DecWFO
NextPrevWFO {simple NextPart}
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
Save# Num#('4') MUL# Num#('4') SUB# NewWFO# Num#('1')
CSWFONum
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
END
RETURN

SubCSMP:
IF Flag?('2') OR WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
IF AllToolsOnePart?
NewProg
StartSub
SaveCSProg
ELSE
NewMPSub
OpenMPSub
END
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
MoveXY MoveZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN

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

FormatLine:
DoAbsOrInc ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
IF Flag?('5')
SetFlagF('5')
IF Flag?('6')
SetFlagF('6') { CRCOffsetC 2nd Flag }
'D' ADD# Tool# Num#('20') {CRCOffsetC}
END
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?
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?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC IncValue StrtPosC EOL
AbsOrInc
END
END
SeqC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
SeqC IncValue StrtPosC EOL
AbsOrInc
END
IF FeedEntry?
SeqC ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
SeqC RapidC ZInPlusInc EOL
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

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('8000')
SetMaxFeed('500')
Save# Num#('1') Num#('0') { MPSeq }
Save# Num#('2') Num#('1') { MPSubID }
Save# Num#('3') Num#('0') { MPSubCall }
Save# Num#('4') Num#('0') { CalcMPCSWFO }
Save# Num#('5') Num#('0') { RestoreMPCSWFO }
Save# Num#('6') Num#('100') { MPPalletWFO Register Variables }
Save# Num#('11') Num#('1') { MPPalletWFO Register Variables }
Save# Num#('12') Num#('0') { MPPalletWFO Register Variables }
Save# Num#('13') Num#('0') { PalletProgID1 }
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}
SetFlagF('4') {True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') {True = need CRCOffset }
SetFlagF('6') { CRCOffsetC 2nd Flag }
SetFlagF('7') { PalletInF at Start }
SetFlag('8') { RestoreMPCSWFO }
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
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('52')
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#('52') {****}
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:
IF Milling?
IF CutterRadiusCompensation?
SetFlag('6') { CRCOffsetC 2nd Flag }
END
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 ZCP3C FeedEntC EOL
ELSE
SeqC RapidC ZCP3C EOL
END
END
SetFlagF('6') { CRCOffsetC 2nd Flag }
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC DrillCP EOL
GetCycle
SeqC Cycle StrtPos ZDepth RLevel Dwell Peck Retract
IF Tap?
'E' FeedEntry# SpeedC
ELSE
FeedEnt
END
EOL
IF CallMasterOp?
SeqC SubCall CallLabB 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 ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

DefaultWFO:
IF NOT SameTool?
IF NeedWFO1?
Save# Num#('4') MUL# Num#('4') SUB# NewWFO# Num#('1')
CSWFONum
END
END
RETURN

DoCSG52:
DoCSG52Comment
DefaultWFO
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
RETURN

DefaultCSG52:
IF NOT SameTool?
DoCSG52
END
RETURN

DefaultCSWFO:
IF NOT SameTool?
SeqC CSWFO EOL
END
RETURN

WFOStuff:
IF MultipleParts?
IF NOT WorkFixtureOffsets?
DefaultWFO
END
ELSE
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
SeqC CSWFO EOL
ELSE
DefaultCSWFO
END
ELSE
IF ChangeCS?
DoCSG52
ELSE
DefaultCSG52
END
END
ClearCSOffset
END
RETURN

InitOp:
DoPostScript
EOR EOL
IF PalletIn?
PalletProgID1
SetFlag('7') { PalletIn at Start }
ELSE
ProgID1
END
SetProgNum('699')
IF UseComments?
'('
IF ProgramNameComment?
ProgramName$
END
')'
END
EOL
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
SeqC Rapid Plane IncValue 'G30X0.Y0.Z0.' EOL
RETURN

FirstOp1:
'N' Tool# OpToolID '('
IF UseComments?
IF ToolComment?
ToolComment$
ELSE
'No ToolComment$'
END
END
')' EOL
DoOpComments
SeqC ToolChng
IF NOT LastTool?
PreTool
END
EOL
RETURN

FirstOp2:
SeqC GetSpinOn EOL
RETURN

FirstOp3:
CheckPass
SeqC Rapid PlaneC AbsOrInc StrtPos CSAngleA CSAngleB EOL
RETURN

FirstOp4:
SeqC OfstOn CoolOn EOL
RETURN

NewToolOp1:
SeqC CRCOff EOL
SeqC CoolOff EOL
Rapid
IF AbsoluteMoves?
SeqC IncValue OfstOff EOL
SeqC AbsValue EOL
ELSE
SeqC OfstOff EOL
END
RETURN

NewToolOp2:
DoEndOpPS
SeqC SpinOff EOL
IF PalletOut?
IF AbsoluteMoves?
SeqC Rapid AbsValue 'X0.Y0.' EOL
END
SeqC Rapid 'G28X0.Y0.' EOL
ELSE {ToolChangeAtHome}
SeqC Rapid
IF AbsoluteMoves?
IncValue
END
'G30X0.Y0.Z0.' EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
IF PalletOut?
NewPallet
END
'N' Tool# OpToolID '('
IF UseComments?
IF ToolComment?
ToolComment$
ELSE
'No ToolComment$'
END
END
')' EOL
DoOpComments
SeqC ToolChng PreTool EOL
DoPostScript
RETURN

NewToolOp4:
SeqC GetSpinOn EOL
RETURN

NewToolOp5:
CheckPass
SeqC Rapid PlaneC AbsOrInc StrtPos CSAngleA CSAngleB EOL
RETURN

NewToolOp6:
SeqC OfstOn CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC CRCOff EOL
SeqC CoolOff EOL
Rapid
IF AbsoluteMoves?
SeqC IncValue OfstOff EOL
SeqC AbsValue EOL
ELSE
SeqC OfstOff EOL
END
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
SeqC CRCOff EOL
IF NewToolOffset? OR ChangeCS?
Rapid
IF AbsoluteMoves?
SeqC IncValue OfstOff EOL
SeqC AbsValue EOL
ELSE
SeqC OfstOff EOL
END
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
SeqC Rapid PlaneC AbsOrInc StrtPos CSAngleA CSAngleB EOL
IF LAST ProgStop?
SeqC OfstOn CoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
SeqC GetSpinOn EOL
RETURN

End1:
SeqC CRCOff EOL
SeqC CoolOff EOL
Rapid
IF AbsoluteMoves?
SeqC IncValue OfstOff EOL
SeqC AbsValue EOL
ELSE
SeqC OfstOff EOL
END
RETURN

End2:
DoEndOpPS
SeqC SpinOff EOL
{FIRST ToolChangeAtHome}
IF AbsoluteMoves?
SeqC Rapid AbsValue 'X0.Y0.' EOL
SeqC Rapid IncValue 'G28X0.Y0.' EOL
ELSE
SeqC Rapid 'G28X0.Y0.' EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqC Rapid
IF AbsoluteMoves?
AbsValue
END
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
SeqC Preset
IF AAxisAvail?
'A0.'
END
IF BAxisAvail?
'B0.'
END
EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

End3:
IF Flag?('7') { PalletIn at Start }
SeqC EndSub EOL
ELSE
SeqC EOP EOL
END
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}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
OpenMP
FirstOp1
WFOStuff
FirstOp3
FirstOp4
FirstOp2
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
WFOStuff
NewToolOp5
NewToolOp6
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
WFOStuff
OpenMP
FirstOp3
FirstOp4
FirstOp2
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
WFOStuff
OpenMP
NewToolOp5
NewToolOp6
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
WFOStuff
FirstOp4
FirstOp2
OpenMP
FirstOp3 {can't XY position before WFO}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
WFOStuff
NewToolOp6
NewToolOp4
OpenMP
NewToolOp5 {can't XY position before WFO}
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseMP {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
WFOStuff
FirstOp3
FirstOp4
FirstOp2
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
WFOStuff
NewToolOp5
NewToolOp6
NewToolOp4
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
WFOStuff
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
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:
Mit Meldas 300 [SM] MT99 16 1
Mit Meldas 300 [SM] NMQ41 16 1
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 M520 MZ72 89 5m
Mit Meldas 300 [PE] M548 89 1
Mit Meldas 520L DP [IP] L669 85
Mit Meldas L3 [SSD] L489 85
Mit Meldas 50L L496 85
Mit Meldas 50L [PEP] L492 85 9

więcej podobnych podstron