Fadal Format 2 [ABE] CX92 12


{Change Comments ***********************************************************} { 10/24/94 [cwh] C611.81.5 ( from C611.81.4 ) Made changes to ZOnlyRep and FinishSub1 subs to properly handle Feed connects and clearance moves. } {11/8/94 Modified: Fadal Format 2 (PW) C611.81.5 For: Gibbs & Associates Versions: Catalyst v2.14.12C/Compost 4.21.23 Changes made per Pete Jackson Changed all occurances of SeqC to SeqLab. Charles reported a problem involving operations that do not change coordinate systems from previous operations. Added ClearCSOffset at NotSameToolWFO and SameToolWFO subs. DWB} {11/16/94 Fixed Program Stop bug in NewToolOp2. Tom Hubina} { Format: Fadal Format 2 (PW) C611.00 1/4/95 Changed version number to .00 from .81.7 per Fanuc 6M (PW) C001.00.03 Changed all CSAngleAC and CSAngleBC calls to CSAngleA and CSAngleB to output the A and B commands at the start of every operation. Added AAxisAvail? and BAxisAvail? checks to CSAngleA and CSAngleB subs Added return to CS1 moves to End2 Added G92 reset of A and/or B axis to End2 Changed NotSameTool WFO so it would restate the current WFO if no change in CS Added ClearCSOffset to OpenMP: CloseMP: and SubCSMP: Added if AChange? OR BChange? to home postition call-out in SameToolOp1 Replaced SetZRepInc and RestoreAbsOrInc with one sub called DoAbsOrInc. Any line with SetZRepInc now has DoAbsOrInc as the first command after the SeqC. TH} { Format: Fadal Format 2 (PW) C611.00 1/13/95 Formatted TrackZNO# to #4 } { Added ClearCSOffset to SubCSMP TH} { Changed SeqC's to SeqLabs 4/21/95 TH} { Fixed unwind code in End2: 5/25/95 TH} {6/9/95 Fixed CRC so it won't output on a helix TH} {7/10/95 Updated: Fadal Format 2 (PW) C611.00.04 For: Gibbs & Associates/Tru-Cut Machine Company Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.06/Catalyst v2.14.40/Compost 4.21.30/1.0a Changes made per Pete Jackson and Bryan Widholm of Tru-Cut Machine Company. Changed Coolant On from M07 to M08 in Mach Spec Commands 3 dialog. Updated to Version 4.2 per Fanuc 6M M001.81.2g Format. Modified CkCRC sub. Added logic to suppress output of CRCOnC on ZMove Feature. Added logic to suppress output of CRCOnC in OneFeat ToolPath. Moved ResetCRCNum at start of ToolPath to CkCRC sub. Added support of CRC during multiple pocket dog-bone operation. Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub. Outputs G41/G42 on First LineFeat after Z Plunge. Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat. Assures that G40 is not output prior to LastFeat. Added CRCOffC to ZMoveOnly Feature at ToolPath RapidFeat. Outputs G40 at all Z Retract blocks. Deleted DoArcCRC sub. CkCRC sub now also called at FormatArc sub. Deletes use of Flag(8) Deleted CRCValue sub. Not needed because problem has been resolved, see CNCVIS1 M611.81.7, 5/5/93. Simplified output of Canned Drill Cycle block at IF Drilling. DWB} {8/23/95 - Updated to .10 format TH} {1/17/96, Updated .10 to .11 version, MPK} {3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK} {4Sep97 Original: Fadal Format 2 (PW) C611.12 Created: Fadal Format 2 (ABE) Cxxx.12 Control : Fadal VMC_4020 For: FRUCTUS / Industri AB Elos, Sweden Changes made per: Michael Bagge Added ProgHeader Sub and Moved InitOp commands here. Customer requires his program header outside the main EachOp NextOp Loop ProgHeader is called in ProgStart Moved the OpenSub command. Now it is the very first thing executed in the Prog Changed Sub Calls to 'M98' in MachSpec Changed Sub Labels from 'L' to 'O' ' in MachSpec Changed the DefaultFormat for 'O', from '###0' to '00' in MachSpec Deleted old version Numbers and Literals e.g. {.81}, {comments} etc. Added Subs CSdata and DoTheListOfCS Note: These Subs produce a list of Co-Ordinate Machining Systems used in the Part and outputs it in a format that the control can read. The maximum number that can be listed is 48 CSs. There are only 50 variables available and NUM#('50') and NUM#('49') are in use. Added Subs SetZero and Call_SetZero. These initialise all Variables to Zero both before and after DoTheListOfCS is called NOTE: I have to do this myself as I cannot rely on the InitProg command doing it for me. Added CalcCSWFOP Sub. This is identical to CalcCSWFO except that it outputs a Literal 'P' instead of 'E' Changed Variable Num#('1') to Num#('49') in CSAngleA and CSAngleB. I need to use Num#('1') in DoTheListOfCS Deleted EachRep/NextRep Loop in StdSub Changed CallLab to SubCall 'P0' Program# '00' in the following subs, StdSub, OpenMP, CloseMP, ToolPath, ZonlyRepAutoCycle, ZonlyRep and in Opguts at CallMasterOp and MasterOp Added OutputAngleA Sub and OutputAngleB Subs. These output 'A0.' and 'B0.' when an MDD of fewer than 5 Axes is used. ( Used in CSdata ) Added Movement Sub. Outputs an Absolute or Inc command, ( Used in CSdata ) Deleted Rapid AbsOrInc SpinOff CoolOff & 'G53Z0' at NewToolOp2 and End2, and, Replaced them with Literal 'M98P98' ( ToolChng ) Deleted ToolChangeAtHome Boolean at NewToolOp2 Deleted OpToolID ToolChng at NewToolOp3 Replaced Literal 'X0Y0Z0E0H0' with 'G0Y140.' at End3 Deleted EndSubs Command from End3 Changed Reseq to Retag in End3 (was causing Virtual v4.2 to hang) Charles Winston} {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(CSOffsetX#,4) FORMAT(CSOffsetY#,4) FORMAT(CSOffsetZ#,4) FORMAT(ToolDiameter#,4) FORMAT(TrackZNO#,4) FORMAT(ADD#,5) FORMAT(CS#,5) FORMAT(Program#,5) FORMAT(Operation#,5) FORMAT(Tool#,5) FORMAT(NewWFO#,5) FORMAT(Parts#,5) FORMAT(Dwell#,6) FORMAT(SUB#,6) FORMAT(CSOffsetA#,6) FORMAT(CSOffsetB#,6) FORMAT(Recall#,7) FORMAT(CSSubID#,7) FORMAT(CallMasterNum#,7) {Prog 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 DoSubComment: IF UseComments? AND SubComment? SeqLab '* SUB NUMBER: ' Program# EOL END RETURN DoOpComments: IF UseComments? SetScale('1') SeqLab '* OPERATION ' Operation# IF OperationIDComment? ': ' OperationType$ END EOL IF OperationComment? SeqLab '* ' OperationComment$ EOL END IF WorkGroupComment? SeqLab '* ' WorkGroupComment$ EOL END SeqLab '* TOOL ' Tool# IF ToolTypeComment? ': ' ToolDiameter# ' ' ToolType$ END EOL IF ToolComment? SeqLab '* ' ToolComment$ EOL END RestoreScale END RETURN CSWFO: 'E' ADD# CS# SUB# NewWFO# Num#('1') RETURN CalcCSWFO: {(iPart-1)*NumOfCS#)} 'E' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1') RETURN CalcCSWFOP: {(iPart-1)*NumOfCS#) Outputs a 'P' not an 'E' } 'P' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1') RETURN CSAngleA: IF AAxisAvail? 'A' IF NOT Flag?('9') IF FirstOperation? IF LessThan? CSOffsetA# Num#('0') '-' END ELSE IF LessThan? CSOffsetA# LAST CSOffsetA# '-' END END END Save# Num#('49') TRUNC# DIV# CSOffsetA# Num#('360') IF LessThan? CSOffsetA# Num#('0') Save# Num#('49') SUB# Recall# Num#('49') Num#('1') END SUB# CSOffsetA# MUL# Recall# Num#('49') Num#('360') END RETURN CSAngleAC: IF AChange? CSAngleA END RETURN CSAngleB: IF BAxisAvail? 'B' IF NOT Flag?('9') IF FirstOperation? IF LessThan? CSOffsetB# Num#('0') '-' END ELSE IF LessThan? CSOffsetB# LAST CSOffsetB# '-' END END END Save# Num#('49') TRUNC# DIV# CSOffsetB# Num#('360') IF LessThan? CSOffsetB# Num#('0') Save# Num#('49') SUB# Recall# Num#('49') Num#('1') END SUB# CSOffsetB# MUL# Recall# Num#('49') Num#('360') END RETURN CSAngleBC: IF BChange? CSAngleB END RETURN DoCSWFOComment: SeqLab '* CS#' CS# ' - ' CSComment$ EOL SetFlag('9') SeqLab '* ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# EOL SetFlagF('9') RETURN PSInit: OptCyc1F MasterOpF CallMasterOpF RETURN PSStuff: RETURN DoPostScript: PSInit EachPS SeqLab PostScript EOL PSStuff NextPS RETURN DoEndOpPS: PSInit EachEOPS SeqLab EndOpPS EOL PSStuff NextPS RETURN EntryMove: IF FeedEntry? SeqLab Feed ZIn FeedEnt EOL ELSE SeqLab RapidC ZIn EOL END RETURN StartSub: OpenSub SeqLab SubIDF EOL DoSubComment 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 StdSub: SeqLab SubCall 'P0' Program# '00' EOL StartSub RETURN FinishSub1: {part 1} SeqLab CRCOffC EOL SeqLab IF NOT FeedConnect? IF AutoCycle? ZCP3C ELSE IF FIFO? FeedC ZCP3C FeedEntC ELSE RapidC ZCP3C END END END EOL RETURN FinishSubG92: {part 2} SeqLab Preset ShiftR EOL SeqLab EndSub EOL CloseSub SeqLab Preset UnshiftR EOL RETURN OpenMP: IF WFOCS? NewProg StartSub SaveCSProg SaveCSOpStart ClearCSOffset ELSE NewProg IF WorkFixtureOffsets? NewWFO EachWFO SeqLab Rapid StrtPos SetWFO EOL SeqLab CallLab OnePart EOL IncWFO NextWFO ELSE Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops } EachPart Save# Num#('10') ADD# Recall# Num#('10') Num#('1') IF GreaterThan? Recall# Num#('10') Num#('99') SeqLab CallLab '99' EOL Save# Num#('10') Num#('1') END NextPart SeqLab SubCall 'P0' Program# Recall# Num#('10') EOL END StartSub END RETURN CloseMP: IF WFOCS? SeqLab EndSub EOL CloseSub NewWFO EachWFO {simple eachPart} EachCSOp DoCSWFOComment ClearCSOffset SeqLab CalcCSWFO EOL SeqLab SubCall 'P0' CSSubID# '00' EOL NextCSOp ClearCSOffset IncWFO NextWFO {simple NextPart} ELSE IF WorkFixtureOffsets? SeqLab EndSub EOL CloseSub ELSE SeqLab Preset ShiftP EOL SeqLab EndSub EOL CloseSub SeqLab Preset UnshiftP EOL END END 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 CkCRC IF ArcCW? CWArcC ELSE CCWArcC END MoveXYZC IF ArcIJFormat? ArcIJC ELSE ArcRC END RETURN StdLine: {enables CRC on first call} IF Decelerate? IF RoomToDecel? DecelMove1 SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL DecelMove2 END SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed CRCOffsetC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqLab DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL END END RETURN ToolPath: EACHFeat IF NOT Rapid? IF FirstFeat? SeqLab 'G8' EOL ELSE IF LAST Rapid? SeqLab 'G8' EOL END END END IF PointFeat? IF AutoCycle? SeqLab MoveSXYC EOL SeqLab SubCall 'P0' Program# '00' EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqLab DoDrillAbsOrInc MoveSXYZC EOL END ELSE IF RapidFeat? IF AutoCycle? IF LastFeat? CRCOffC END SeqLab RapidC MoveXYZC EOL ELSE IF ZMove? AND NOT XMove? AND NOT YMove? CRCOffC END IF XMove? OR YMove? OR ZMove? SeqLab RapidC MoveXYZC EOL END END ELSE IF LineFeat? IF AutoCycle? 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 { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqLab FormatArc ArcFeedC CRCOffsetC EOL DecelMove2 END SeqLab FormatArc DecelFeed CRCOffsetC EOL ELSE SeqLab FormatArc ArcFeedC CRCOffsetC EOL END NEXTQuadrant IF LastFeat? SeqLab CRCOffC EOL END END END END END NEXTFeat RestoreAbsOrInc RETURN AutoCycCutSub1: {part 1} SaveSubStatus {save tool position} SetPass1 {element cut moves} StartSub SetSRXYtoSP SeqLab IncValue EOL RETURN AutoCycCutSub2: {part 2} ToolPath SeqLab AbsOrInc IF Repeats? AND FeedConnect? AND ZshiftOnly? {removed RapidC} {removed CRCOffC, gets turned off in ToolPath} ELSE IF FIFO? 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 G92Sub: SubWarning StdSub SeqLab AbsOrInc Connect StrtPos EOL Milling FinishSub1 FinishSubG92 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 SubCall 'P0' Program# '00' 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 SeqLab EndSub EOL CloseSub {Element shift, not pattern} RETURN ZonlyRep: SetFlag('1') {std sep sub Zreps are in effect} {rep change 2} EachCycle IF NOT FirstCycle? SeqLab Connect StrtPos EOL {added Connect} END IF FeedConnect? SeqLab FeedC ZInPlusInc FeedEnt EOL {changed to FeedC} ELSE {Entry/Exit Connect} IF FeedEntry? IF NOT FirstCycle? SeqLab RapidC ZCP2PlusIncC EOL {added Rapid, reads better} END SeqLab Feed ZInPlusInc FeedEnt EOL ELSE SeqLab RapidC ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better} END END SeqLab SubCall 'P0' Program# '00' 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 SetZero: Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1') Save# Recall# NUM#('50') NUM#('0') RETURN Call_SetZero: Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) } SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero SetZero {Call 49 times} Save# Num#('50') NUM#('0') RETURN OutputAngleA: IF AAxisAvail? 'A' IF NOT Flag?('9') IF FirstOperation? IF LessThan? CSOffsetA# Num#('0') '-' END ELSE IF LessThan? CSOffsetA# LAST CSOffsetA# '-' END END END Save# Num#('49') TRUNC# DIV# CSOffsetA# Num#('360') IF LessThan? CSOffsetA# Num#('0') Save# Num#('49') SUB# Recall# Num#('49') Num#('1') END SUB# CSOffsetA# MUL# Recall# Num#('49') Num#('360') ELSE 'A0.' END RETURN OutputAngleB: IF BAxisAvail? 'B' IF NOT Flag?('9') IF FirstOperation? IF LessThan? CSOffsetB# Num#('0') '-' END ELSE IF LessThan? CSOffsetB# LAST CSOffsetB# '-' END END END Save# Num#('49') TRUNC# DIV# CSOffsetB# Num#('360') IF LessThan? CSOffsetB# Num#('0') Save# Num#('49') SUB# Recall# Num#('49') Num#('1') END SUB# CSOffsetB# MUL# Recall# Num#('49') Num#('360') ELSE 'B0.' END RETURN Movement: IF AbsoluteMoves? 'G90 ' ELSE 'G91 ' END RETURN CSdata: IF LTEqual? Recall# NUM#('50') NumOFCS# Save# NUM#('50') ADD# Recall# NUM#('50') NUM#('1') {counter} IF GreaterThan? Recall# Recall# NUM#('50') NUM#('0') EachOp IF Equal? Operation# Recall# Recall# NUM#('50') SeqLab '* G10 ' Movement 'L2 ' CalcCSWFOP ' X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' ' OutputAngleA ' ' OutputAngleB EOL END NextOp END END RETURN DoTheListOfCS: Save# Num#('50') NUM#('0') { Setup the Op Number to be examined, (Initialized to zero) } CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata CSdata { Limit of 48 CSs because Num#('50') and Num#('49') are in use} RETURN ProgHeader: OpenSub EOR EOL SeqLab 'O' Program# '00' 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 RestoreScale Call_SetZero EachOp IF Equal? Recall# CS# NUM#('0') Save# CS# Operation# { Save the NUMBER of the First Operation in which each Co-Ordinate Machining System is used } END NextOp DoTheListOfCS Call_SetZero RETURN ProgStart: InitProg ReverseXZArcs InitWFONum SetFlood UseSeparateSubCalls SetMaxSeparateSubCalls('50') SetMaxRPM('15000') SetMaxFeed('500') SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2} IF AbsoluteMoves? SetFlagF('2') ELSE SetFlag('2') END SetFlagF('9') { CSAngleA, CSAngleB and DoCSWFOComment } 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 ProgHeader Save# Num#('1') Num#('0') { CSAngleA and CSAngleB } Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops } 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? ZonlyRep {rep change 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 SeqLab CRCOffC EOL { Just in case } IF FIFO? SeqLab FeedC ZCP3C FeedEntC EOL ELSE SeqLab RapidC ZCP3C EOL END END ELSE IF Drilling? IF Repeats? NewProg StdSub SeqLab AbsOrInc Rapid StrtPos EOL END IF Pulse? { Positive Approach On } SeqLab 'M46' EOL END SeqLab DrillCP EOL GetCycle SeqLab IF Tap? AND OptCyc1? 'G84.1' ELSE Cycle END FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt IF Tap? AND OptCyc1? Speed END EOL IF CallMasterOp? SeqLab SubCall 'P0' CallMasterNum# '00' EOL SkipToLastFeat ELSE TrackZNO# FIRST SPZ# IF MasterOp? SetFlag('1') {std sep sub Zreps in effect} NewMasterProg SeqLab SubCall 'P0' Program# '00' EOL StartSub ToolPath SeqLab EndSub EOL CloseSub SetFlagF('1') {not std sep sub Zreps in effect} ELSE ToolPath END END SetDrillEndOpZ IF Pulse? SeqLab 'M47' EOL ResetCool END SeqLab Rapid 'G80' ZCP3 EOL IF Repeats? FinishSubG92 END END END SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3} 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: RETURN FirstOp1: SeqLab OpToolID ToolChng EOL DoOpComments DoPostScript RETURN FirstOp2: IF Drilling? AND Tap? AND OptCyc1? SeqLab Speed EOL SeqLab 'G84.2' EOL ELSE SeqLab Speed SpinOn EOL END RETURN FirstOp3: CheckPass SeqLab Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL SeqLab OfstOn CoolOn EOL RETURN FirstOp3a: {can't XY position before WFO} CheckPass SeqLab OfstOn CoolOn EOL RETURN NewToolOp1: RETURN NewToolOp2: SeqLab 'M98P98' EOL { ToolChng } DoEndOpPS IF LAST ProgStop? SeqLab 'M00' EOL ELSE SeqLab ProgStop EOL END RETURN NewToolOp3: {Start new Operation} DoOpComments DoPostScript RETURN NewToolOp4: IF Drilling? AND Tap? AND OptCyc1? SeqLab Speed EOL SeqLab 'G84.2' EOL ELSE SeqLab Speed SpinOn EOL END RETURN NewToolOp5: CheckPass SeqLab Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL SeqLab OfstOn CoolOn EOL RETURN NewToolOp5a: CheckPass SeqLab OfstOn CoolOn EOL RETURN SameToolOp1: DoEndOpPS IF LAST ProgStop? SeqLab 'G0H0Z0' CoolOff SpinOff 'M00' EOL { does this do a full up? } 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? IF Drilling? AND Tap? AND OptCyc1? SeqLab SpeedC EOL SeqLab 'G84.2' EOL ELSE SeqLab SpeedC SpinOn EOL END SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL SeqLab OfstOn CoolOn EOL ELSE IF NewToolOffset? OR ChangeCS? SeqLab 'G0H0Z0' EOL { OfstOff } SeqLab SpeedC EOL SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL SeqLab OfstOn EOL ELSE SeqLab SpeedC EOL SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL END IF NOT CoolOff? AND LAST CoolOff? SeqLab CoolOn EOL END END RETURN End1: RETURN End2: SeqLab 'M98P98' EOL { OfstOff } DoEndOpPS IF FIRST ToolChangeAtHome? {added FIRST modifier} SeqLab WFO1 EOL SeqLab AbsOrInc Rapid FirstHome 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 'G0Y140.' EOL SeqLab EOP EOL CloseSub Post2 {organize Subs into one program} EOR EOL Close Retag 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 EOL ELSE IF NewTool? CloseMP NewToolOp1 NewToolOp2 {to tool change, CS problem} NewToolOp3 NewToolOp4 NewToolOp5a OpenMP SeqLab StrtPos 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

Wyszukiwarka

Podobne podstrony:
Fadal Format 2 [ABE] CX92 15m
Fadal Format 2 (AC) B807 12
Fadal Format 2 (AM) CW48 12
Fadal Format 2 (AM) DW48 12
Fadal Format 2 (AC) D807 12 3
Fadal Format 1 [CM] C712 12 2
Fadal Format 2 [AM] BW48 12 1
Fadal Format 2 (AC) C807 12
Fadal Format 2 (PWC) C757 12 1
Fadal Format 2 [JF] CX64 12
Fadal Format 2 (FWC) B757 12 1

więcej podobnych podstron