{5/2/90, Updated: Fadal (Coh) M212.55 to .71.2 format, JR} {7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB} {11/14/90, Updated: Fadal (Coh) M212.72 to .76.1 format, standard CRC stuff, JR}
{4/03/91 Modified: Fadal (Coh) M212.76.1 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.80 Format. DWB}
{* 11/3/93 [cwh] Modeified: Fadal (Coh) M212.79 To: Fadal (Coh) M212.79.1 For: Gibbs and Associates
Modified the form so that it could be used with the 32MP and 32MPOL versions of Catalyst ( Virtual ). *}
{7/19/95, Updated Fadal (Coh) M212.79.1 to .85 format per Fadal (AEM) M332.85, JR}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{4/10/96, Updated to C Style Adv Mill post, TH}
{Prog Numeric Format Definitions *******************************************}
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? SeqLab '* SUB NUMBER: ' Program# EOL END RETURN
DoOpComments: IF UseComments? SetScale('1') IF OperationIDComment? SeqLab '* OPERATION ' Operation# ': ' OperationType$ EOL END IF OperationComment? SeqLab '* ' OperationComment$ EOL END IF WorkGroupComment? SeqLab '* ' WorkGroupComment$ EOL END IF ToolTypeComment? SeqLab '* ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL END IF ToolComment? SeqLab '* ' ToolComment$ EOL END RestoreScale END RETURN
CSAngleA: IF AAxisAvail? 'A' IF FirstOperation? IF LessThan? CSOffsetA# Num#('0') '-' END ELSE IF LessThan? CSOffsetA# LAST CSOffsetA# '-' END END Save# Num#('1') TRUNC# DIV# CSOffsetA# Num#('360') IF LessThan? CSOffsetA# Num#('0') Save# Num#('1') SUB# Recall# Num#('1') Num#('1') END SUB# CSOffsetA# MUL# Recall# Num#('1') Num#('360') END RETURN
CSAngleAC: IF AChange? CSAngleA END RETURN
CSAngleB: IF BAxisAvail? 'B' IF FirstOperation? IF LessThan? CSOffsetB# Num#('0') '-' END ELSE IF LessThan? CSOffsetB# LAST CSOffsetB# '-' END END Save# Num#('1') TRUNC# DIV# CSOffsetB# Num#('360') IF LessThan? CSOffsetB# Num#('0') Save# Num#('1') SUB# Recall# Num#('1') Num#('1') END SUB# CSOffsetB# MUL# Recall# Num#('1') Num#('360') END RETURN
SubWarning: IF NOT FeedConnect? IF AnyZshift? ' ' EOL SeqLab '* WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL ' ' EOL END END RETURN
FinishSub1: {part 1} SeqLab CRCOffC IF NOT FeedConnect? IF AutoCycle? ZCP3C ELSE IF FIFO? {.81} FeedC ZCP3C FeedEntC ELSE RapidC ZCP3C END END END EOL RETURN
SubCSMP: IF WFOCS? IF ChangeCS? SeqLab 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? SeqLab AbsValue EOL END RETURN
CkCRC: IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets } IF NOT ZMove? AND NOT LastFeat? CRCOnC IF NOT EmptyLine? ResetCRCNum END END END IF LastFeat? AND EmptyLine? AND NOT ArcFeat? { Exit Length Feature } CRCOffC END RETURN
FormatArc: DoAbsOrInc IF ArcCW? CWArcC ELSE CCWArcC END MoveXYZC IF ArcIJFormat? ArcIJC ELSE ArcRC END RETURN
StdLine: {enables CRC on first call, .70} IF Decelerate? IF RoomToDecel? DecelMove1 SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL DecelMove2 END SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL END END RETURN
ToolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqLab MoveSXYC EOL SeqLab CallLab OnePart EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLab DoDrillAbsOrInc MoveSXYZC EOL {.80.01} END ELSE IF RapidFeat? IF LastFeat? AND AutoCycle? {.70} SeqLab DoAbsOrInc CRCOffC RapidC MoveXYZC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLab DoAbsOrInc RapidC MoveXYZC EOL END END ELSE IF LineFeat? IF AutoCycle? {.70} IF LastFeat? SeqLab DoAbsOrInc CRCOffC FeedC MoveXYZC FeedRateC EOL ELSE IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps} SeqLab DoAbsOrInc FeedC MoveXYZC FeedRateC EOL ELSE StdLine {enables CRC on first call} END END ELSE StdLine END ELSE IF ArcFeat? EACHQuadrant IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqLab FormatArc ArcFeedC EOL DecelMove2 END SeqLab FormatArc DecelFeed EOL ELSE SeqLab FormatArc ArcFeedC EOL END NEXTQuadrant END END END END NEXTFeat RestoreAbsOrInc RETURN
AutoCycCutSub2: {part 2} ToolPath SeqLab AbsOrInc IF Repeats? AND FeedConnect? AND ZshiftOnly? {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath} ELSE IF FIFO? {.81} FeedC ZCP2 FeedEntC ELSE RapidC ZCP2 END END EOL SeqLab 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
ZonlyRepAutoCycle: AutoCycPat {write pattern moves and main calls} StartSub NewProg EachCycle SetSRXYtoEP IF FeedConnect? IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLab Feed IncValue StrtPosC EOL SeqLab AbsOrInc ELSE SeqLab Feed END ELSE SeqLab Feed END ZInPlusInc FeedEnt EOL ELSE IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLab Rapid IncValue StrtPosC EOL IF FeedEntry? SeqLab AbsOrInc ZCP2PlusInc EOL SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab AbsOrInc ZInPlusInc EOL END ELSE IF FeedEntry? SeqLab Rapid ZCP2PlusInc EOL SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab Rapid ZInPlusInc EOL END END ELSE IF FeedEntry? SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab Rapid ZInPlusInc EOL END END END IF FirstCycle? SetStatusOff {protect Z position for incremental sub} END SeqLab CallLab OnePart EOL NextCycle SetStatusOn AutoCycCutSub1 {build element sub} AutoCycCutSub2 IF FeedConnect? {there is no Z up in the sub, .69} IF FIFO? {.81} SeqLab Feed ZCP2 FeedEnt EOL {.69} ELSE SeqLab Rapid ZCP2 EOL {.69} END END {.69} SeqLab EndSub EOL CloseSub RETURN
ZonlyRep: EachCycle IF NOT FirstCycle? SeqLab Connect StrtPos EOL END IF FeedConnect? SeqLab FeedC ZInPlusInc FeedEnt EOL ELSE IF FeedEntry? IF NOT FirstCycle? SeqLab RapidC ZCP2PlusIncC EOL END SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab RapidC ZInPlusInc EOL END END SeqLab CallLab OnePart EOL NextCycle StartSub TrackZNO# FIRST SPZ# ToolPath FinishSub1 SeqLab EndSub EOL CloseSub RETURN
CheckPass: IF AutoCycle? {use the correct StrtPos} SetPass2 ELSE SetPass1 END RETURN
SkipToLastFeat: EachFeat IF LastFeat? TrackXNO# SPX# TrackYNO# SPY# END NextFeat RETURN
SetDrillEndOpZ: IF RetractToCP1? TrackZNO# ClearancePlane1# ELSE TrackZNO# ClearancePlane2# END RETURN
ProgStart: InitProg ReverseXZArcs InitWFONum SetFlood UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('10000') SetMaxFeed('500') SetFlagF('1') { Milling ZShiftOnly SepSubs } 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#('40') SetWFOCS { use WFO for CS changes } ELSE IF UseComments? SeqLab '* Not enough Work Fixture Offsets to handle this part.' EOL SeqLab '* Number of parts ( ' Parts# ' ) times CSs ( ' NumOfCS# ' )' EOL SeqLab '* exceeds the machine limit. Switching to non-WFO output.' EOL END END END ELSE IF LTEqual? NumOfCS# Num#('40') {****} SetWFOCS { use WFO for CS changes } ELSE IF UseComments? SeqLab '* Not enough Work Fixture Offsets to handle this part.' EOL SeqLab '* Number of CSs ( ' NumOfCS# ' ) exceeds the machine limit.' EOL SeqLab '* Switching to non-WFO 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? SeqLab 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? SeqLab ZCP3C EOL ELSE IF FIFO? {.81} SeqLab FeedC CRCOffC ZCP3C FeedEntC EOL ELSE SeqLab RapidC CRCOffC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqLab AbsOrInc Rapid StrtPos EOL END SeqLab DrillCP EOL IF Tap? SeqLab GetCycle Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FadalTapF FadalTapQ EOL ELSE SeqLab GetCycle Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL END IF CallMasterOp? SeqLab 'L' CallMasterNum# '01' EOL SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqLab CallLab '01' EOL StartSub ToolPath SeqLab EndSub EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ SeqLab Rapid 'G80' ZCP3 EOL IF Repeats? FinishSubG92 END END END RETURN
NotSameToolWFO: IF WFOCS? IF ChangeCS? DoCSWFOComment ClearCSOffset SeqLab CSWFO EOL ELSE ClearCSOffset { 11/8/94 } SeqLab CSWFO EOL END ELSE IF NeedWFO1? SeqLab 'E' NewWFO# EOL END END RETURN
SameToolWFO: IF WFOCS? IF ChangeCS? DoCSWFOComment ClearCSOffset SeqLab CSWFO EOL ELSE ClearCSOffset { 11/8/94 } END END RETURN
InitOp: EOR EOL SeqLab 'O' Program# IF UseComments? AND ProgramNameComment? '*' ProgramName$ END EOL SetProgNum('0') IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramComment? SeqLab '* ' ProgramComment$ EOL END IF FormatNameComment? SeqLab '* FORMAT: ' FormatName$ EOL END IF TimeComment? SeqLab '* ' Date$ ' AT ' Time$ EOL END IF MovesComment? SeqLab '* OUTPUT IN ' MoveType$ ' INCHES' EOL END IF PartsComment? SeqLab '* PARTS PROGRAMMED: ' Parts# EOL END IF StartToolComment? SeqLab '* FIRST TOOL NOT IN SPINDLE' EOL END END OpenSub RestoreScale RETURN
SameToolOp1: DoEndOpPS IF LAST ProgStop? SeqLab CoolOff EOL SeqLab SpinOff EOL SeqLab 'M00' EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqLab CoolOff EOL END END RETURN
SameToolOp2: {Start new Operation} DoOpComments DoPostScript CheckPass RETURN
SameToolOp3: {Start new Operation} IF LAST ProgStop? SeqLab SpeedC SpinOn EOL SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL SeqLab OfstOn EOL SeqLab CoolOn EOL ELSE IF NewToolOffset? OR ChangeCS? SeqLab PlaneC AbsOrInc Rapid StrtPos SpeedC CSAngleA CSAngleB EOL SeqLab OfstOn EOL ELSE SeqLab PlaneC AbsOrInc Rapid StrtPos SpeedC CSAngleA CSAngleB EOL END IF NOT CoolOff? AND LAST CoolOff? SeqLab CoolOn EOL END END RETURN
End1: RETURN
End2: DoEndOpPS SeqLab CoolOff EOL IF FIRST ToolChangeAtHome? SeqLab AbsOrInc Rapid FirstHome SpinOff EOL ELSE SeqLab SpinOff EOL END
IF NotEqual? CSOffsetA# Num#('0') IF AAxisAvail? SeqLab CSAngleA END IF BAxisAvail? SeqLab CSAngleB END EOL
SeqLab Preset IF AAxisAvail? 'A0' END IF BAxisAvail? 'B0' END EOL ELSE IF NotEqual? CSOffsetB# Num#('0') IF AAxisAvail? SeqLab CSAngleA END IF BAxisAvail? SeqLab CSAngleB END EOL
SeqLab Preset IF AAxisAvail? 'A0' END IF BAxisAvail? 'B0' END EOL END END IF ProgStop? SeqLab 'M00' EOL END RETURN
End3: SeqLab 'G49H0Z0' EOL SeqLab 'E0' EOL SeqLab EOP EOL EndSubs Post EOR EOL 'BYE' EOL Close Reseq IF UseComments? SetScale('1') 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 FirstOp2 FirstOp3 ELSE IF NewTool? NewToolOp1 NewToolOp2 {to tool change, CS problem} SubCSMP NewToolOp3 NewToolOp4 NewToolOp5 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 FirstOp2 OpenMP FirstOp3 ELSE IF NewTool? NewToolOp1 CloseMP NewToolOp2 {to tool change, CS problem} NewToolOp3 NewToolOp4 OpenMP NewToolOp5 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 FirstOp2 FirstOp3a OpenMP SeqLab StrtPos CSAngleA CSAngleB EOL ELSE IF NewTool? CloseMP NewToolOp1 NewToolOp2 {to tool change, CS problem} NewToolOp3 NewToolOp4 NewToolOp5a OpenMP SeqLab StrtPos CSAngleA CSAngleB EOL 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 NotSameToolWFO FirstOp2 FirstOp3 ELSE IF NewTool? NewToolOp1 NewToolOp2 NewToolOp3 NotSameToolWFO NewToolOp4 NewToolOp5 ELSE {implied SameTool?} SameToolOp1 SameToolOp2 SameToolWFO 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