{from M001.57, 4/16/89 by WFG} {requested changes, 6/4/89, WFG} {added PostScript commands} {added PostScript command comments, use ncPost 3.10Ś9 or better} {removed run time comments} {added "must be all capital letters when typed in" to Postscript Command comment} {added metric, 6/25/89, WFG} {added Drill Surf and depth commands}
{7/24/90, Added InitProg globally to posts with this remark, DWB} {7/24/90, Deleted SetZSurf command at start of prog, DWB}
{8/30/90, Updated: Maho CNC 432 M194.57 to .76.1 format, JR}
{8/30/90 Copied & modifed: Maho CNC 432 M194.76.1 For: NIST Machine is a horizontal Maho with a vertical head. Changed: ' Z' ClearancePlane1# to ZCP1 Deleted: 'F1=1' Deleted: 'B0' Deleted: PreTool Changed: '%MM' to ASCII('04') Changed: G17 to G18 G18 to G17 Z to Y K to J Y to Z and change sign J to K and change sign Jim Radcliffe}
{4/2/91 Modified: Maho (NIST) M338.76.1 For: NIST Changed signs for X,Z,I & K values. Drilling problems fixed by switching labels Z & Y, changing sign on CalcCP2FmSurf#. Changed to "Format 1" looping for MPs & Repeats program calls. Deleted "' Y0. T0 M67'" lines, it does not send the tool full up. No known way to do a full up without an M6 command. Updated to .80 format. Jim Radcliffe}
{8/7/91 Copied & modified: Maho (NIST) M338.80 For: Machine Specialties Machine: Maho CNC 432 with Vertical Head Deleted 'START' from beginning of program. Moved Speed to StrtPos line. Changed M13 to M3 in MachSpec for SpinOn. Added CoolOn & CoolOff commands. Put Plane on line by itself. Moved WFOStuff to a line after ToolChng, output in 1st op only unless PostScript or MP. Added Rapid to StrtPos line. Added sub Index; contains indexer info deleted from PSStuff, 4th axis B only, modified PostScript comments accordingly, called on same line as WFOStuff. Added ' T0 M67' to end of program. Added WFOOff '' line to end of program. Deleted SpinOff. There is no CRC offset label, deleted CRCOffsetC. Cannot have 2 G codes on the same line: put CRCOnC on line by itself in StdLine, put CRCOffC on line by itself in ToolPath, put CRCOffC on line by itself in FinishSub1. put AbsOrInc on line by itself in AutoCycCutSub2. Modified FormatArc sub to handle helical moves. Minor corrections and clean up to .80 update. Jim Radcliffe}
{02/14/92 Modified: Maho VCNC 432 [MS] M489.80 (formerly: Maho HCNC 432 [MS] M452.80) Changed the ArcIJC to unconditional. Changed the 'I' format in the prog to remove the '*' which will enable the processor to read it as a normal number and not reverse the sign. Added IJFormat Sub to enable the output of the literals and helicalmoves with the Zmove or output was non-existent. Kim Michelman}
{3/20/92 Modified: Maho VCNC 432 [MS] M489.80.1 Added TrackZNO# EPZ# to correct ZMove? boolean. Customer was getting a J value on an arc move in a repeat Z only sub. Kim Michelman & Jim Radcliffe}
{3/20/92 Modified: Maho VCNC 432 [MS] M489.80.2 Changed back the 'I' format in the prog to replace the '*'. Kim Michelman & Jim Radcliffe}
{3/20/92 Modified: Maho VCNC 432 [MS] M489.80.3 Changed the Peck to read 'Q' in the form. Changed the Retract to read 'R' in the form for partial retract. [*THERE IS A BUG IN NCPOST THAT PREVENTS THE 'R' FROM BEING READ.] Kim Michelman}
{* ----- *} {* 6-22-92, [cwh] created from M489.80.4 reversed the signs on the X and Z formats in Default Formats section of Compost. *} {* 6-23-92, v.02, [cwh] changed all of the formats from four place percision to three. ( for Metric ) *} {* 6-24-92, v.03, [cwh] reversed the signs on the I and K formats in Default Formats section of Compost. changed M6 to M66 for manual tool changes. changed the F format to allow for four digit feedrates. changed the starting work fixture code from G54 to G56. removed T0 and last tool home positioning move. ( were literals at end of prog. ) *} {* ================================================== *}
{3/18/99 Updated: Maho VCNC 432 [IC] M505.81.3m Created: Maho VCNC 432 [IC] M505.89m For: Gibbs & Associates/Gimbel/Eric & Mogens Maskinvaerksted Versions: Virtual 5.09.22/ComPost2 1.7b15 Changes made per Martin Ravn of Gimbel, faxes dated3/8/99 Updated for Catalyst v5 per Fanuc 6M M001.89 Format. DWB}
{3/23/99 Copied: Maho VCNC 432 [IC] M505.89m Created: Maho VCNC 432 [E&M] MQ50.89m For: Eric & Mogens Maskinvaerksted Versions: Virtual 5.09.22/ComPost2 1.7b15 Changes made per Martin Ravn of Gimbel, faxes dated3/8/99 Changed Address F from ####.##;0. to ####0 in Compost2 Default Format dialog. Changed Change Tool from M66 to M6 in Compost2 Spindle And Coolant dialog. Changed End Program from M30 to M2 in Compost2 Program Stops dialog. Changed all Drill Cycle Parameters in Compost2 Drill Cycles dialog. Deleted CP1LessCP2# from Prog Numeric Format Definitions. Changed FORMAT for CalcCP2FmSurf# from #4 to #7 at Prog Numeric Format Definitions. Added Program2# to FORMAT#5 at Prog Numeric Format Definitions. Added FeedEntry# to FORMAT#5 at Prog Numeric Format Definitions. Added Peck# to FORMAT#7 at Prog Numeric Format Definitions. Modified to allow for multiple G-codes on one block. Commented out Flag(2) at OpenMP. Modified ToolPath PointFeat for Drilling to output ' G79' on block by itself for FirstFeat. Deleted ' Y' CalcZSurf# for FirstFeat at ToolPath PointFeat Drilling. Added SaveProgNum2 at Start of executable Prog. Commented out Flag(2) at EachOp/NextOp. Modified StartOp, ToolChng and end of Prog code per fax. Modified Drilling Cycle to output G83 with P01 through P05 Parameters at IF Drilling. DWB}
RestoreScale: IF NOT Metric? {CAM file is in English, tools and tool path} SetScale('25.4') { change to Metric, this is a Metric post} END RETURN
WFONum: ' G' NewWFO# RETURN
WFOStuff: IF NewWFO? IF MultipleParts? AND WorkFixtureOffsets? EOL '*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL ELSE WFONum END ELSE IF Flag?('2') IF NOT SameTool? IF MultipleParts? IF WorkFixtureOffsets? WFO1 ELSE IF FirstOperation? WFONum END END ELSE IF FirstOperation? WFONum END END END END END SetFlagF('2') 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 ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL END IF ToolComment? SeqLab '( ' ToolComment$ ' )' EOL END RestoreScale END RETURN
Index: IF FourthCW? FORMAT(FourthDegree#,2) ' B' FourthDegree# FourthCWF {reset flag} END IF FourthCCW? FORMAT(FourthDegree#,3) ' B' FourthDegree# FourthCCWF {reset flag} END RETURN
SubWarning: IF NOT FeedConnect? IF AnyZshift? SeqLab ' ' EOL SeqLab '( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL SeqLab ' ' EOL END END RETURN
FinishSub1: {part 1} SeqLab CRCOffC IF NOT FeedConnect? IF AutoCycle? ZCP3C ELSE IF FIFO? FeedC ZCP3C FeedEntC ELSE RapidC ZCP3C END END END EOL 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
FormatArc: DoAbsOrInc IF ArcCW? CWArcC ELSE CCWArcC END MoveXYZC IF ArcIJFormat? ArcIJ ELSE ArcRC END IF XYPlane? AND NotEqual? SPZ# EPZ# ' J' HelixPitch# ELSE IF XZPlane? AND NotEqual? SPY# EPY# ' K' HelixPitch# ELSE IF YZPlane? AND NotEqual? SPX# EPX# ' I' HelixPitch# END END END RETURN
ckCRC: IF LastFeat? CRCOffC ELSE IF NOT ZMove? CRCOnC END END RETURN
ckCRCNum: { Not Supported } RETURN
ToolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqLab MoveSXYC EOL SeqLab ' G22 N=9' Program# EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLab DoDrillAbsOrInc ' G79' MoveSXYZC EOL END ELSE IF RapidFeat? IF XMove? OR YMove? OR ZMove? SeqLab DoAbsOrInc ckCRC RapidC MoveXYZC EOL END ELSE IF LineFeat? IF XMove? OR YMove? OR ZMove? IF Decelerate? IF RoomToDecel? DecelMove1 SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC EOL DecelMove2 END SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed EOL ELSE SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC 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 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? ELSE IF FIFO? FeedC ZCP2 FeedEntC ELSE RapidC ZCP2 END END 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? Feed IF NOT FirstCycle? IF SPXMove? OR SPYMove? SeqLab IncValue StrtPosC EOL AbsOrInc END END SeqLab ZInPlusInc FeedEnt EOL ELSE IF NOT FirstCycle? Rapid IF SPXMove? OR SPYMove? SeqLab IncValue StrtPosC EOL AbsOrInc END IF FeedEntry? SeqLab ZCP2PlusInc EOL END END IF FeedEntry? SeqLab Feed ZInPlusInc FeedEnt EOL ELSE IF FirstCycle? Rapid END SeqLab RapidC ZInPlusInc EOL END END IF FirstCycle? SetStatusOff {protect Z position for incremental sub} END SeqLab ' G22 N=9' Program# EOL NextCycle SetStatusOn AutoCycCutSub1 {build element sub} AutoCycCutSub2 IF FeedConnect? {there is no Z up in the sub} IF FIFO? SeqLab Feed ZCP2 FeedEnt EOL ELSE SeqLab Rapid ZCP2 EOL END END CloseSub {Element shift, not pattern} RETURN
ZonlyRep: EachCycle IF NOT FirstCycle? SeqLab Connect StrtPos EOL END IF FeedConnect? SeqLab FeedC ZInPlusInc FeedEnt EOL ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqLab RapidC ZCP2PlusIncC EOL END SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab RapidC ZInPlusInc EOL END END SeqLab ' G22 N=9' Program# EOL NextCycle StartSub TrackZNO# EPZ# {added to update status register so that ZMove? would return false, ZInPlusInc does not update the status register} ToolPath FinishSub1 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 ReverseXZArcs InitWFONum SetFlood SaveProgNum2 UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('10000') IF Metric? SetMaxFeed('127000') ELSE SetMaxFeed('5000') END SetFlagF('1') { Milling ZShiftOnly SepSubs } SetFlagF('2') { WFOStuff } SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP } 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 ' NewWFO(56), NWFO(56) -' EOL ' The Work Fixture Offset # you specify will be used for all following operations.' EOL ' Do not use with the ncPost multiple part option.' EOL ' 4thAxisCW(12.5), 4ACW(12.5) -' EOL ' generates a + B move of the value you specify' EOL ' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL ' generates a - B move of the value you specify' EOL END EachOp {Start of post processing *********************} {IF MultipleParts? IF AllToolsOnePart? IF EquallySpacedOffsets? SetFlag('2') { WFOStuff } END ELSE {implied OneToolAllParts?} IF FullUp? IF EquallySpacedOffsets? SetFlag('2') { WFOStuff } END ELSE {implied ExitClearancePlane?} SetFlag('2') { WFOStuff } END END ELSE SetFlag('2') { WFOStuff } END} IF FirstOperation? '%' Program# ' G71' EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? SeqLab '( PROGRAM: ' ProgramName$ ' )' EOL END 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 SeqLab Rapid '0' Plane CRCOff AbsOrInc EOL IF MultipleParts? AND AllToolsOnePart? OpenMP END SeqLab OpToolID IF LastTool? Speed SpinOn ELSE ToolChng END EOL DoOpComments DoPostScript IF MultipleParts? AND OneToolAllParts? AND FullUp? OpenMP IF LastTool? SeqLab Speed SpinOn EOL END END SeqLab WFOStuff Index EOL CheckPass IF NOT LastTool? SeqLab Speed SpinOn EOL END SeqLab Rapid StrtPos ZCP1 EOL SeqLab CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? OpenMP SeqLab WFOStuff EOL SeqLab Speed SpinOn EOL SeqLab Rapid 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 IF ToolChangeAtHome? SeqLab Rapid Home EOL END IF LAST ProgStop? SeqLab ' M0' EOL ELSE SeqLab ProgStop EOL END
{Start new Operation}
SeqLab PlaneC EOL SeqLab OpToolID ToolChng EOL DoOpComments DoPostScript IF MultipleParts? AND OneToolAllParts? AND FullUp? OpenMP END SeqLab WFOStuff Index EOL CheckPass SeqLab Speed SpinOn EOL SeqLab Rapid StrtPos ZCP1 EOL SeqLab CoolOn EOL IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? OpenMP SeqLab WFOStuff EOL SeqLab Speed SpinOn EOL SeqLab Rapid StrtPos EOL END ELSE IF SameTool? DoEndOpPS IF LAST ProgStop? SeqLab CoolOff EOL SeqLab ' M0' EOL
{Start new Operation}
GetStartOfSameTool SeqLab SpeedC SpinOn EOL SeqLab Rapid StrtPos ZCP1 EOL SeqLab CoolOn EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqLab CoolOff EOL END
{Start new Operation}
GetStartOfSameTool SeqLab SpeedC EOL SeqLab Rapid StrtPos EOL IF NOT CoolOff? AND LAST CoolOff? SeqLab CoolOn EOL END END END END END {common point for all operations} 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? SeqLab CRCOffC FeedC ZCP3C FeedEntC EOL ELSE SeqLab CRCOffC RapidC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqLab Rapid StrtPos EOL END SeqLab DrillCP EOL GetCycle SeqLab Cycle ' P01 ' CalcCP2FmSurf# ' P02 ' CalcZFmSurf# IF Peck? ' P03 ' Peck# ELSE ' P03 ' CalcZFmSurf# END IF Dwell? ' P04 ' Dwell# ELSE ' P04 0' END ' P05 ' FeedEntry# EOL IF CallMasterOp? SeqLab ' G22 N=9' CallMasterNum# EOL SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqLab ' G22 N=9' Program# EOL StartSub ToolPath SeqLab EndSub EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ SeqLab Rapid 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 DoEndOpPS IF FIRST ToolChangeAtHome? SeqLab RapidC FirstHome EOL END IF ProgStop? SeqLab ' M0' EOL END IF MultipleParts? AND AllToolsOnePart? CloseMP END SeqLab EOP EOL 'N9999 %' Program2# ' G71' EOL ASCII('04') EOL Post Close Retag 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