{2/26/91 Copied & modified: Fanuc 6M M001.76.1 For: LaserFab Machine: Anorad 6 CO2 Laser Control: Anomatic II Level III 2 Axis with Z Rotary Table. Turn Laser on to cut, off to position. All Comments start with literal 'G69'. WFO's by request only, activated by MP or PS. FeedRates are inches per second, taken directly from CAM. FullUp & ExitClearancePlane in ncPost will have the same effect. No CRC. Feeds called on line prior to axis move. 2 G codes per line maximum? G0 & F200 for Rapid moves. M Codes Prog Command Effect 106 SpinOn Laser On 107 SpinOff Laser Off 108 ------ Shutter Open (allows laser thru) 109 ------ Shutter Closed 110 ------ Optional Gas On 111 ------ Optional Gas Off 114 CoolOn Gas On 115 CoolOff Gas Off JR}
{3/23/93 Updated: Anomatic II Anorad M406.76.1 For: Gibbs & Associates/Quasar Industries Updated to Version 4.1 per Fanuc 6M M001.81.2 Format. Added NewProg at DoSubComment to Update Program#. DWB}
{6/16/93 Updated: Anomatic II Anorad M406.81.2 For: Gibbs & Associates/Quasar Industries Made minor cleanup changes. DWB}
{5/5/95 Copied and Modified: Anomatic II Anorad M406.81.2 For: LASERFAB INC. To Make processor for:DCI 8000 Modified per supplied output and Manual: Changed all comments to start with literal 'P'. Since Incremental/Absolute is not modal I tested for AbsoluteMoves? and added literals for incremental moves, also added format #7 for the same. Change LaserOn and LaserOff to ElectronBeamOn and ElectronBeamOff respectively. Removed OpenShutter: and CloseShutter: (Not Needed). Removed OptGasOn: (Not Used Anyway). Removed GasOn: and GasOff: (Not Needed). Disabled Coolant Calls (No coolant per James Noble at LASERFAB). Removed WFOStuff Calls. Created Sub 'DoStartPos' to output absolute and incremental start positions with the correct label. Added Flag('1') to determine if the beam is on so we can turn it off for Rapid Features while milling. Created ContinuousPathOn: '[' and ContinuousPathOff: ']' and Added Flag('2') to track condition. Created DoSetInc: and DoAbsOrInc: and Added Flag('3') to track condition for correct axis address labels.
MPS}
{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: NewProg { Update Program# } ASCII('13') ASCII('13') 'P"SAVE THIS SUB AS: ' Program# '"' EOL RETURN
DoOpComments: IF UseComments? SetScale('1') IF OperationIDComment? 'P"OPERATION ' Operation# ': ' OperationType$ '"' EOL END IF OperationComment? 'P"' OperationComment$ '"' EOL END IF WorkGroupComment? 'P"' WorkGroupComment$ '"' EOL END IF ToolTypeComment? 'P"TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ '"' EOL END IF ToolComment? 'P"' ToolComment$ '"' EOL END RestoreScale END RETURN
PSInit: {reset flags} NewWFOF RotateF RETURN
PSStuff: {revised.72} IF FourthCW? FORMAT(FourthDegree#,2) SeqLabC 'Z' FourthDegree# EOL FourthCWF {reset flag} END IF FourthCCW? FORMAT(FourthDegree#,3) SeqLabC 'Z' FourthDegree# EOL FourthCCWF {reset flag} END RETURN
FormatArc2: '(' ArcI ' ' ArcJ ')' IF Flag?('3') OR NOT AbsoluteMoves? '(XM' EPX# ' YM' EPY# ')' ELSE '(' MoveX ' ' MoveY ')' END RETURN
FormatLinear: 'LI' IF Flag?('3') OR NOT AbsoluteMoves? '(XM' EPX# ' YM' EPY# ')' ELSE '(' MoveX ' ' MoveY ')' END RETURN
FormatRapidMove: IF Flag?('3') OR NOT AbsoluteMoves? 'XM' EPX# ' YM' EPY# ELSE 'XA' EPX# ' YA' EPY# END RETURN
FormatPoint: IF Flag?('3') OR NOT AbsoluteMoves? 'XM' SPX# ' YM' SPY# ELSE MoveSX ' ' MoveSY END RETURN
DoStartPos: IF Flag?('3') OR NOT AbsoluteMoves? 'XM' StartPosX# ' YM' StartPosY# ELSE 'XA' StartPosX# ' YA' StartPosY# END RETURN
StdLine: {enables CRC on first call, .70} IF Decelerate? IF RoomToDecel? DecelMove1 SeqLabC ElectronBeamOn EOL SeqLabC FeedRateC EOL SeqLabC ContinuousPathOn FormatLinear EOL DecelMove2 END SeqLabC DecelFeed EOL SeqLabC ContinuousPathOn FormatLinear EOL ELSE IF XMove? OR YMove? SeqLabC ElectronBeamOn EOL SeqLabC FeedRateC EOL SeqLabC ContinuousPathOn FormatLinear EOL END END RETURN
ToolPath: EACHFeat IF PointFeat? IF AutoCycle? SeqLabC FormatPoint EOL SeqLabC '.' Program# '#1' EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLabC FormatPoint EOL SeqLabC ElectronBeamOn EOL IF Dwell? SeqLabC 'D' Dwell# EOL ELSE SeqLabC 'D0100' EOL {Give it 1/10 Second Minimum Dwell} END SeqLabC ElectronBeamOff EOL END ELSE IF RapidFeat? IF XMove? OR YMove? SeqLabC ContinuousPathOff EOL SeqLabC ElectronBeamOff EOL SeqLabC FormatRapidMove EOL END ELSE IF LineFeat? StdLine ELSE IF ArcFeat? SeqLabC ElectronBeamOn EOL EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqLabC ArcFeedC EOL SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL DecelMove2 END SeqLabC DecelFeed EOL SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL ELSE SeqLabC ArcFeedC EOL SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL END NEXTQuadrant END END END END NEXTFeat RETURN
WFOStuff: IF NewWFO? IF MultipleParts? AND WorkFixtureOffsets? '*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL ELSE SeqLabC 'G' NewWFO# EOL END END RETURN
{Start of executable Prog **************************************************}
{setup and initializations} InitProg
SetFlag('1') {Set Electron beam On, allows Turn off at program beginning} SetFlagF('2') {Set Continuous Path Off}
{TagInit} {InitWFONum} {SetFlood}
SkipZ UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('10000') SetMaxFeed('500') 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 + Z move of the value you specify' EOL ' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL ' generates a - Z move of the value you specify' EOL END EachOp {Start of post processing *********************} IF FirstOperation? EOR EOL IF ToolChangeAtHome? SetHome END IF UseComments? IF ProgramNameComment? 'P"' ProgramName$ '"' EOL END IF ProgramComment? 'P"' ProgramComment$ '"' EOL END IF FormatNameComment? 'P"FORMAT: ' FormatName$ '"' EOL END IF TimeComment? 'P"' Date$ ' AT ' Time$ '"' EOL END IF MovesComment? 'P"OUTPUT IN ' MoveType$ ' INCHES"' EOL END IF PartsComment? 'P"PARTS PROGRAMMED: ' Parts# '"' EOL END IF StartToolComment? 'P"FIRST TOOL NOT IN SPINDLE"' EOL END END RestoreScale OpenSub IF MultipleParts? AND AllToolsOnePart? OpenMP END Plane { no output } DoAbsOrInc { no output } Save# Num#('1') Sequence# SeqLab ' ' ElectronBeamOff EOL DoOpComments DoPostScript CheckPass SeqLabC DoStartPos EOL IF MultipleParts? AND OneToolAllParts? OpenMP SeqLabC DoStartPos EOL END ELSE IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? CloseMP END DoEndOpPS SeqLabC ContinuousPathOff EOL IF ToolChangeAtHome? SeqLabC IF Flag?('3') OR NOT AbsoluteMoves? 'XM' HomeX# ' YM' HomeY# ELSE 'XA' HomeX# ' YA' HomeY# END EOL END SeqLabC 'START1' EOL { Forced ProgStop }
{Start new Operation}
Plane { no output } DoOpComments DoPostScript CheckPass SeqLabC DoStartPos EOL IF MultipleParts? AND OneToolAllParts? OpenMP SeqLabC DoStartPos EOL END ELSE IF SameTool? DoEndOpPS SeqLabC ContinuousPathOff EOL IF LAST ProgStop? SeqLabC EOL SeqLabC 'START1' EOL
{Start new Operation}
GetStartOfSameTool SeqLabC DoStartPos EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqLabC EOL END
{Start new Operation}
GetStartOfSameTool SeqLabC DoStartPos EOL IF NOT CoolOff? AND LAST CoolOff? SeqLabC EOL END END END END END {common point for all operations} IF Milling? IF Repeats? TagInc G92Sub IF FeedConnect? ExitMove END ELSE {no repeat OPs} Milling IF NOT AutoCycle? ExitMove END END ELSE IF Drilling? IF Repeats? TagInc StdSub SeqLabC DoStartPos EOL END ToolPath IF Repeats? FinishSubG92 END END END NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation} IF MultipleParts? AND OneToolAllParts? CloseMP END DoEndOpPS SeqLabC ContinuousPathOff EOL IF FIRST ToolChangeAtHome? SeqLabC IF Flag?('3') OR NOT AbsoluteMoves? 'XM' HomeX# ' YM' HomeY# ELSE 'XA' HomeX# ' YA' HomeY# END EOL END SeqLabC 'START1' EOL { Forced ProgStop } IF MultipleParts? AND AllToolsOnePart? CloseMP END
'JP' Recall# Num#('1') EOL { Jumps Control Back to Beginning } CloseSub Post2 {organize Subs into one program} Close ReSeq IF UseComments? SetScale('1') {restore scale for comments} Reopen IF FileBytesComment? 'P"FILE LENGTH: ' FileBytes# ' CHARACTERS"' EOL END IF FileFeetComment? 'P"FILE LENGTH: ' FileFeet# ' FEET"' EOL END IF FileMetersComment? 'P"FILE LENGTH: ' FileMeters# ' METERS"' EOL END Close END