Tosnuc 777 Tosh [PI] NCQ42 16


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

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

{4/17/96
Initial: Fanuc 6M (FW) B001.11.01
Created: Fanuc 6M (FW) B001.12.01
Comment: Changed version number to reflect new identification scheme.
Jim Radcliffe}

{6/14/96
Initial: Fanuc 6M (FW) B001.12.01
Created: Fanuc 6M (FW) B001.12.02
Comment: Modified CRC handling to reflect the way I do it and same as M001.89.
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.02
Created: Fanuc 6M (FW) B001.12.03
Comment: Added Missing prog formatter for CSSubID#.
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.03
Created: Fanuc 6M (FW) B001.12.04
Comment: In MP1ToollAllPXcp added positioning BEFORE OfstOn!
Jim Radcliffe}

{6/24/96
Initial: Fanuc 6M (FW) B001.12.04
Created: Fanuc 6M (FW) B001.12.05
Comment: Simplified
reduced nnnnOp# sub calls to reflect the MPs cut off points.
Moved WFOstuff to FirstOp1 & NewToolOp3
Jim Radcliffe}

{6/25/96
Initial: Fanuc 6M (FW) B001.12.05
Created: Fanuc 6M (FW) B001.12.06
Comment: Further simplified WFO handling.
Jim Radcliffe}

{8/10/96
Initial: Fanuc 6M (FW) B001.12.06
Created: Fanuc 6M (FW) B001.12.07
Comment: Modifications per bug reports from Aavid, myself and Danny Ball
Corrected output of MultipleParts WorkFixtureOffsets OneToolAllParts ExitClearancePlane.
Modified WFOStuff sub to allow output for MultipleParts WorkFixtureOffsets
The output was being suppressed!
I then simplified WFOStuff sub.
Added DecWFO after NextWFO and added IncWFO after NextPrevWFO.
This will leave the output of WFOStuff on the correct WFO!
In doing the above fixes, OpenMP and CloseMP were modified with no change to output.
Added 2 new Prog Subs DoCSWFOOps & DoCSG52Ops
This simplifies and shortens the prog and CloseMP
Deleted the use of Flag#2
It was just the opposite of the WFOCS boolean!
Corrected returning A and B axis in End2 per Danny Ball
Jim Radcliffe}

{8/12/96
Initial: Fanuc 6M (FW) B001.12.07
Created: Fanuc 6M (FW) B001.12.08
Develop: ComPost2 68k, Catalyst68K v3.04.10.C
Comment: Corrected output of WFOStuff & Simplified WFO subs.
Deleted the use of NeedWFO1 boolean
Added Flag #2 to control output of WFOStuff.
Jim Radcliffe}

{10/2/96,
Initial: Fanuc 6M (FW) B001.12.08
Created: Fanuc 6M (FW) B001.14
Simplified Toolpath Linefeat by the addition of CkCRC and CkCRCNum subs.
MPK}

{10/2/96,
Initial: Fanuc 6M (FW) B001.14
Created: Fanuc 6M (PW) C001.14
modified for partial WFO output, MPK}

{11/22/96
Versions: Catalyst v3.23C/Compost 4.21.37/v1.0b1
.14 Additions:
Deleted Flag(2) 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.
Modified WorkFixtureOffset logic.
Added Flag(2) for WFOStuff at setup and initializations.
Added SetFlag(2) for EquallySpacedOffsets at OpenMP sub.
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(2) 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.
Added SetMaxFeed(12700) for Metric VNC files.
Moved Speed SpinOn after MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
DWB}

{2/25/97
Modified: Fanuc 6M (PW) C001.14
Created: Fanuc 6M (PW) C001.15
For: Gibbs & Associates
Versions: Catalyst v3.30C/ComPost2 MSL 68K
Corrected problem with StrtPos for MultipleParts OneToolAllParts ExitClearancePlane.
Only concerns WFOCS and G52 style programs.
Post was not outputting good position in Main Program Output for FirstOperation only.
Problem was corrected by doing ClearCSOffset prior to StrtPos.
Rewrote code at following subs:
Added ClearCSOffset at CSG52 sub.
Rewrote logic at G52Stuff sub.
Corrected problem with CS related stuff not being output.
Caused by only testing AAxisAvail.
Added BAxisAvail test at DoCSComment sub.
Added AAxisAvail test at DoCSWFOComment sub.
Added BAxisAvail test at DoCSWFOComment sub.
Changed name of OffsetComments sub to CSComments and rewrote logic.
Modified handling of G52 style output for MultipleParts WorkFixtureOffsets.
Only concerns AllToolsOnePart and OneToolAllParts FullUp situations.
Reduces length of file by eliminating redundancy of G52 blocks.
Moves G52 blocks from Main Program to Sub Programs.
Extra unnecesary sub programs are combined into fewer subs.
Returns to old M001 style of handling MultipleParts WorkFixtureOffsets.
New style only needed for WFOCS style programs.
Rewrote logic at DoCSG52Ops sub.
Rewrote logic at OpenMP sub.
Rewrote logic at DoCSWFOOps sub.
Rewrote logic at CloseMP sub.
Changed IF WorkFixtureOffsets? to IF WFOCS? at SubCSMP sub.
Added Flag(5) to Suppress Redundant WFO for MultipleParts WorkFixtureOffsets programs.
Only concerns OneToolAllParts ExitClearancePlane situations.
NOTE: I believe there is a bug with ToolChanges.
For WFOCS and G52 style programs, FirstHome command at End2 sub is outputting absolute,
unshifted CS#1 value regardless of final CSGroup.
Should be shifted value corresponding with active CSGroup consistant with NewToolOp2 sub.
For MultiplePart EquallySpacedOffsets programs, Home command at NewToolOp2 sub and FirstHome
command at End2 sub are outputting shifted values corresponding with active CSGroup.
Should be absolute, unshifted CS#1 value.
These bugs have not been verified and are only my observations while testing the Tutorial Part.
DWB}

{5/15/98,
Updated: Fanuc 6M (PW) C001.15
Created: Fanuc 6M (PW) C001.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 G52Stuff, DoCSComment and DoCSWFOComment.
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 5 different places, including at the output of CSComments.
Discovered that CheckPass is a good place for all situations.
Deleted ClearCSOffset at CSComments.
Caused simplification of Procedure.
Deleted ClearCSOffset at CSG52, DoCSWFOComment, OpenMP and SubCSMP Procedures.
Added ClearCSOffset at CheckPass.
Additional modifications.
Moved IF FirstOperation? OR NewTool? OR ChangeCS? Boolean from CSG52 to G52Stuff.
Moved DoSubComment Procedure to before DoOpComments Procedure.
To keep CSStuff together.
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.
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 call to InitOp Procedure to top level at end of Prog.
Personal Preference.
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 Seq to SeqC at autoCycCutSub1.
Added CRCOffC to AutoCycle ZCP3C at end of IF Milling?
Moved CRCOffC to before FeedC and RapidC for ZCP3C at end of IF Milling?
To stay consistant with CRCOnC/CRCOffC Rapid/Feed/CWArc/CCWArc throughout Prog.
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.
Rewrote OpGuts Procedure.
Limited Milling Repeats to ZShiftOnly at IF Milling.
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.
Restore 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.
9/1/98
Added forced FeedRate for RI-RO Milling Operations.
When a RI-RO Operation follows either a FI-RO or RI-RO Operation, and both contain the same
FeedRate values, the second Operation does not get a FeedRate output due to the conditional
FeedRateC command. A problem arises for MultipleParts - OneToolAllParts - ExitClearancePlane
Programs when both Operations use different Tools, and a third Operation uses the SameTool as the
second Operation, but has a different FeedRate value. The result is that when the Program moves
to machine the additional parts with the second Operation at the FeedRate value of the third
Operation. It is safer to just force the FeedRate in the second Operation.
Added FORMAT#7, '#' at Prog Numeric Format Definitions.
Added RapidF# to Format#7 at Prog Numeric Format Definitions.
RapidF# equals zero and this FORMAT allows for nothing to be output.
Added RapidF# at entryMove Procedure.
Added IF FirstOperation? OR NewTool? condition two places at entryMove Procedure.
To force FeedEnt and RapidF#.
SameTool condition outputs conditional FeedEntC.
Added IF NOT AbsoluteMoves? Boolean and SetSRXYtoEP command to zonlyRep.
This fixes problem with Incremental output of move back to StrtPos for additional passes.
Deleted UseSeparateSubCalls at ProgStart Procedure.
Deleted SetMaxSeparateSubCalls('50') at ProgStart Procedure.
Moved IF ToolChangeAtHome? Boolean and SetHome command from InitOp to FirstOp1.
Personal preference for moving Procedure call to top level at end of Prog on 5/15/98 was to
reduce it to one occurance, consistant with LongHand version where it works. However, it was
reported that the IF ToolChangeAtHome? Boolean and SetHome command occuring outside of
EachOp/NextOp loop was causing Windows version to crash. Duplicating problem required having a
part file open and a post processor loaded, and then opening a new part with one of the beta
masters. I was not able to duplicate this on the Macintosh.
Changed name of doCSG52Ops Procedure to doWFOOps.
Changed call of same two places at openMP.
Name was misleading because Procedure is also called for standard MultipleParts output, not just
G52Style and contents are identicle to M001.
DWB}

{9/1/98,
Initial : Fanuc 6M (PW) C001.16.4
Created: Tosnuc 777 Tosh [MTM] CU77.16
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Form":

1. Under Default Formats, changed P to ###.##;0.
2. Under Origins and Values, changed First Work Fixture Offset to H 901 and Last WFO
to H 999
3. Under Subs, changed Call Sub to G 72, Return from Sub to M 2, and Sub Call Label to O
4. Under Tool Offsets, changed Tool Length Offset Cancel to G 44
5. Under Program Stops, changed End Program to M 2
6. Under Drill Cycles, changed Peck, Partial Retract to G 77

Changes to "Prog":

1. Changed #6 Format (for Dwell). Also added FORMAT for Recall# and HelixPitch#.
2. Changed cSWFO and wFO subs to output G57H901 to H999.
Also added cSWFO4 sub to output G58H901 to H999 for the W-axis.
3. Added EOR line to startSub.
4. Changed formatArc output for FullArc and Helix cuts.
5. Changed Max number of WFO from 6 to 99.
6. Changed firstOp1, 2, & 3 to match the customer spec.
7. Changed newToolOp1, 2, 3, 4, & 5 to match the customer spec.
8. Changed sameToolOp1 & 3 to match the customer spec.
9. Changed end1, 2, & 3 to match the customer spec.
10. Added Save# Num#('11') to save the rotary current location.
11. Removed all calls to cSAngleA sub and re-wrote cSAngleB sub (horizontal machine).
This is an absolute table (output from 0 to 359.999) and need a minus sign for
CCW motions. To position at 0, 90, 180, and 270 degrees, we use M71 thru M77.
JHE}

{9/9/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16
Created: Tosnuc 777 Tosh [MTM] CU77.16.1
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Form":

1. Removed SeqC and EOL from wFOStuff calls and moved it into wFOStuff sub.
2. Removed G57 from cSWFO sub and moved it inside wFOStuff sub.
3. Removed all calls to cSWFO4 sub and move it inside wFOStuff sub.
4. added G58 block in doCSWFOOps sub.
9/15/98
5. Changed Z94. to Z2400/25.4 (full retract is 2400 mm).
6. Under firstOp3, newToolOp5, and sameToolOp3 added a check for RigidTap. If true,
do not output Speed and SpinOn.
7. Added the output of Speed and M843/M844 before RigidTap. Also added M845 to cancel
RigidTap mode.
8. Added 'F' FeedTapIPR#('1') for RigidTap and FORMAT for FeedTapIPR#.
JHE}

{9/28/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16.1
Created: Tosnuc 777 Tosh [MTM] CU77.16.2
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Prog":

1. Added Post Header Comment.
2. Changed EOR line in startSub to a space line.
3. Changed 'W0.' to 'W' TCZ# in wFOStuff, doCSWFOOps, firstOp3, newToolOp5, and
sameToolOp3 subs.
4. Added FORMAT to TCZ# and added SetTCZ('0') in firstOp1, newToolOp3, and
sameToolOp2 subs.
5. Added TCZ(n) inside Utility Data comment.
JHE}

{10/12/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16.2
Created: Tosnuc 777 Tosh [MTM] CU77.16.3
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Prog":

1. Changed space line in startSub to ASCII('13') ASCII('10').
JHE}

{10/20/98,
Initial: Tosnuc 777 Tosh [MTM] CU77.16.3
Created: Tosnuc 777 Tosh [MTM] CU77.16.4
For: Monitowoc Tool & Machining

Changes to Prog:
1) FormatArc - Deleted all IF FullArc? booleans. Made all
XYZ moves non-conditional.
CDH}

{10/28/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16.4
Created: Tosnuc 777 Tosh [MTM] CU77.16.5
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Prog":

1. Added 'G79', G72O9918, & G72O9919 back boring support.
Added PIN(1) for G79, PIN(2) for O9918, and PIN(3) for O9919.
2. Added SetPalletIn('1') in firstOp1 and newToolOp3 so back boring default to G79.
3. Added FORMAT for ClearancePlane2#, ClearancePlane3#, ZDepth#, FeedEntry#,
SpeedRPM#, CalcZFmSurf#, & DIV#.
4. Added calcRetract sub to calculate the move off center distance.
5. Added PIN(n) inside Utility Data comment.
6. Added the output of G72O9918 & G72O9919 inside toolPath sub.

O9918 O9919
G1 Z[V173] F50. G1 Z[V173] F50.
M5 M0
M3 M3
G1 Z[V174] F[V175] M8 G1 Z[V174] F[V175] M8
G4 P[V176] G4 P[V176]
G1 Z[V173] F[V175*3] M9 G1 Z[V173] F[V175*3] M9
M5 M0
M4 G0 Z[V170]
G1 Z[V170] F50. M2
G0
M2
JHE}

{11/6/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16.5
Created: Tosnuc 777 Tosh [MTM] CU77.16.6
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Prog":

1. Added G72O9920 Gun Drilling support using FIStopRO cycle.
2. Added supressing of SpinOn in firstOp3 and newToolOp5 if FIStopRO.
3. Added the output of G72O9920 inside toolPath sub.

O9920
G0 Z[V173+1.]
M0
G0 Z[V173]
G1 Z[V173-0.5] F5. S200 M4
M5
S[V178] M3
G1 Z[V174] F[V175]
Z[V174+0.05]
M5
M0
G0 Z[V173+1.]
M0
G0 Z[V170]
M2
JHE}

{11/9/98,
Initial : Tosnuc 777 Tosh [MTM] CU77.16.6
Created: Tosnuc 777 Tosh [MTM] CU77.16.7
Customer: Manitowoc Tool & Machining, Dean Stuckmann - 920/682-8825

Changes to "Prog":

1. For Back Boring cycle (G79), changed Q to be 0.01 and removed CalcZFmSurf#.
JHE}

{2/1/99
Initial: Tosnuc 777 Tosh [MTM] CU77.16.7
Created: Tosnuc 777 Tosh [PI] Cxxx.16
ForUser: Pride Industries
Control: Tosnuc 777
Machine: Toshiba BPD13F.R22
Develop: Compost2 PPC 1.7b15, Virtual 5.04.06
Comment: New processor per fax and conversation with Carl Mackey
Added G27 and G53 blocks to beginning of program.
Changed to First Tool NOT In Spindle format.
Changed G72O9910 sub call to ToolChng.
Changed OfstOff line from G73Z2400/25.4 to G73Z94.
Moved W output from OfstOn line to StrtPos line.
Moved Speed SpinOn to line by itself before StrtPos
Moved CoolOn up to same line as OfstOn.
Changed CallLab to '$' Program#
Suppressed Drill subs if number of locations is less than 10 per Fanuc 0M [PI] MX18.89.4
Added Positive Approach support.
Customer is aware of the limitations with this and Drill Subs!!
Jim Radcliffe}

{2/4/99
Initial: Tosnuc 777 Tosh [PI] CT96.16
Created: Tosnuc 777 Tosh [PI] CT96.16.1
Comment: Modified per marked up readout from Carl Mackey
Deleted PreTool.
Moved CoolOff up to line by itself.
Corrected Positive Approach. Was outputting without move on first feat! Oops!
Jim Radcliffe}

{3/10/99
Initial: Tosnuc 777 Tosh [PI] CT96.16.1
Created: Tosnuc 777 Tosh [PI] CT96.16.2
Develop: Compost2 PPC 1.7b15, Virtual Gibbs 5.05
Comment: Modified per marked up readout from Carl Mackey
Added G70 line to set control to Inch Mode.
Added G73 line for Z retract to beginning of program.
Updated to latest .16 version per Fanuc 6M [PW] C001.16
Jim Radcliffe}

{3/10/99
Initial: Tosnuc 777 Tosh [PI] CT96.16.2
Created: Tosnuc 777 Tosh [PI] NCT96.16
Comment: Created No Subs Version per Fanuc 6M [PW] NCU99.16
Jim Radcliffe}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '###.##;0.' {Changed from '####^##0' - JHE}
#7 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Recall#,2) {Added for rotary output - JHE}
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(HelixPitch#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(ClearancePlane2#,4) {Added - JHE 10/28}
FORMAT(ClearancePlane3#,4) {Added - JHE 10/28}
FORMAT(ZDepth#,4) {Added - JHE 10/28}
FORMAT(TCZ#,4)
FORMAT(DIV#,4) {Added - JHE 10/28}
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(SpeedRPM#,5) {Added - JHE 10/28}
FORMAT(Dwell#,6)
FORMAT(FeedEntry#,6) {Added - JHE 10/28}
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:
'H' ADD# cSPartNum# Num#('900')
RETURN

wFO:
'H' ADD# PartNum# Num#('900')
RETURN

wFOStuff:
IF Flag?('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
SeqC 'G57' cSWFO EOL
SeqC 'G58' cSWFO 'W' TCZ# EOL
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
SeqC 'G57' wFO EOL
SeqC 'G58' wFO 'W' TCZ# EOL
ELSE
SeqC 'G57' WFO1 EOL
SeqC 'G58' WFO1 'W' TCZ# EOL
END
END
ELSE
IF WFOCS?
IF ChangeCS?
SeqC 'G57' cSWFO EOL
SeqC 'G58' cSWFO 'W' TCZ# EOL
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: {Removed all calls to this sub - JHE}
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: {Re-write this sub - JHE}
IF BAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
SeqC 'B0.' EOL
ELSE
Save# Num#('11') MUL# CSOffsetB# Num#('-1')
Save# Num#('12') TRUNC# DIV# Recall# Num#('11') Num#('360')
IF LessThan? Recall# Num#('11') Num#('0')
Save# Num#('12') SUB# Recall# Num#('12') Num#('1')
END
Save# Num#('12') SUB# Recall# Num#('11') MUL# Recall# Num#('12') Num#('360')
IF Equal? Recall# Num#('12') Num#('0')
SeqC 'M71' EOL
ELSE
IF Equal? Recall# Num#('12') Num#('90.')
SeqC 'M73' EOL
ELSE
IF Equal? Recall# Num#('12') Num#('180.')
SeqC 'M75' EOL
ELSE
IF Equal? Recall# Num#('12') Num#('270.')
SeqC 'M77' EOL
ELSE
IF Equal? Recall# Num#('12') Num#('360.')
{for some reason the TRUNC# command was not making 360 return as 0}
SeqC 'M71' EOL
ELSE
SeqC 'B'
IF LessThan? Recall# Num#('13') CSOffsetB#
'-'
END
Recall# Num#('12') EOL
END
END
END
END
END
END
SeqC 'M0' EOL
END
Save# Num#('13') CSOffsetB# {current rotary position - JHE}
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
IF XYPlane? {Added this section - CDH}
MoveX MoveY
ELSE
IF XZPlane?
MoveX MoveZ
ELSE {implies YZ Plane}
MoveY MoveZ
END
END
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
IF XYPlane? AND ZMove?
'K' HelixPitch# 'L1'
TrackZNO# EPZ#
ELSE
IF XZPlane? AND YMove?
'J' HelixPitch# 'L1'
TrackYNO# EPY#
ELSE
IF YZPlane? AND XMove?
'I' HelixPitch# 'L1'
TrackXNO# EPX#
END
END
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

toolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqC
IF PosApproach? AND NOT FirstFeat?
'G60'
END
MoveSXYZC EOL
IF BackBore? {Added - JHE 10/28}
IF NOT FirstFeat?
IF Equal? Pallet# Num#('2')
SeqC 'G72O9918' EOL
ELSE
IF Equal? Pallet# Num#('3')
SeqC 'G72O9919' EOL
END
END
END
END
IF FIStopRO? {Added - JHE 11/6}
IF NOT FirstFeat?
SeqC 'G72O9920' EOL
END
END
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

calcRetract: {Added this sub - JHE 10/28}
{ (ToolDiameter# - ShankDiam#) / 4 }
DIV# SUB# ToolDiameter# ShankDiam# Num#('4')
RETURN

drilling:
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
SeqC Speed SpinOn EOL
SeqC '[SV,V176=2*60/' SpeedRPM# ']' EOL
SeqC ZCP3 EOL
ELSE
IF Equal? Pallet# Num#('2')
SeqC Speed SpinRev EOL
ELSE
SeqC Speed EOL
END
SeqC '[SV,V170=' ClearancePlane3# ']' EOL
SeqC '[SV,V173=' ClearancePlane2# ']' EOL
SeqC '[SV,V174=' ZDepth# ']' EOL
SeqC '[SV,V175=' FeedEntry# ']' EOL
SeqC '[SV,V176=2*60/' SpeedRPM# ']' EOL
SeqC ZCP3 EOL
END
ELSE
IF FIStopRO? {Added - JHE 11/6}
SeqC '[SV,V170=' ClearancePlane3# ']' EOL
SeqC '[SV,V173=' ClearancePlane2# ']' EOL
SeqC '[SV,V174=' ZDepth# ']' EOL
SeqC '[SV,V175=' FeedEntry# ']' EOL
SeqC '[SV,V178=' SpeedRPM# ']' EOL
SeqC ZCP3 EOL
ELSE
SeqC DrillCP EOL
END
END
IF RigidTap?
SeqC Speed EOL
IF CWSpindle?
SeqC 'M843' EOL
ELSE
SeqC 'M844' EOL
END
END
GetCycle
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
SeqC 'G79G98'
ELSE
IF Equal? Pallet# Num#('2')
SeqC 'G72O9918' EOL
ELSE
SeqC 'G72O9919' EOL
END
END
ELSE
IF FIStopRO? {Added - JHE 11/6}
SeqC 'G72O9920' EOL
ELSE
SeqC Cycle FromCP
IF PosApproach?
'G60'
END
END
END
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
StrtPos ZDepth RLevel Dwell Peck
END
ELSE
IF FIStopRO? {Added - JHE 11/6}
{no output - JHE}
ELSE
StrtPos ZDepth RLevel Dwell Peck
END
END
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
'I0.J' calcRetract 'Q.01' 'P[V176]'
END
END
IF RigidTap?
'F' FeedTapIPR#('1') EOL
ELSE
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
FeedEnt EOL
END
ELSE
IF FIStopRO? {Added - JHE 11/6}
{no output - JHE}
ELSE
FeedEnt EOL
END
END
END
TrackZNO# FIRST SPZ# {.81.2}
toolPath
setDrillEndOpZ
IF RigidTap?
SeqC 'M845' EOL
END
IF BackBore? {Added - JHE 10/28}
IF Equal? Pallet# Num#('1')
SeqC Rapid DrillOff ZCP3 EOL
END
ELSE
IF FIStopRO? {Added - JHE 11/6}
{no output - JHE}
ELSE
SeqC Rapid DrillOff ZCP3 EOL
END
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 }
Save# Num#('11') Num#('0')
Save# Num#('12') Num#('0')
Save# Num#('13') Num#('0') {*** current rotary position - JHE ***}
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 }
SetFlagF('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlagF('7') { TRUE = D-Style Output }
SetFlag('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
' TCZ(n): Specifies the value to be output with W-axis. Default = TCZ(0) ' EOL
' PIN(1): Specifies the output of G79 back boring cycle. Default ' EOL
' PIN(2): Specifies the output of G72 O9918 back boring sub. ' EOL
' PIN(3): Specifies the output of G72 O9919 back boring sub. ' EOL
{*** Added these 3 lines - JHE 10/28 ***}
' 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#('99')
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#('99') {****}
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?
' ( PROGRAM: ' 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 'G70' EOL
SeqC 'G27' EOL
SeqC 'G53' EOL
SeqC 'G73Z94.' EOL
SeqC OpToolID EOL
SeqC ToolChng EOL
SetTCZ('0') {Added - JHE 9/28}
SetPalletIn('1') {Added - JHE 10/28}
doPartCycleComment
doOpComments
doPostScript
RETURN

firstOp2:
cSAngleB
wFOStuff
g52Stuff
checkPass
IF RigidTap? OR BackBore? OR FIStopRO? {Added this check - JHE 9/15, 10/28, 11/6}
ELSE
SeqC Speed SpinOn EOL
END
SeqC Rapid AbsOrInc StrtPos 'W' TCZ# EOL
RETURN

firstOp3:
SeqC OfstOn CoolOn EOL
RETURN

newToolOp1:
SeqC CoolOff EOL
SeqC RapidC 'G73Z94.' EOL {Replace OfstOff - JHE}
RETURN

newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
SeqC PRIME Home EOL
ELSE
{SeqC SpinOff EOL} {Removed - JHE}
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
RETURN

newToolOp3: {Start new Operation}
{Seq Plane CRCOff DrillOff EOL} {Removed - JHE}
Seq OpToolID EOL
SeqC ToolChng EOL
SetTCZ('0') {Added - JHE 9/28}
SetPalletIn('1') {Added - JHE 10/28}
doPartCycleComment
doOpComments
doPostScript
RETURN

newToolOp4:
cSAngleBC
wFOStuff
g52Stuff
checkPass
IF RigidTap? OR BackBore? OR FIStopRO? {Added this check - JHE 9/15, 10/28, 11/6}
ELSE
SeqC Speed SpinOn EOL
END
SeqC PlaneC Rapid AbsOrInc StrtPos 'W' TCZ# EOL
RETURN

newToolOp5:
SeqC OfstOn CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC RapidC 'G73Z94.' EOL {Replace OfstOff - JHE}
SeqC SpinOff EOL
SeqC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC RapidC 'G73Z94.' EOL {Replace OfstOff - JHE}
END
IF AChange? OR BChange?
SeqC 'G72O9911' EOL {retract sub - JHE}
END
END
RETURN

sameToolOp2: {Start new Operation}
SetTCZ('0')
doPartCycleComment
doOpComments
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
cSAngleBC
wFOStuff
g52Stuff
IF LAST ProgStop?
IF RigidTap? OR BackBore? OR FIStopRO?
ELSE
SeqC Speed SpinOn EOL
END
SeqC PlaneC Rapid AbsOrInc StrtPos 'W' TCZ# EOL
SeqC OfstOn CoolOn EOL
ELSE
IF RigidTap? OR BackBore? OR FIStopRO?
ELSE
SeqC SpeedC EOL
END
SeqC PlaneC Rapid AbsOrInc StrtPos EOL
SeqC
IF NewToolOffset? OR AChange? OR BChange?
OfstOn
END
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
EOL
END
RETURN

end1:
SeqC CoolOff EOL
SeqC RapidC 'G73Z94.' EOL {Replace OfstOff - JHE}
RETURN

end2:
doEndOpPS
IF FIRST ToolChangeAtHome?
SeqC PRIME FirstHome EOL
ELSE
{SeqC SpinOff EOL} {Removed - JHE}
END
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 RapidC 'G73Z94.' 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 }
cSAngleB
wFOStuff
g52Stuff
IF RigidTap? OR BackBore? OR FIStopRO?
ELSE
SeqC Speed EOL
END
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
IF FullUp?
SeqC OfstOn 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:
Tosnuc 777 Tosh [PI] CT96 16 2
Tosnuc 777 Tosh [MTM] CU77 16 7
Tosnuc 777 CW09 10
Tosnuc 600M Tosh 45 LH MV02 12
Tosnuc 888M Tsh [OT] NCQ31 16 2
Tosnuc 600M Tosh 45 MY49 14 3
Tosnuc 888M Tosh [DM] CT41 15
Tosnuc 888M Tosh [LM] CW90 15 1
Tosnuc 600M VMC 45 M442 81 3
Tosnuc 600M BMC 40 M440 87
Scenariusz 16 Rowerem do szkoły
r 1 nr 16 1386694464
16 narrator

więcej podobnych podstron