Tosnuc 777 Tosh [MTM] CU77 16 7


{
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}

{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(TrackZNO#,4)
FORMAT(HelixPitch#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(CalcZFmSurf#,4) {Added - JHE 10/28}
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(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(CSSubID#,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

cSWFO4:
'G58H' ADD# cSPartNum# Num#('900') {Removed all calls - JHE 9/9}
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 'G58' cSWFO 'W' TCZ# EOL
SeqC 'G57' cSWFO EOL
ELSE
SeqC 'G58' wFO 'W' TCZ# EOL
SeqC 'G57' wFO EOL
END
ELSE
IF WFOCS?
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is handled in subCSMP and closeMP}
ELSE
SeqC 'G58' cSWFO 'W' TCZ# EOL
SeqC 'G57' cSWFO EOL
END
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

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

g52Stuff:
IF 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
END
RETURN

cSComments:
doCSComment
IF WFOCS? AND NOT MultipleParts?
doCSWFOComment
END
RETURN

doSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Program# ' )' 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#('1') MUL# CSOffsetB# Num#('-1')
Save# Num#('2') TRUNC# DIV# Recall# Num#('1') Num#('360')
IF LessThan? Recall# Num#('1') Num#('0')
Save# Num#('2') SUB# Recall# Num#('2') Num#('1')
END
Save# Num#('2') SUB# Recall# Num#('1') MUL# Recall# Num#('2') Num#('360')
IF Equal? Recall# Num#('2') Num#('0')
SeqC 'M71' EOL
ELSE
IF Equal? Recall# Num#('2') Num#('90.')
SeqC 'M73' EOL
ELSE
IF Equal? Recall# Num#('2') Num#('180.')
SeqC 'M75' EOL
ELSE
IF Equal? Recall# Num#('2') Num#('270.')
SeqC 'M77' EOL
ELSE
IF Equal? Recall# Num#('2') 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#('11') CSOffsetB#
'-'
END
Recall# Num#('2') EOL
END
END
END
END
END
END
SeqC 'M0' EOL
END
Save# Num#('11') 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

entryMove:
IF FeedEntry?
IF FirstOperation? OR NewTool?
SeqC Feed ZIn FeedEnt EOL
ELSE
SeqC Feed ZIn FeedEntC EOL
END
ELSE
SeqC RapidC ZIn EOL
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedRate }
END
END
RETURN

startSub:
OpenSub
ASCII('13') ASCII('10')
SubID EOL
doSubComment
RETURN

subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
RETURN

stdSub:
SeqC SubCall CallLab RepLab RepCycs EOL
startSub
RETURN

finishSub1: {part 1}
SeqC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

finishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

incValueC:
IF AbsValue?
IncValue
END
RETURN

absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN

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

doWFOOps:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
ELSE
SeqC SetWFO EOL
END
SeqC SubCall CallLab RepLab OnePart EOL
RETURN

openMP:
NewProg
IF WorkFixtureOffsets?
IF WFOCS?
startSub
SaveCSProg
SaveCSOpStart
ELSE
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE { Decrementing WFOs in effect }
LastWFO
EachWFO {simple eachPart}
doWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
startSub
END
ELSE
SeqC SubCall CallLab RepLab Parts EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
startSub
END
RETURN

doCSWFOOps:
EachCSOp
doCSWFOComment
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
ELSE
SeqC 'G58' cSWFO 'W' TCZ# EOL
SeqC 'G57' cSWFO EOL
END
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
RETURN

closeMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
IF WFOCS?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
EachWFO {simple eachPart}
doCSWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE { Decrementing WFOs in effect }
LastWFO
EachWFO {simple eachPart}
doCSWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
toggleIncDecWFO
END
END
ELSE
SeqC absOrIncC EOL
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

subCSMP:
IF WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
NewProg
startSub
SaveCSProg
END
END
RETURN

doAbsOrInc:
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
IF ZMove?
incValueC
ELSE
absOrIncC
END
END
RETURN

doDrillAbsOrInc:
IF Flag?('1') { DrillSubs activated }
IF SPZMove?
incValueC
ELSE
absOrIncC
END
END
RETURN

restoreAbsOrInc:
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
SeqC absOrIncC EOL
END
RETURN

formatArc:
doAbsOrInc
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:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC doDrillAbsOrInc 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
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqC doAbsOrInc 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
restoreAbsOrInc
RETURN

autoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
startSub
SetSRXYtoSP
SeqC IncValue EOL
RETURN

autoCycCutSub2: {part 2}
toolPath
SeqC AbsOrInc CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqC 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
SeqC AbsOrInc Connect StrtPos EOL
milling
finishSub1
finishSubG92
RETURN

zonlyRepAutoCycle:
autoCycPat {write pattern moves and main calls}
startSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC IncValue StrtPosC EOL
AbsOrInc
END
END
SeqC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
SeqC IncValue StrtPosC EOL
AbsOrInc
END
IF FeedEntry?
SeqC ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
SeqC RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC SubCall CallLab EOL
NextCycle
SetStatusOn
autoCycCutSub1 {build element sub}
autoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC Feed ZCP2 FeedEnt EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

zonlyRep:
EachCycle
IF NOT AbsoluteMoves?
SetSRXYtoEP
END
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL
END
END
SeqC SubCall CallLab EOL
NextCycle
startSub
TrackZNO# FIRST SPZ#
toolPath
finishSub1
SeqC EndSub EOL
CloseSub
RETURN

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ClearCSOffset
END
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?
SeqC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
zonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
SetFlag('1') { Milling ZShiftOnly SepSubs activated }
zonlyRep
SetFlagF('1') { Milling ZShiftOnly SepSubs deactivated }
END {end Auto Cycle IF}
ELSE {not Z only}
g92Sub
END {end Z only IF}
ELSE {no repeat OPs}
milling
END
IF AutoCycle?
SeqC CRCOffC ZCP3C EOL
ELSE
IF FIFO?
SeqC CRCOffC FeedC ZCP3C FeedEntC EOL
ELSE
SeqC CRCOffC RapidC ZCP3C EOL
END
END
ELSE
IF 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
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
IF CallMasterOp?
SeqC SubCall CallLabB CallMasterNum# EOL
skipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') { DrillSubs activated }
NewMasterProg
SeqC SubCall CallLab EOL
startSub
toolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') { DrillSubs deactivated }
ELSE
toolPath
END
END
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
END
END
RETURN

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
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('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
SetFlagF('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlag('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
Save# Num#('11') Num#('0') {*** current rotary position - JHE ***}
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 Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('99')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
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') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-wfo'
END
' style output. )' EOL
END
END
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
END
ELSE
IF LTEqual? NumOfCS# Num#('99')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
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') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-wfo'
END
' style output. )' EOL
END
END
END
END
END
RETURN

initOp:
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
' ( PROGRAM: ' ProgramName$ ' )'
END
EOL
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 IN SPINDLE )' EOL
END
END
OpenSub
restoreScale
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
Seq Plane CRCOff DrillOff EOL
{SeqC OpToolID EOL} {Removed - JHE}
{SeqC ToolChng EOL} {Removed - JHE}
SeqC PreTool EOL {Added PreTool - JHE}
SetTCZ('0') {Added - JHE 9/28}
SetPalletIn('1') {Added - JHE 10/28}
doOpComments
doPostScript
RETURN

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

firstOp3:
IF RigidTap? OR BackBore? OR FIStopRO? {Added this check - JHE 9/15, 10/28, 11/6}
SeqC OfstOn 'W' TCZ# EOL
ELSE
SeqC OfstOn 'W' TCZ# Speed SpinOn EOL
END
SeqC CoolOn EOL
RETURN

newToolOp1:
SeqC RapidC 'G73Z2400/25.4' CoolOff EOL {Replace OfstOff - JHE}
RETURN

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

newToolOp3: {Start new Operation}
{Seq Plane CRCOff DrillOff EOL} {Removed - JHE}
{SeqC OpToolID EOL} {Removed - JHE}
Seq 'G72O9910' EOL {ToolChng sub - JHE}
SeqC ProgStop EOL {Moved to here - JHE}
SeqC PreTool EOL {Added this line - JHE}
SetTCZ('0') {Added - JHE 9/28}
SetPalletIn('1') {Added - JHE 10/28}
doOpComments
doPostScript
RETURN

newToolOp4:
cSAngleBC
wFOStuff
g52Stuff
checkPass
SeqC PlaneC Rapid AbsOrInc StrtPos EOL
RETURN

newToolOp5:
IF RigidTap? OR BackBore? OR FIStopRO? {Added this check - JHE 9/15, 10/28, 11/6}
SeqC OfstOn 'W' TCZ# EOL
ELSE
SeqC OfstOn 'W' TCZ# Speed SpinOn EOL
END
SeqC CoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqC RapidC 'G73Z2400/25.4' CoolOff 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 'G73Z2400/25.4' EOL {Replace OfstOff - JHE}
END
IF AChange? OR BChange?
SeqC 'G72O9911' EOL {retract sub - JHE}
END
END
RETURN

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

sameToolOp3: {Start new Operation}
cSAngleBC
wFOStuff
g52Stuff
IF LAST ProgStop?
SeqC PlaneC Rapid AbsOrInc StrtPos EOL
IF RigidTap? OR BackBore? {Added this check - JHE 9/15 & 10/28}
SeqC OfstOn 'W' TCZ# EOL
ELSE
SeqC OfstOn 'W' TCZ# Speed SpinOn EOL
END
SeqC CoolOn EOL
ELSE
SeqC PlaneC Rapid AbsOrInc StrtPos 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 RapidC 'G73Z2400/25.4' CoolOff EOL {Replace OfstOff - JHE}
RETURN

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

end3:
SeqC 'G72O9910' EOL {ToolChng sub - JHE}
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
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}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
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 EquallySpacedOffsets?
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
firstOp1
openMP
firstOp2
firstOp3
ELSE
IF NewTool?
newToolOp1
closeMP
newToolOp2 {to tool change, CS problem}
newToolOp3
openMP
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}
closeMP
end2
end3
RETURN

mP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2') { Need to output wFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
firstOp1
firstOp2
firstOp3
openMP
firstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
closeMP
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
newToolOp4
newToolOp5
openMP
newToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
sameToolOp1
subCSMP
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
closeMP
end1
end2
end3
RETURN

noMPs: {no multiple parts}
EachOp {Start of post processing}
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 {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}
initOp

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


Wyszukiwarka

Podobne podstrony:
Tosnuc 777 Tosh [PI] NCQ42 16
Tosnuc 777 Tosh [PI] CT96 16 2
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