Fanuc 6M [FW] NBU99 16


{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=T
SUBS=F
MILLTURN_Y-AXIS=F
METRIC=F
}

{Change Comments ***********************************************************}

{
95/06/07 Centurion V M801.81.7
95/01/18 Cin 10VC [CG] M732.81.2
95/01/19 Cin 10VC [CG] M732.81.2m
94/11/16 Cincinnati Acr 338-D M160.81.2
95/05/22 Fanuc 0M Kit G54 NS M531.82.4
96/05/30 Fanuc 0M Mxxx.12
94/03/04 Fanuc 11M [JBM] Mxxx.81.2
94/03/04 Fanuc 5M M015.81.3
94/03/04 Fanuc 5M M015.81.4m
94/11/16 Fanuc 5M M015.81.5
94/11/16 Fanuc 5M M015.81.5m
94/12/08 Gemini E K&T M084.81.2
94/01/06 Hurco M069.81.7
95/05/23 Hurco M069.81.8
95/05/23 Hurco Ultimax BMC40 M330.81.3
95/05/23 Hurco Ultimax [AB] M594.81.3
95/05/23 Hurco Ultimax [NOAO] M719.81.3
95/05/23 Hurco Ultimax [PPM] M496.81.3
94/08/25 K & T 180 Gemini D M507.81.3
92/09/12 K & T 800 Gem D17 M186.81.1
93/02/17 K & T 800 Gem D17 M186.81.2
95/06/05 K & T 800 Gem D17 M186.81.3
95/11/21 Yasnac MX2 Matsuura M797.81.3m
}

{12/11/92
Modified: LongHand [AbsOrInc] M001.81
Created: LongHand [AbsOrInc] M001.81.1
This Post Processor does not support subprograms.
Currently supports all combinations of MultipleParts, AutoCycles and Repeats.
Using Var(1), Var(2) and Var(3) for logical control of MultiplePart Operations.
Using Var(4), Var(5), Var(6) and Var(7) for correct Positioning of AutoCycles that Repeat in
X and/or Y, and when AbsoluteMoves = FALSE.
Corrected FORMAT #5 from '########;0' to '#######0'.
Corrected FORMAT #6 for Dwell# from '####^###;' to '####^##0'.
Added FORMAT #7, '#', for RapidF#.
Added Tag# to FORMAT #5.
Added Recall# to FORMAT #5.
Added RestoreScale Sub per 4-Axis Post Processor.
Added support of FIFO? Milling Operations.
Added TrackZNO# ZDepth# at IF Drilling? section to allow for conditionality of MoveSXYZC command.
DWB}

{2/15/93
Modified: LongHand [AbsOrInc] M001.81.1
Created: LongHand [AbsOrInc] M001.81.2
Changed TrackZNO# ZDepth# to TrackZNO# FIRST SPZ# at DrillStuff.
SPZ# is affected by SetScale, whereas ZDepth# is not.
DWB}

{3/18/93
Modified: LongHand [AbsOrInc] M001.81.2
Created: LongHand [AbsOrInc] M001.81.2a
Changed logic of MPLoop sub to handle IF NewTool? and LastOp? situations.
DWB}

{6/8/93
Modified: LongHand [AbsOrInc] M001.81.2a
Created: LongHand [AbsOrInc] M001.81.3
Commented out DoEndOpPS at MPLoop for OneToolAllParts, it does not work correctly.
Added call to WFOStuff at all operations.
Using Var(8) and Var(9) for control of MultiplePart WorkFixtureOffsets.
DWB}

{12/9/93,
Modified: LongHand [AbsOrInc] M001.81.3
Created: LongHand [AbsOrInc] M001.81.3a
Added CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Added Move to ZInC for Non-AutoCycle FeedConnect Repeats with ZMoves at ExitMove sub.
Moved DoCycleComment call to before StrtPos move in related subs.
DWB}

{3/4/94,
Modified: LongHand [AbsOrInc] M001.81.3a
Created: LongHand [AbsOrInc] M001.81.3b
Versions: ncCad 4.32.03/ncCAM 4.32.03/ncPost 4.32.03/Compost 4.21.20
Added BadMPWFOReport sub.
Reports when MultipleParts AND WorkFixtureOffsets = TRUE AND EquallySpacedOffset values exist.
Added FORMAT #8, 'ą#bbbb.bbbb#', for PartShiftX#, PartShiftY# and PartShiftZ# commands.
Moved SeqC and EOL outside of IF ELSE condition at ExitMove sub.
Moved SeqC AbsOrInc and EOL outside of IF ELSE condition at AutoCycCutSub2 sub.
Deleted ReSetPass2 at end of ZonlyRepAutoCycle sub.
Already executed at end of call to AutoCycCutSub2 sub.
DWB}

{8/25/94,
Modified: LongHand [AbsOrInc] M001.81.3b
Created: LongHand [AbsOrInc] M001.81.3c
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 RapidFeat at ToolPath.
Outputs G40 at all Z Retract blocks.
DWB}

{10/21/94,
Modified: LongHand [AbsOrInc] M001.81.3c
Created: LongHand [AbsOrInc] M001.81.3d
Modified support of CRC during multiple pocket dog-bone operation.
Modified condition to output CRCOffC for ZMoveOnly Feature at ToolPath RapidFeat.
DWB}

{11/16/94,
Modified: LongHand [AbsOrInc] M001.81.3d
Created: LongHand [AbsOrInc] M001.81.3e
Changed First occurance of GetConnect to RapidC at ZonlyRepAutoCycle sub.
FeedConnect only applies to Each Repeat, not Each Feature.
DWB}

{12/8/94,
Modified: LongHand [AbsOrInc] M001.81.3e
Created: LongHand [AbsOrInc] M001.81.3f
Modified CkCRC sub.
Changed logic to output CRCOnC in OneFeat, Non-ZMove ToolPath.
Added logic to suppress output of CRCOnC on ZMove Feature.
DWB}

{1/17/95,
Modified: LongHand [AbsOrInc] M001.81.3f
Created: LongHand [AbsOrInc] M001.81.3g
Deleted GetConnect sub, modified XYZRep, XYZRepAutoCycle and ZonlyRepAutoCycle subs, see 11/16/94.
DWB}

{3/21/95,
Modified: LongHand [AbsOrInc] M001.81.3g
Created: LongHand [AbsOrInc] M001.81.3h
Moved ResetCRCNum from common point of all operations to CkCRC sub.
DWB}

{11/8/95,
Modified: LongHand [AbsOrInc] M001.81.3h
Created: LongHand [AbsOrInc] M001.81.3i
Modified ckCRC Sub to v2.20 per M001.85.02.
Added FormatLine Sub.
Added ckCRCNum sub.
Modified RapidFeat.
Modified LineFeat
DWB}

{11/21/95,
Modified: LongHand [AbsOrInc] M001.81.3i
Created: LongHand [AbsOrInc] M001.81.3j
Added OptCyc1F to PSInit sub.
Added SetDrillEndOpZ sub and call to same at IF Drilling.
Combined 'G80' and RapidC ZCP3C block at IF Drilling.
DWB}

{1/25/96,
Modified: LongHand [AbsOrInc] M001.81.3j
Created: LongHand [AbsOrInc] M001.81.3k
Added IF SPXMove? OR SPYMove? 2 places at XYZRep.
DWB}

{2/29/96,
Modified: LongHand [AbsOrInc] M001.81.3k
Created: LongHand [AbsOrInc] M001.81.3l
Modified ZonlyRepAutoCycle to call EntryMove for all cases.
DWB}

{4/9/96, B001.12, Updated for Catalyst v3.0, DWB}
{4/10/96, B001.12, Deleted IF ChangeCS condition for WFOCS at NotSameToolWFO, DWB}

{5/16/96
Modified: LongHand (FW) B001.12
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.05C/Compost 4.21.37/1.0a
Corrected bad OR condition at End2 sub.
Corrected problems with MultipleParts AND WorkFixtureOffsets.
Modified DoPartCycleComment.
Modified OpenMP.
Modified CloseMP.
Deleted WFOStuff and all calls to same.
Deleted ResetWFO and all calls to same.
Modified MPallTools1P.
Modified MP1ToollAllPfu.
Modified MP1ToollAllPXcp.
Modified EndPartSub.
Modified DoNewPart.
DWB}

{9/17/96,
Modified: LongHand (FW) B001.12
Created: LongHand (FW) B001.12a
Modified logic of MultipleParts OneToolAllParts at GetToolLastOP sub.
Problem with output when there are blank operations prior to SameTool.
Minor modifications made to MPLoop and GetToolFirstOp subs.
Added Flag(2) and Flag(3).
DWB}

{9/26/96,
Modified: LongHand (FW) B001.12a
Created: LongHand (FW) B001.12b
Added LongDrillStuff.
Uses Var(8).
DWB}

{12/4/96,
Modified: LongHand (FW) B001.12b
Created: LongHand (FW) B001.12c
Added .14 Additions:
NOTE: These changes have not been compiled yet.
Changed FORMAT#2 from ###.###;0. to #####.###;0. at Prog Numeric Format Definitions.
Changed FORMAT#3 from *###.###;0. to *#####.###;0. at Prog Numeric Format Definitions.
Deleted Flag(1) for CRCOffsetC at ckCRC and ckCRCNum subs and at setup and initializations.
Added NOT LastFeat? AND Equal? SPZ# EPZ# condition at ckCRCNum sub.
Moved contents of FormatLine back to ToolPath LineFeat.
Deleted version comments.
Simplified ExitMove sub.
Deleted OpenMP and CloseMP commands.
Simplified EndPartSub sub.
Modified WorkFixtureOffset logic.
Added Flag(1) for WFOStuff at setup and initializations.
Added WFONum sub.
Rewrote logic at WFOStuff sub.
Added EOL to NewWFO MP WFOStuff sub Warning.
Deleted SeqC and EOL at WFOStuff sub.
Added Flag(1) logic at start of EachOp/NextOp Loop.
Moved WFOStuff after MP-OTAP-FU condition at FirstOperation and NewTool.
Added WFOStuff for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added AbsOrInc Rapid to StrtPos block for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added SeqC and EOL at WFOStuff calls at GetStartOfSameTool, FirstOperation and NewTool.
Moved Speed SpinOn after MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added SetMaxFeed(12700) for Metric VNC files.
DWB}

{3/13/97,
Modified: LongHand (FW) B001.12c
Created: LongHand (FW) B001.12d
Added TrackXNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added TrackYNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added IF FirstOperation? OR EquallySpacedOffsets? condition at MPallTools1P sub.
Post was not outputting WFOStuff for NewTool Operations during MP-ESO-OPAT condition.
Deleted IF WorkFixtureOffsets? condition at DoNewPart sub.
Post was not outputting WFOStuff for NewPart during MP-ESO-OTAP condition.
Deleted all occurances of TagInit, TagInc and Tag#.
Replaced with PartNum# for better WFO handling.
DWB}

{4/17/97,
Modified: LongHand (FW) B001.12d
Created: LongHand (FW) B001.12e
Added SetPass1 at OpGuts IF Milling AND IF AutoCycle.
This fixed problem with returning to FirstHome at end of prog when final Operation consisted of
NoRepAutoCycle or XYZRepAutoCycle types.
ZonlyRepAutoCycle type did not seem to create this problem.
DWB}

{7/15/97
Modified: LongHand (FW) B001.12e
Created: LongHand (FW) B001.12f
For: Gibbs & Associates
Versions: Catalyst v3.35C/ComPost2 MSL 68K
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/ComPost2 MSL 68K
Versions: ncCad 4.33.02/ncEDM 4.33.01/ncPost 4.33.10/ComPost2 MSL 68K
Versions: ncCad 4.33.02/ncMAT 4.21.19/ncPost 4.33.10/ComPost2 MSL 68K
Improved handling of MultipleParts OneToolAllParts Output.
Rewrote MPLoop sub.
Simplified logic for handling OneToolAllParts situations.
No more need to keep track of Current Tool FirstOp, CurrentOp and LastOp.
Only using Vars(1) and (2).
Var(3) and Flags(2) and (3) no longer needed.
Deleted Var(3), NextToolOp# at ProgStart.
Deleted Flags(2) and (3) at ProgStart.
Deleted DoParts sub.
No longer necessary.
Deleted GetToolFirstOp sub.
No longer necessary.
Deleted GetToolLastOP sub.
No longer necessary.
Changed Var(8) to Var(3), LongHand Pecking at DoPeck, DrillFeature and ProgStart.
Changes made per Fanuc 6M NoSubs M877.89.1:
Fixed bug during MultipleParts AllToolsOnePart Output.
Commented out NOT FirstPart call to InitOp at MPallTools1P.
Was causing ncPost to beep and issue a series of alerts at start of additional Parts.
Problem disappeared if output was aborted and restarted, second processing of output, or
processing of output after any other MultipleParts/NoMPs situations.
Added FirstPart AND FirstOperation condition for calling InitOp at MPLoop sub.
Fixed MultipleParts WorkFixtureOffset bug.
Rewrote MPLoop sub.
Changed EachPart/NextPart loop to EachWFO/NextWFO loop.
EachPart/NextPart loop was causing coordinates of additional Parts to be affected by any
values entered into invisible EquallySpacedOffsets Edit Fields.
Deleted BadMPWFOReport sub and calls to same.
Deleted output comment regarding MultipleParts WorkFixtureOffsets and values in
EquallySpacedOffsets Edit Fields.
Rewrote XYZRepAutoCycle sub.
No longer necessary to Track Tool between Parts.
Added RapidC Move to StrtPos and ZCP2C inside of EachRep/NextRep loop just prior to
EACHFeat/NEXTFeat Loop.
Deleted TrackNo# FORMULAs of Vars(4) through (6).
Added CRCOffC and call to ExitMove inside of EachRep/NextRep loop just after EACHFeat/NEXTFeat
Loop.
Added SetSRSubMove at end of AutoCycCutSub2.
Deleted Vars(6) and (7) at end of ToolPath.
Deleted Vars(4) through (7) at ProgStart.
DWB}

{8/7/97,
Modified: LongHand (FW) B001.12f
Created: LongHand (FW) B001.12g
Changed Flag(1) to Flag(2).
Final changes to correct MultipleParts AllToolsOnePart Output bug.
Placed IF ToolChangeAtHome? SetHome logic inside EachOp/IF FirstOperation?/NextOp loop at InitOp
sub.
Deleted InitOp calls at MPallTools1P, MP1ToollAllPfu, MP1ToollAllPXcp, NoMPs and MPLoop subs.
Added InitOp call following ProgStart call at Start of executable Prog, Top Level.
Other Fine Tuning Modifications.
Deleted OpenSub command at InitOp sub.
Deleted LoadFeat Home code at NewToolOp2 sub.
Changed MoveXY to PRIME Home at NewToolOp2 sub.
Moved WFOStuff call from SameToolOp3 sub to SameToolOp2 sub.
Deleted LoadFeat FirstHome code at End2 sub.
Changed MoveXY to PRIME FirstHome at End2 sub.
Deleted Post command at End3 sub.
DWB}

{10/18/97,
Modified: LongHand (FW) B001.12g
Created: LongHand (FW) B001.12h
For: Gibbs & Associates
Versions: Catalyst v4.21.03(mac)/ComPost2 MSL 68K
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/ComPost2 MSL 68K
Added routines for Non-AutoCycle FeedConnect Repeats w/ ZMoves.
Routines needed to make sure that Tool clears floor of contour.
Added FlagF(3) at ProgStart.
Standard Initialization.
Added comparison bewteen FIRST SPZ# and final EPZ# at end of ToolPath.
Flag(3) set if Tool needs to move up to get to FIRST SPZ#.
Added Flag(3) test at ExitMove.
Flag(3) moves Tool up prior to StrtPos.
FlagF(3) leaves Tool at higher final EPZ#.
Also sets Flag(3) for EntryMove test to move Tool to ZIn following move to StrtPos.
Added Flag(3) EntryMove test at XYZRep.
Moves Tool to ZIn following move to StrtPos.
Added FlagF(3) at end of XYZRep.
Clears Flag(3) to avoid problems with future Operations.
DWB}

{11/12/97
Modified: LongHand (FW) B001.12h
Created: LongHand (FW) B001.12i
For: Gibbs & Associates
Versions: Catalyst v4.21.11(mac)/ComPost2 MSL 68K
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/ComPost2 MSL 68K
Eliminated all considerations regarding Non-AutoCycle ZShifting FeedConnect Repeats with ZMove.
Fanuc 6M M001.89 does not raise Tool for safety clearance and neither should this post.
User is responsible for making sure Tool will clear or should select Entry/Exit Connect.
Deleted all related changes made on 10/18/97.
Added condition to test for NOT EmptyLine at EntryMove sub.
This suppresses FeedEntC only block in case ZEndPoint of Previous Repeat equals ZStartPoint of
Next Repeat.
Deleted Move to ZInC for Non-AutoCycle FeedConnect Repeats with ZMoves at ExitMove sub, see 12/9/93.
Added IF NOT NoZMoves? condition at XYZRep sub.
Calls EntryMove sub.
Deleted FeedEntC on FeedC MoveSXYC block for additional FeedConnect Repeats at XYZRep sub.
DWB}

{1/15/98
Modified: LongHand (FW) B001.12i
Created: LongHand (FW) B001.12j
For: Gibbs & Associates
Versions: Catalyst v3.35C/ComPost2 1.1b3
Versions: Catalyst v4.21.30(mac)/ComPost2 1.1b3
Deleted SetSRSubMove at end of AutoCycCutSub2.
DWB}

{1/29/98
Updated: LongHand (FW) B001.12j
Created: LongHand (FW) B001.15
Updated for Catalyst v3.35C per LongHand M001.12j Format.
Added Var(4) for conditional SpeedC test at ProgStart sub.
Added Var(5) for conditional CS# test at ProgStart sub.
Added Flag(1) for conditional ProgStop test at ProgStart sub.
DWB}

{5/15/98,
Updated: LongHand (FW) B001.15
Created: Fanuc 6M [FW] NBU99.16
For: Gibbs & Associates
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Corrected support for Linear ChangeCS.
Linear ChangeCS covers Multiple CSGroups in One Plane.
Post does not output CSWFOComments, G52Comments or G52Stuff for this situation.
IF AAxisAvail? OR BAxisAvail? does not automatically support this.
Deleted IF AAxisAvail? OR BAxisAvail? at DoCSComment.
Post retracts Tool at SameTool for this situation.
Retraction is only necessary for AChange OR BChange situations.
Changed ChangeCS? to AChange? OR BChange at SameToolOp1.
Changed ChangeCS? to AChange? OR BChange at SameToolOp3.
Simplified ClearCSOffset occurance.
ClearCSOffset occurs at 3 different places, including at the output of CSComments.
Discovered that CheckPass is a good place for all situations.
Deleted ClearCSOffset at CSG52, DoCSWFOComment and CSComments Procedures.
Added ClearCSOffset at CheckPass.
Moved IF FirstOperation? OR NewTool? OR ChangeCS? Boolean from CSG52 to G52Stuff.
Moved call to CSComments Procedure to inside IF UseComments? Boolean at DoOpComments.
To suppress when Comments are turned off.
Added AbsValueC, IncValueC and AbsOrIncC Procedures.
Simplifies readability of Prog.
Reduces redundancy of output.
Allows us to return to earlier versions
Improves upon earlier problem with incremental output of ShiftPC command at CloseMP while
allowing us to return to .85 OfstOff blocks.
AbsValueC called from AbsOrIncC.
IncValueC called from AbsOrIncC, DoAbsOrInc and DoDrillAbsOrInc.
IncValueC called for OfstOff Blocks at NewToolOp1, two places at SameToolOp1 and DoAbsOrInc.
AbsOrIncC called for ShiftPC Block at CloseMP.
AbsOrIncC called from DoAbsOrInc, DoDrillAbsOrInc and RestoreAbsOrInc.
AbsOrIncC called for Home Block at NewToolOp2.
AbsOrIncC called for FirstHome Block at End2.
Additional modifications.
Added CRCOffC at AutoCycCutSub2.
Corrects unique situation in ZonlyRepAutoCycle where one Operation is CRCLeft and LastFeat
is an ArcFeat followed by another Operation that is CRCRight.
CRCOffC did not get output at end of CRCLeft Operation and CRCOnC did not get output at start
of CRCRight Operation.
Oddly, CRCOnC only outputs if CRCOffC has been output, not if CRCSide changes.
Moved Boolean Test of Flag(3) at MP1ToollAllPfu and MP1ToollAllPXcp to MPLoop.
Added following Procedures:
NewPart1
Called at MPLoop.
Similar to SameTool1.
NewPart2
Called at MPLoop.
Similar to SameTool2.
NewPart3
Called at MPLoop.
Similar to SameTool3.
6/18/98
Changed to Lowercase Procedure Names.
Added comments to all SetFlag, SetFlagF and IF Flag statements.
Added Flag(6) to switch from B-Style to C-Style at progStart.
TRUE = B-Style Output, FALSE = C-Style Output.
Added Flag(7) to switch from local coordinates to uncompensated coordinates at progStart.
TRUE = Local WFO Coordinates, FALSE = D-Style Output.
Added pertinent comments at progStart.
Added IF Equal? NumOfCS# Num#('1') at progStart.
This is a standard 3 Axis - Output M-Style.
Changed literal 'G80' to DrillOff at end of IF Drilling.
Changed literal 'G80' to DrillOff at firstOp1 and newToolOp3.
To allow for change in FORM without having to recompile.
Changed SpeedC to Speed at for LAST ProgStop condition at sameToolOp3.
6/30/98
Deleted Gibbs System XYRepeat support.
Virtual only support ZShiftOnly Repeats.
Deleted CycleWarning procedure.
Added cutAutoCycle procedure.
Called for all AutoCycle Operations.
Supports NoRepeat and ZShiftOnly Repeats.
Replaces noRepAutoCycle and zonlyRepAutoCycle procedures
Deleted xYZRepAutoCycle procedure.
Changed XYZRep to ZOnlyRep.
Supports ZShiftOnly Repeats.
Moved LongDrillStuff from OpGuts to LongDrillStuff.
Rewrote OpGuts Procedure.
Deleted Drilling Repeats at IF Drilling.
Rewrote PostScript instructions at progStart.
7/22/98
Reverted back to Gibbs System XYRepeat support.
IF setup correctly, Virtual will support XShift and/or YShift Repeats for both Contour and
Patterns.
Rules for correct setup (as best as I understand at the moment).
Geometry CSGroup must be oriented to a plane that intersects CS#1 in a perpendicular direction.
Example, XZPlane and YZPlane, and any oriented rotation of either Plane around the XYPlane.
Any change in the ZPitch of the Origin will cause ZShiftOnly Repeat Operation.
Set Desired ZStep so that Operation will result in multiple passes.
NOTE: If correctly setup, ZStep would be misleading.
Step will be in line with depth axis of CSGroup.
Restored with slight modifications the xyRep Procedure.
Restored related code to OpGuts Procedure.
ZShiftOnly Contour Operations remain Full SepSub.
Any customer requesting G92 Style will require copying code from archives.
Deleted Deceleration from ToolPath LineFeat and ArcFeat.
There are plans to support this in the future through the use of Construction Tools in the
Virtual Process.
10/1/98
Versions: Virtual 4.29.75(Mac)/ComPost2 1.7b10 (Mac)
Versions: Virtual 4.29.75(Win)/ComPost2 1.7b10 (Win)
Added Post Header Comment at top.
Modified Prog for better usage.
Added loadPRIMEZCP2 Procedure.
Added pRIMEZCP2 Procedure.
Added loadPRIMEZCP3 Procedure.
Added pRIMEZCP3 Procedure.
Added connectC Procedure.
Moved absValueC, incValueC and absOrIncC Procedures to before entryMove Procedure.
Modified exitMove Procedure.
Added finishSub1 Procedure.
Deleted exitMove2 Procedure.
Modified handling of Pattern AutoCycles.
Added autoCycExitMove Procedure.
Added getACSPXY Procedure.
Modified autoCycCutSub1 Procedure.
Modified autoCycCutSub2 Procedure.
Modified cutAutoCycle Procedure.
Combines old NoRepAutoCycle, XYZRepAutoCycle and ZonlyRepAutoCycle Procedures.
Modified handling of Milling Operations.
Modified milling Procedure.
Combines old Milling and XYZRep Procedures.
Modified handling of Drilling Operations.
Modified drillStuff Procedure.
Renamed to drilling.
Moved code from opGuts Drilling.
Modified longDrillStuff Procedure.
Renamed to longDrilling.
Modified opGuts Procedure.
Added FirstOperation? OR NewTool? condition for RapidF# at opGuts Procedure.
Forces FeedEntC/FeedRateC while allowing for conditional during SameTool.
Now it just tests for AutoCycle, Milling OR Drilling.
Calls cutAutoCycle, milling OR drilling Procedures respectfully.
Expanded Advanced Milling Flags for easier developing.
Changed Flag(7) to be dedicated to D-Style Output only.
Added Flag(8) for Toggle between D-Style and G52-Style Output.
5 possible combinations:
BStyle/G52Style Flag(6) FlagF(7) FlagF(8)
BStyle/DStyle Flag(6) FlagF(7) Flag(8)
CStyle/G52Style FlagF(6) FlagF(7) FlagF(8)
CStyle/DStyle FlagF(6) FlagF(7) Flag(8)
DStyle FlagF(6) Flag(7) Flag(8)
DWB}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(TrackZ#,4)
FORMAT(Recall#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,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

cSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

cSWFO:
'G' ADD# cSPartNum# Num#('53')
RETURN

wFO:
'G' ADD# PartNum# Num#('53')
RETURN

wFOStuff:
IF Flag?('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
cSWFO
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
wFO
ELSE
WFO1
END
END
ELSE
IF WFOCS?
IF ChangeCS?
cSWFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time wFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

cSG52:
SeqC 'G52X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
RETURN

g52Stuff:
IF NOT Flag?('7') AND NOT WFOCS?
IF FirstOperation? OR NewTool? OR ChangeCS?
IF MultipleParts?
IF WorkFixtureOffsets?
cSG52
END
ELSE
cSG52
END
END
END
RETURN

doCSComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

doCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
'( ' cSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ#
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
END
' )' EOL
IF NOT Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
SetFlag('2') { Need to output wFOStuff }
END
END
RETURN

cSComments:
doCSComment
IF WFOCS?
doCSWFOComment
END
RETURN

doPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
'( PART NO. ' PartNum# ' )' EOL
END
RETURN

doCycleComment:
IF UseComments? AND SubComment?
'( CYCLE START )' EOL
END
RETURN

doOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
restoreScale
cSComments
END
RETURN

cSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'A0.'
ELSE
'A' CSOffsetA#
END
END
RETURN

cSAngleAC:
IF AChange?
cSAngleA
END
RETURN

cSAngleB:
IF BAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'B0.'
ELSE
'B' CSOffsetB#
END
END
RETURN

cSAngleBC:
IF BChange?
cSAngleB
END
RETURN

pSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

pSStuff:
RETURN

doPostScript:
pSInit
EachPS
SeqC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
pSInit
EachEOPS
SeqC EndOpPS EOL
pSStuff
NextPS
RETURN

loadPRIMEZCP2:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane2#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

pRIMEZCP2:
IF NOT Flag?('7')
PRIME ZCP2
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

loadPRIMEZCP3:
IF NOT Flag?('7')
LoadFeat Num#('0') Num#('0') PRIME ClearancePlane3#
ELSE
LoadFeat Num#('0') Num#('0') ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

pRIMEZCP3:
IF NOT Flag?('7')
PRIME ZCP3
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane3#
END
RETURN

connectC:
IF FeedConnect?
FeedC
ELSE
RapidC
END
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

entryMove:
IF Repeats? AND ZShiftOnly? AND FeedConnect?
SeqC FeedC ZInC
IF NOT EmptyLine?
FeedEntC
END
EOL
ELSE
IF FeedEntry?
SeqC FeedC ZInC
IF NOT EmptyLine?
FeedEntC
END
EOL
ELSE
SeqC RapidC ZInC EOL
END
END
RETURN

autoCycExitMove:
SeqC absOrIncC CRCOffC
IF FIFO?
FeedC pRIMEZCP2 FeedEntC
ELSE
RapidC pRIMEZCP2
END
EOL
RETURN

exitMove:
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
ELSE
IF FIFO?
SeqC CRCOffC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
END
RETURN

finishSub1:
SeqC CRCOffC
IF NOT FeedConnect?
loadPRIMEZCP3
IF ZMove?
IF AutoCycle?
pRIMEZCP3
ELSE
IF FIFO?
FeedC pRIMEZCP3 FeedEntC
ELSE
RapidC pRIMEZCP3
END
END
END
END
EOL
RETURN

formatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN

doPeck: { longDrillStuff }
IF GreaterThan? SUB# Recall# Num#('3') Peck# SPZ# { IF OldZ - Peck# > Depth }
Save# Num#('3') SUB# Recall# Num#('3') Peck# { Save New Peck Depth }
SeqC Feed 'Z' Recall# Num#('3') FeedEntC EOL { Move to New Peck Depth }
Rapid
IF PeckFullRetract?
SeqC ZCP2 EOL { Retract Tool Full Out }
END
FORMAT(ADD#,4)
SeqC 'Z' ADD# Recall# Num#('3') Retract# EOL { Move to Retract Position }
TrackZNO# ADD# Recall# Num#('3') Retract# { Update Status Register }
FORMAT(ADD#,5)
END
RETURN

drillFeature: { longDrillStuff }
SeqC RapidC MoveSXYC EOL
SeqC ZCP2C EOL
IF Peck?
FORMAT(Recall#,4)
Save# Num#('3') ClearancePlane2#
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck doPeck
FORMAT(Recall#,5)
END
SeqC FeedC MoveSZC FeedEntC EOL
IF Dwell?
SeqC 'G4X' Dwell# EOL
END
IF FIFO? OR Tap?
SeqC FeedC ZCP2C EOL
IF RetractToCP1?
SeqC RapidC ZCP1C EOL
END
ELSE
IF RetractToCP1?
SeqC RapidC ZCP1C EOL
ELSE
SeqC RapidC ZCP2C EOL
END
END
RETURN

toolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC MoveSXYZC EOL
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqC formatArc ArcFeedC EOL
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

autoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
IF Repeats? AND ZShiftOnly?
entryMove
END
SeqC incValueC EOL
RETURN

autoCycCutSub2: {part 2}
SeqC absOrIncC CRCOffC
IF FIFO?
FeedC ZCP2C FeedEntC
ELSE
RapidC ZCP2C
END
EOL
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

cutAutoCycle:
IF Repeats? AND NOT ZShiftOnly?
EachRep
IF NOT FirstCycle?
IF FIFO?
Rapid
END
SeqC RapidC StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
END
EACHFeat
doCycleComment
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqC RapidC MoveSXYC EOL
END
autoCycCutSub1
IF Repeats? AND ZShiftOnly?
EachRep
IF NOT FirstCycle?
doCycleComment
IF SPXMove? OR SPYMove?
SeqC connectC incValueC MoveSXYC EOL
END
absOrIncC
IF FeedConnect?
entryMove
ELSE
IF FeedEntry?
SeqC RapidC ZCP2C EOL
END
entryMove
END
SeqC incValueC EOL
END
toolPath
IF NOT FeedConnect?
autoCycExitMove
END
NextRep
ELSE
entryMove
toolPath
END
autoCycCutSub2
NEXTFeat
IF Repeats? AND NOT ZShiftOnly?
finishSub1
NextRep
END
SetPass1
RETURN

milling:
IF Repeats?
EachRep
doCycleComment
IF SPXMove? OR SPYMove?
SeqC connectC MoveSXYC EOL
END
IF FeedConnect?
entryMove
ELSE
IF FeedEntry?
SeqC RapidC ZCP2C EOL
END
entryMove
END
toolPath
finishSub1
NextRep
ELSE
entryMove
toolPath
END
RETURN

setDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN

drilling:
SeqC DrillCP EOL
GetCycle
SeqC Cycle FromCP StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
SeqC DrillOff Rapid ZCP3 EOL
RETURN

longDrilling:
SeqC DrillCP EOL
GetCycle
SeqC StrtPosC EOL
toolPath
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqC RapidC ZCP3C EOL
END
RETURN

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF NOT Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ClearCSOffset
END
RETURN

opGuts:
ResetCRCNum
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedEntC/FeedRateC }
END
IF Milling?
SeqC ZCP2C EOL
IF AutoCycle?
cutAutoCycle
ELSE
milling
END
exitMove
ELSE
IF Drilling?
drilling
END
END
RETURN

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
SetFlagF('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlag('3') { Incrementing WFOs in effect }
SetFlag('4') { This post supports IncWFO/DecWFO }
SetFlag('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlagF('7') { TRUE = D-Style Output }
SetFlagF('8') { TRUE = D-Style Output, FALSE = Local G52-WFO Coordinates }
IF PSComment? AND UseComments?
'Utility Data:' EOL
' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL
' At Op End: All literals and commands will appear at the end of the operation.' 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
END

IF NOT Flag?('7')
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlag('7')
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('6')
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
ELSE
SetFlag('7')
END
ELSE
IF LTEqual? NumOfCS# Num#('6') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
END
END
END
RETURN

initOp:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
IF UseComments?
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
restoreScale
RETURN

firstOp1:
Seq Plane CRCOff DrillOff EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

firstOp2:
SeqC wFOStuff EOL
g52Stuff
SeqC Speed SpinOn EOL
checkPass
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
RETURN

firstOp3:
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

newToolOp1:
SeqC CoolOff EOL
SeqC incValueC OfstOff EOL
RETURN

newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqC absOrIncC Rapid PRIME Home SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

newToolOp3: {Start new Operation}
Seq Plane CRCOff DrillOff EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
doPartCycleComment
doOpComments
doPostScript
RETURN

newToolOp4:
SeqC wFOStuff EOL
g52Stuff
SeqC Speed SpinOn EOL
checkPass
SeqC AbsOrInc Rapid StrtPos cSAngleA cSAngleB EOL
RETURN

newToolOp5:
SeqC OfstOn EOL
SeqC CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC incValueC OfstOff EOL
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqC incValueC OfstOff EOL
END
END
RETURN

sameToolOp2: {Start new Operation}
doPartCycleComment
doOpComments
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
SeqC wFOStuff EOL
g52Stuff
IF LAST ProgStop?
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB Speed SpinOn EOL
SeqC OfstOn EOL
SeqC CoolOn EOL
ELSE
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB SpeedC EOL
IF NewToolOffset? OR AChange? OR BChange?
SeqC OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

end1:
SeqC CoolOff EOL
SeqC incValueC OfstOff EOL
RETURN

end2:
doEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqC absOrIncC Rapid PRIME FirstHome SpinOff EOL
ELSE
SeqC SpinOff EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqC absOrIncC
IF AAxisAvail?
cSAngleA
END
IF BAxisAvail?
cSAngleB
END
EOL
SeqC Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqC 'M0' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqC ProgStop EOL
END
END
RETURN

end3:
SeqC EOP EOL
EOR EOL
Close
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
RETURN

mPallTools1P: {Multiple Parts, All Tools 1 Part}
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

mP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

mP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

noMPs: {no multiple parts}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
newToolOp2
newToolOp3
newToolOp4
newToolOp5
ELSE {implied SameTool?}
sameToolOp1
sameToolOp2
sameToolOp3
END
END
opGuts
RETURN

masterSub:
IF MultipleParts?
IF AllToolsOnePart?
mPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
mP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
mP1ToollAllPXcp
END
END
ELSE
noMPs
END
RETURN

endPartSub:
{End of program ************************************************************}

{finish last operation}
end1
end2
RETURN

newPart1: {Finish off last Part}
IF FullUp?
SeqC CoolOff EOL
SeqC incValueC OfstOff EOL
END
{doEndOpPS}
RETURN

newPart2: {Start new Part}
sameToolOp2
RETURN

newPart3: {Start new Part}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SeqC wFOStuff EOL
g52Stuff
SeqC PlaneC AbsOrInc Rapid StrtPos cSAngleA cSAngleB Speed EOL
IF FullUp?
SeqC OfstOn EOL
SeqC CoolOn EOL
END
RETURN

toggleIncDecWFO:
IF Flag?('3') { Incrementing WFOs in effect }
SetFlagF('3')
ELSE { Decrementing WFOs in effect }
SetFlag('3')
END
RETURN

mPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
ELSE
LastWFO
END
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
masterSub
NextOp
endPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart? AND Flag?('3') { Incrementing WFOs in effect }
masterSub
ELSE
IF LastPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
masterSub
ELSE
newPart1
newPart2
newPart3
opGuts
END
END
ELSE
masterSub
END
IF LastOp?
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') Num#('0')
END
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
IncWFO
NextWFO
DecWFO
ELSE { Decrementing WFOs in effect }
DecWFO
NextPrevWFO
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
ELSE
NextPart
END
RETURN

{Start of executable Prog, Top Level ****}

progStart {setup and initializations}
initOp

IF MultipleParts?
IF WorkFixtureOffsets?
{'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL}
END
IF AllToolsOnePart?
mPLoop
ELSE
EachOp
IF FirstOperation?
Save# Num#('1') Operation#
END
NextOp
mPLoop mPLoop mPLoop mPLoop mPLoop
mPLoop mPLoop mPLoop mPLoop mPLoop
mPLoop mPLoop mPLoop mPLoop mPLoop
mPLoop mPLoop mPLoop mPLoop mPLoop
mPLoop mPLoop mPLoop mPLoop mPLoop
endPartSub
END
ELSE
EachOp
masterSub
NextOp
endPartSub
END
end3


Wyszukiwarka

Podobne podstrony:
Fanuc 6M [FW] B001 16
Fanuc 6M [PMW] NDT40 16
Fanuc 6M [NW] D001 16
Fanuc 6M [PW] C001 16
Fanuc 6M [NW] NDU99 16
Fanuc 6M [6D] MT02 16
Fanuc 6M linmov M001 16 2m
Fanuc 6M [BR] MT12 16
Fanuc 6M linmov M001 16 2
Fanuc 6M [DM] B180 16
Fanuc 6M LM [AP] NCT45 16 1
Fanuc 6M AH HA [SL] MQ18 16 2
Fanuc 6M LM [AP] BT45 16 1
Fanuc 6M LM [AP] CT45 16 1
Fanuc 6M LM [AP] NMT45 16 2
Fanuc 6M M001 16 2m

więcej podobnych podstron