{10/11/95 Initial: Dynapath 20M [V] M074.85 Created: Dynapath 40M Mxxx.85 ForUser: Gibbs & Associates Control: Dynapath 40M Machine: ???? Generic Processor Develop: ComPost 4.21.33, Catalyst v2.26C Comment: Modifications made per Dennis Ridolfi at Autocon Technologies Added O plane to drilling to support RetractToCP1. Changed ToolOfst label to H. Added Default format for H. Added CRCOffsetC label D. Added Default format for D. Added OpToolID ToolChng lines. Added CRCOffsetC to ToolOfst lines. Jim Radcliffe}
{11/2/95 Modified: Dynapath 40M M870.85 For: Gibbs & Associates Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.08/Catalyst v2.28.04/Compost 4.21.33/1.0a Various necessary minor changes, too numerous to list due to time constraints. DWB}
{1/17/96, Updated .85 to .86 version, MPK}
{3/22/96, Tested zonlyRepAutoCycle, Changed version # to .89, MPK}
{7/10/96 Initial: Dynapath 40M M870.89 Created: Dynapath 40M Mxxx.89 Changed tool offset format to Taabb: aa=tool# bb=offset# (offset# handles both length and radius) modified pecking to output a q value for Full Out, added rigid tapping, MPK}
{1/23/97, Initial: Dynapath 40M [CP] M141.89 Created: Dynapath 40M [WM] Mxxx.89 For: Wire Maid deleted CRC stuff, deleted use of Flag('2'), added a new version of ckCRC, using Flag('3') to track whether CRC is turned on or not. CRC turns on with a incremental move of X0.Y0. The control requires both X and Y coordinates in order to turn on CRC. ckCRC also handles turning off CRC. Moved Speed and Program Stop stuff to after tool change per customer request. Added logic to check whether the Tool# = ToolOffset# and output a literal 'T' and theToolOffset# if they are not equal in FirstOperation? and NewTool?. The control by default uses the offset# that is equal to the Tool# that is called (this offset covers both length offset and CRC offset), if a different offset is desired it must be output as a 'T' with the offset# desired. NOTE: Had to add extra SetFlagF('3') at beginning of Toolpath, though the one in the program inits should still be in effect, the boolean sometimes evaluated true when it shouldn't for some reason without the one in toolPath MPK}
{2/6/97, Initial: Dynapath 40M [WM] MY15.89 Created: Dynapath 40M [WM] MY15.89.1 Made sure that all occurances of G90/G91 are on their own line, Put ckCRC on its own line before DoAbsorInc in all occurances in toolPath, Added turnCRCOff sub to handle outputing an incremental zero length move when canceling CRC, modified ckCRC to output a zero length move with a CRCoff command the line before activating CRC, further modified and streamlines ckCRC, MPK}
{7/15/97 Initial: Dynapath 40M [WM] MY15.89.1 Created: Dynapath 40M [SP] Mxxx.89 ForUser: Stellar Products Control: Dynapath 40M Machine: Chevalier 3 axis Vertical Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.35 PPC Comment: New processor per notes and edited output from Douglas Brown. Modified program start up saftey start blocks. Added SpinOff at end of tools. Moved ToolChng to be on line before OpToolID. Added ToolChng to end of program. Changed M codes to output 2 digits. Jim Radcliffe}
{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
get$: { For conversational output } IF NOT EmptyLine? '$' END RETURN
doSubComment: IF UseComments? AND SubComment? SeqLab '(T) SUB NUMBER ' Tag# get$ EOL END RETURN
doOpComments: IF UseComments? SetScale('1') IF OperationIDComment? SeqLab '(T) OPERATION ' Operation# ' ' OperationType$ get$ EOL END IF OperationComment? SeqLab '(T) ' OperationComment$ get$ EOL END IF WorkGroupComment? SeqLab '(T) ' WorkGroupComment$ get$ EOL END IF ToolTypeComment? SeqLab '(T) TOOL# ' Tool# ' ' ToolDiameter# ' ' ToolType$ get$ EOL END IF ToolComment? SeqLab '(T) ' ToolComment$ get$ EOL END restoreScale END RETURN
doAbsOrInc: IF Flag?('1') { AbsoluteMoves? = TRUE } IF ZMove? AND AbsValue? IncValue ELSE IF NOT ZMove? AND NOT AbsValue? AbsValue END END END RETURN
doDrillAbsOrInc: IF Flag?('1') { AbsoluteMoves? = TRUE } IF SPZMove? AND AbsValue? IncValue ELSE IF NOT SPZMove? AND NOT AbsValue? AbsValue END END END RETURN
restoreAbsOrInc: IF Flag?('1') AND NOT AbsValue? { AbsoluteMoves? = TRUE } SeqLab AbsValue EOL END RETURN
formatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXYZC ArcIJ RETURN
ckCRC: IF NOT LastFeat? AND NOT ZMove? AND CutterRadiusCompensation? IF NOT Flag?('3') { CRCOff } SetFlag('3') FeedC EOL IF NOT AutoCycle? SeqLab IncValue EOL SeqLab CRCOff 'X0.Y0.' EOL SeqLab CRCOn 'X0.Y0.' EOL SeqLab AbsValue EOL ELSE SeqLab CRCOff 'X0.Y0.' EOL SeqLab CRCOn 'X0.Y0.' EOL END END END RETURN
ckCRCNum: { Not supported } RETURN
turnCRCOff: IF Flag?('3') {CRC is currently turned on} SetFlagF('3') { CRC is off } SeqLab FeedC EOL IF NOT AutoCycle? SeqLab IncValue EOL SeqLab CRCOff MoveXY EOL SeqLab AbsValue EOL ELSE SeqLab CRCOff MoveXY EOL END END RETURN
toolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqLab MoveSXYC EOL SeqLab '(7)FÅ‚' Tag# 'L²' Tag# get$ EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLab doDrillAbsOrInc EOL SeqLab MoveSXYZC EOL END ELSE IF RapidFeat? IF XMove? OR YMove? OR ZMove? IF CutterRadiusCompensation? AND Flag?('2') ckCRC SeqLab doAbsOrInc EOL SeqLab FeedC MoveXYZC RapidFC EOL ELSE ckCRC SeqLab doAbsOrInc EOL SeqLab RapidC MoveXYZC EOL END END ELSE IF LineFeat? IF XMove? OR YMove? OR ZMove? IF Decelerate? IF RoomToDecel? DecelMove1 ckCRC SeqLab doAbsOrInc EOL SeqLab FeedC FeedRateC EOL DecelMove2 SeqLab doAbsOrInc EOL END ckCRC SeqLab doAbsOrInc EOL SeqLab FeedC MoveXYZC DecelFeed EOL ELSE SeqLab ckCRC doAbsOrInc EOL SeqLab FeedC MoveXYZC FeedRateC EOL END END ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } SeqLab doAbsOrInc EOL IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqLab formatArc ArcFeedC EOL DecelMove2 SeqLab doAbsOrInc EOL END SeqLab formatArc DecelFeed EOL ELSE SeqLab formatArc ArcFeedC EOL END NEXTQuadrant END END END IF LastFeat? { Exit Length Feature } TurnCRCOff {.70} END END NEXTFeat restoreAbsOrInc RETURN
wfoStuff: IF NewWFO? IF MultipleParts? EOL SeqLab '(T) ' get$ EOL SeqLab '(T) *** WARNING ***' get$ EOL SeqLab '(T) DO NOT USE' get$ EOL SeqLab '(T) NEWWFO() WITH' get$ EOL SeqLab '(T) NCPOST MULTIPLE' get$ EOL SeqLab '(T) PARTS!' get$ EOL SeqLab '(T) ' get$ EOL ELSE 'E' NewWFO# END ELSE IF NOT SameTool? IF NeedWFO1? 'E' NewWFO# END END END RETURN
autoCycCutSub2: {part 2} toolPath SeqLab AbsValue EOL IF Repeats? AND FeedConnect? AND ZshiftOnly? {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in toolPath} ELSE IF FIFO? {.81} SeqLab FeedC ZCP2 FeedEntC EOL ELSE SeqLab RapidC ZCP2 EOL END END '<' Tag# EOL CloseSub SetSRSubXY {restore SR to 1st position value} SetSRSubMove RETURN
autoCycPat: SetPass2 {position pattern} toolPath {call after TagInc for correct sub calls} SetPass1 {reset} RETURN
milling: IF AutoCycle? TagUp TagInc autoCycCutSub1 entryMove autoCycCutSub2 autoCycPat TagDown ELSE entryMove toolPath END RETURN
zonlyRepAutoCycle: autoCycPat {write pattern moves and main calls} startSub TagUp TagInc EachCycle SetSRXYtoEP IF FeedConnect? IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLab IncValue EOL SeqLab Feed StrtPosC EOL SeqLab AbsOrInc EOL SeqLab ELSE SeqLab Feed END ELSE SeqLab Feed END ZInPlusInc FeedEnt EOL ELSE IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLab IncValue EOL SeqLab Rapid StrtPosC EOL IF FeedEntry? SeqLab AbsOrInc EOL SeqLab ZCP2PlusInc EOL SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab AbsOrInc EOL SeqLab 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 '(7)FÅ‚' Tag# 'L²' Tag# get$ EOL NextCycle SetStatusOn autoCycCutSub1 {build element sub} autoCycCutSub2 {.69, removed finishSub1} 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} TagDown '<' Tag# EOL CloseSub {Element shift, not pattern} TagDown RETURN
zonlyRep: EachCycle IF NOT FirstCycle? SeqLab Connect StrtPos EOL {.71.2, added Connect} END IF FeedConnect? SeqLab FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC} ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqLab RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better} END SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better} END END SeqLab '(7)FÅ‚' Tag# 'L²' Tag# get$ EOL NextCycle startSub TrackZNO# FIRST SPZ# toolPath finishSub1 '<' Tag# EOL TagDown 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
{Start of executable Prog **************************************************}
{setup and initializations} InitProg TagInit ReverseXZArcs InitWFONum SetFlood UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('10000') SetMaxFeed('500') SetFlagF('1') { Milling ZShiftOnly SepSubs } SetFlagF('3') { false indicates that CRC is currently off } SetFlagF('4') { SubPrograms require 2nd M30 at end } IF PSComment? AND UseComments? SeqLab '(T) PostScript:' get$ EOL SeqLab '(T) Literals: put between single or double quotes.' get$ EOL SeqLab '(T) Separate commands and literals with at least one space.' get$ EOL SeqLab '(T) A CR ( RETURN key ) will start a new line.' get$ EOL SeqLab '(T) Commands: may be capital and/or lower case letters. Separate commands with a space.' get$ EOL SeqLab '(T) EndOP -' get$ EOL SeqLab '(T) all literals and commands before an ENDOP command' get$ EOL SeqLab '(T) will appear at the beginning of the operation. All' get$ EOL SeqLab '(T) literals and commands after an ENDOP command will appear' get$ EOL SeqLab '(T) at the end of the operation.' get$ EOL SeqLab '(T) NewWFO(56), NWFO(56) -' get$ EOL SeqLab '(T) The Work Fixture Offset # you specify will be used for all following operations.' get$ EOL SeqLab '(T) Do not use with the ncPost multiple part option.' get$ EOL SeqLab '(T) 4thAxisCW(12.5), 4ACW(12.5) -' get$ EOL SeqLab '(T) generates a + A move of the value you specify' get$ EOL SeqLab '(T) 4thAxisCCW(22.5), 4ACCW(22.5) -' get$ EOL SeqLab '(T) generates a - A move of the value you specify' get$ EOL SeqLab '(T) 5thAxisCW(30), 5ACW(30) -' get$ EOL SeqLab '(T) generates a + B move of the value you specify' get$ EOL SeqLab '(T) 5thAxisCCW(22.5), 5ACCW(22.5) -' get$ EOL SeqLab '(T) generates a - B move of the value you specify' get$ EOL END EachOp {Start of post processing *********************} IF FirstOperation? '(' Program# ')' EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? SeqLab '(T) PROGRAM ' ProgramName$ get$ EOL END IF ProgramComment? SeqLab '(T) ' ProgramComment$ get$ EOL END IF FormatNameComment? SeqLab '(T) FORMAT ' FormatName$ get$ EOL END IF TimeComment? SeqLab '(T) ' Date$ ' AT ' Time$ get$ EOL END IF MovesComment? SeqLab '(T) OUTPUT IN ABSOLUTE INCHES' get$ EOL END IF PartsComment? SeqLab '(T) PARTS PROGRAMMED ' Parts# get$ EOL END IF StartToolComment? SeqLab '(T) FIRST TOOL NOT IN SPINDLE' get$ EOL END END OpenSub restoreScale IF MultipleParts? AND AllToolsOnePart? openMP END doOpComments doPostScript SeqLab Rapid wfoStuff EOL SeqLab Plane EOL SeqLab CRCOff EOL SeqLab DrillOff EOL SeqLab AbsValue EOL SeqLab ToolChng EOL SeqLab OpToolID EOL SeqLab 'M00' EOL IF NOT Equal? Tool# ToolOffset# SeqLab 'T' ToolOffset# EOL END SeqLab Speed SpinOn EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? openMP END checkPass SeqLab StrtPos EOL SeqLab ZCP1 EOL SeqLab CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? openMP SeqLab StrtPos EOL END ELSE IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? closeMP END SeqLab CoolOff EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? closeMP END doEndOpPS SeqLab SpinOff EOL
{Start new Operation}
doOpComments doPostScript SeqLab Rapid wfoStuff EOL SeqLab PlaneC EOL SeqLab AbsValue EOL SeqLab ToolChng EOL SeqLab OpToolID EOL IF NOT Equal? Tool# ToolOffset# SeqLab 'T' ToolOffset# EOL END IF LAST ProgStop? SeqLab 'M0' EOL ELSE IF OptionalStops? SeqLab ProgStop EOL END END SeqLab Speed SpinOn EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? openMP END checkPass SeqLab StrtPos EOL SeqLab ZCP1 EOL SeqLab CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? openMP SeqLab StrtPos EOL END ELSE IF SameTool? doEndOpPS IF LAST ProgStop? SeqLab CoolOff EOL SeqLab 'M0' EOL
{Start new Operation}
getStartOfSameTool SeqLab SpinOn EOL SeqLab Rapid StrtPos EOL SeqLab ZCP1 EOL SeqLab CoolOn EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqLab CoolOff EOL END IF NewToolOffset?
getStartOfSameTool SeqLab Rapid StrtPos EOL END IF NOT CoolOff? AND LAST CoolOff? SeqLab CoolOn EOL END END END END END {common point for all operations} IF MultipleParts? OR Repeats? OR AutoCycle? SetFlag('4') { SubPrograms require 2nd M30 at end } END IF Milling? SeqLab ZCP2C EOL IF Repeats? TagUp TagInc 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 ZCP3C FeedEntC EOL ELSE SeqLab RapidC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? TagUp TagInc stdSub SeqLab AbsValue EOL SeqLab Rapid StrtPos EOL END SeqLab DrillCP EOL GetCycle IF RigidTap? SeqLab 'G75' StrtPos ZDepth RLevel 'F' DIV# Num#('1') FeedTapIPR#('1') EOL ELSE SeqLab Cycle StrtPos ZDepth RLevel IF RetractToCP1? 'O' ClearancePlane1# END Dwell Peck IF Peck? 'Q' Retract# END FeedEnt EOL END IF CallMasterOp? SeqLab '(7)' 'FÅ‚' CallMasterNum# 'L²' CallMasterNum# get$ EOL skipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} SetFlag('4') { SubPrograms require 2nd M30 at end } TagUp NewMasterTag SeqLab '(7)FÅ‚' Tag# 'L²' Tag# get$ EOL startSub toolPath '<' Tag# EOL TagDown 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 NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? closeMP END SeqLab CoolOff EOL IF MultipleParts? AND OneToolAllParts? AND FullUp? closeMP END SeqLab CoolOff EOL doEndOpPS SeqLab SpinOff EOL IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier} SeqLab AbsValue EOL SeqLab Rapid FirstHome EOL END IF ProgStop? SeqLab 'M0' EOL END IF MultipleParts? AND AllToolsOnePart? closeMP END SeqLab ToolChng EOL SeqLab EOP EOL CloseSub Post2 {organize Subs into one program} IF Flag?('4') { SubPrograms exist } SetFlagF('4') SeqLab EOP EOL { This is required a second time, at end of all subs } END 'END' EOL Close ReTag IF UseComments? SetScale('1') {restore scale for comments} Reopen IF FileBytesComment? 'N9997(T) FILE LENGTH: ' FileBytes# ' CHARACTERS' get$ EOL END IF FileFeetComment? 'N9998(T) FILE LENGTH: ' FileFeet# ' FEET' get$ EOL END IF FileMetersComment? 'N9999(T) FILE LENGTH: ' FileMeters# ' METERS' get$ EOL END Close END