Acr A2100 [VG] DT97 16 1


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

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

{5/15/98,
Updated: Fanuc 6M (FW) B001.15
Created: Fanuc 6M [FW] B001.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.
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.
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.
9/24/98
Added Post Header Comment at top.
Added missing END command at entryMove.
Changed IncValue to incValueC at autoCycCutSub1.
Changed AbsOrInc to absOrIncC at autoCycCutSub2.
Changed AbsOrInc to absOrIncC at g92Sub.
Added support of Incremental Output for SepSubs.
When user selects Incremental Output, SepSubZMoves are incorrect.
Added doSepSubZMoves Procedure.
Contains code for ZPosMoves from zonlyRepAutoCycle and zonlyRep Procedures.
Outputs Incremental ZExitMove for Exit/Entry.
AutoCycles Retract to ZCP2.
Non-AutoCycles Retract to ZCP3.
Added setSepSubZ Procedure.
Updates Status Register to final ZInPos for FeedEntry.
Modified zonlyRepAutoCycle Procedure.
Modified zonlyRep Procedure.
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)
10/1/98
Versions: Virtual 4.29.75(Mac)/ComPost2 1.7b10 (Mac)
Versions: Virtual 4.29.75(Win)/ComPost2 1.7b10 (Win)
Corrected old problem with Incorrect Status Register XYPos at end of Pattern AutoCycle Operation.
Problem is caused because Status Register is left in SetPass1 [ Contouring ] Mode and does not compensate
for SetPass2 [ PointFeat Position ] Mode Coordinates
Correction fixes known problems with Full Incremental Output.
Correction also fixes known problems with MultipleParts EquallySpacedOffsets ShiftPC and UnshftPC commands.
Added TrackXNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added TrackYNO# to FORMAT#4 at Prog Numeric Format Definitions.
Added getACEPXY Procedure.
Called from ToolPath PointFeat.
Stores uncompensated LastFeat SPX# to Var(1).
Stores uncompensated LastFeat SPY# to Var(2).
Added setSRXYtoACEP Procedure.
Called at end of OpGuts IF Milling.
Adds SetPass1 LastFeat SPXY# to uncompensated SetPass2 LastFeat SPXY#.
Added Var(1) for storage of XPosition at progStart Procedure.
Added Var(2) for storage of YPosition at progStart Procedure.
DWB}

{2/11/99,
Initial : Fanuc 6M [FW] B001.16
Created: Acr A2100 [VG] BT97.16
Customer: Gibbs & Associates
ComPost2: v1.7b15

Changes to "Form":

1. Under General Info, removed Program ID Label, Optional Program ID Label, and
changed Sequence Label to N?
2. Under Default Formats, changed P to ####.####;0.
3. Under Origins and Values, changed First WFO to H1 and Last WFO to H32
4. Under Arcs, changed R-Format Arc Label to P and checked Use Absolute Arc Center
5. Under Subs, removed all Labels and changed all Numbers to 0
6. Under Tool Offsets, changed CRC Offset Label to O and Tool Length Offset Label to D
Removed Tool Length Offset Enable and Tool Length Offset Cancel Labels and changed
the Numbers to 0
7. Under Program Stops, changed End Program Number to 2
8. Under Drill Cycles, changed Peck Labels to K and Peck Partial Retract Number to 83.
Removed Dwell Labels. Removed Drill From Part Clearance and Drill From Entry Clearance
Labels and changed the Numbers to 0

Changes to "Prog":

1. Removed all FIFO? milling (not Drilling) booleans (Gibbs System).
2. Added MSG, to all comments.
3. Removed EOR at tape start and changed ProgID1 to (PGM, ID=Program#).
4. Added start-up block after ProgID.
5. Changed all Seq to ':? ', all SeqC to SeqLabC, and added ReTag at end3.
6. Added inchOrMetric sub to output G70/71.
7. Changed #6 FORMAT (Dwell) to decimal point.
8. Moved wfoStuff into StrtPos block.
9. In cSWFO and wFO subs, changed 'G' to 'H' and Num#('53') to Num#('0').
10. Changed ckCRCNum sub and moved all call from toolPath to StrtPos.
11. Changed ckCRC sub and added a call in ArcFeat.
12. In progStart, changed the max number of fixture offsets from 6 to 32.
13. Changed firstOp1, 2, & 3 to match the output of MT97.
14. Changed newToolOp1, 3, 4, & 5 to match the output of MT97.
15. Changed sameToolOp1, 2, & 3 to match the output of MT97.
16. Changed end1, 2, & 3 to match the output of MT97.
17. Changed all CoolOn to doCoolOn and added doCoolOn sub. The new sub can output
up to 6 different types of coolant.
18. Under formatArc, removed C from ArcIJ and ArcR. Force the output of 2 axes and
added Helix lead for XY-plane helix cuts.

drilling cycles:

19. Changed DrillOff to be output in a block by itself.
20. Changed RLevel to 'R' CalcZSurf# and added FORMAT for CalcZSurf#.
21. Removed Dwell and Retract from drill cycle line.
22. Changed DrillCP to ZCP2C.
23. Changed FromCP to doFromCP sub and added calls to this sub in tpPointFeat.
24. Added doFromCP sub to output W when RetractToCP1 and added FORMAT for ABS#.
25. Added G84.1 for RigidTap and G89 for Bore & Dwell.
26. Changed Peck to doPeck sub to output J11 for ChipBreaker and J13 for FullRetract.
27. Changed ZDepth to 'Z' CalcZFmSurf# and added FORMAT for CalcZFmSurf#.

sub routines:

28. Changed all CallLab to '(CLS, ' Program# and CallLabB to '(CLS, '.
29. Changed all EndSub to '(ENS)' and removed all SubCall.
30. Changed SubID to '(DFS, ' Program# ')'.
31. Added ')' at the end of all CLS blocks.
32. Changed all RepLab to ',' and Parts to Parts#.
33. Removed RepLab OnePart from doWFOOps and doCSWFOOps subs.
34. Changed RepCycs to Repeats# and added FORMAT for Repeats#.
JHE}

{2/11/99,
Initial : Acr A2100 [VG] BT97.16
Created: Acr A2100 [VG] DT97.16
Customer: Gibbs & Associates
ComPost2: v1.7b15

Changes to "Prog":

1. Under progStart, changed Flag('6') to False, Flag('7') to True,
and Flag('8') to True.
JHE}

{2/15/99,
Initial : Acr A2100 [VG] BT97.16
Created: Acr A2100 [VG] BT97.16.1
Customer: Gibbs & Associates
ComPost2: v1.7b15

Changes to "Prog":

1. Moved ZCP1 from firstOp3 to firstOp2 (to startPos block).
2. Added firstOp2Xcp sub to restate startPos in mP1ToollAllPXcp after openMP.
3. Moved ZCP1 from newToolOp5 to newToolOp4 (to startPos block).
4. Added newToolOp4Xcp sub to restate startPos in mP1ToollAllPXcp after openMP.
5. Under sameToolOp3 and ProgStop, moved ZCP1 to StartPos block.
JHE}

{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(CalcZSurf#,4) {Added - JHE}
FORMAT(CalcZFmSurf#,4) {Added - JHE}
FORMAT(ABS#,4) {Added - JHE}
FORMAT(Repeats#,5) {Added - JHE}
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(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

inchOrMetric: {Added this sub - JHE}
IF Metric?
'G71' {metric mode}
ELSE
'G70' {inch mode}
END
RETURN

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

cSWFO:
'H' ADD# cSPartNum# Num#('0')
RETURN

wFO:
'H' ADD# PartNum# Num#('0')
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
wFO
END
ELSE
IF WFOCS?
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is handled in subCSMP and closeMP}
ELSE
cSWFO
END
END
END
END
END
SetFlagF('2') { Do not output WFO second time wFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

cSG52:
SeqLabC '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:
'(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

doCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
'(MSG, ' 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?
'(MSG, SUB NUMBER: ' Program# ' )' EOL
END
RETURN

doOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'(MSG, ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'(MSG, ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' 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
SeqLabC PostScript EOL
pSStuff
NextPS
RETURN

doEndOpPS:
pSInit
EachEOPS
SeqLabC EndOpPS EOL
pSStuff
NextPS
RETURN

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

startSub:
OpenSub
'(DFS, ' Program# ')' EOL
doSubComment
RETURN

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

stdSub:
SeqLabC {*SubCall*} '(CLS, ' Program# ',' Repeats# ')' EOL
startSub
RETURN

finishSub1: {part 1}
SeqLabC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
RapidC ZCP3C
END
END
EOL
RETURN

finishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC 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

doCoolOn: {Added this sub - JHE}
IF ThruSpin?
'M27'
ELSE
IF Pulse?
'M28'
ELSE
IF Mist?
'M29'
ELSE
IF HiPressure?
'M7'
ELSE
IF FloodThruSpin?
'M8M27'

ELSE {implies Flood}
CoolOn {output M8}
END
END
END
END
END
RETURN

doFromCP: {Added this sub - JHE}
IF RetractToCP1?
'W' ABS# SUB# ClearancePlane1# CalcZsurf#
END
RETURN

doPeck: {Added this sub - JHE}
IF Peck?
IF PeckChipBreaker?
Peck 'J11'
ELSE {implies PeckFullRetract}
Peck 'J13'
END
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
SeqLabC SetWFO EOL
END
SeqLabC {*SubCall*} '(CLS, ' Program# ')' 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
SeqLabC {*SubCall*} '(CLS, ' Program# ',' 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
SeqLabC cSWFO EOL
END
SeqLabC {*SubCall*} '(CLS, ' CSSubID# ')' EOL
NextCSOp
RETURN

closeMP:
IF WorkFixtureOffsets?
SeqLabC '(ENS)' 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
SeqLabC absOrIncC EOL
SeqLabC Preset ShiftPC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftPC EOL
END
RETURN

subCSMP:
IF WFOCS?
IF ChangeCS?
SeqLabC '(ENS)' 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 }
SeqLabC absOrIncC EOL
END
RETURN

formatArc:
doAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
IF ZMove?
MoveX MoveY MoveZ 'K' ABS# MUL# ArcZRads# Num#('6.283185')
{Added lead per 360 deg}
ELSE
MoveX MoveY
END
ELSE
IF XZPlane?
MoveX MoveZ
ELSE {implies YZ-Plane}
MoveY MoveZ
END
END
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
{IF NOT ZMove?} {Removed - JHE}
CRCOnC
{END}
END
RETURN

ckCRCNum: {Changed - JHE}
IF CutterRadiusCompensation?
CRCOfst
ELSE
'O0'
END
RETURN

getACEPXY:
SetACSPCompF
Save# Num#('1') SPX# { Status Register Variable for X Axis }
Save# Num#('2') SPY# { Status Register Variable for Y Axis }
SetACSPComp
RETURN

setSRXYtoACEP:
SetPass1
SetSRXYtoEP
LoadFeat Num#('0') Num#('0') Num#('0')
TrackXNO# ADD# Recall# Num#('1') SPX# { Status Register Variable for X Axis }
TrackYNO# ADD# Recall# Num#('2') SPY# { Status Register Variable for Y Axis }
RETURN

toolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
IF LastFeat?
getACEPXY
END
SeqLabC MoveSXYC EOL
SeqLabC {*SubCall*} '(CLS, ' Program# ')' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
SeqLabC doDrillAbsOrInc MoveSXYZC doFromCP EOL
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC RapidC MoveXYZC {*ckCRCNum*} EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC {*ckCRCNum*} EOL
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqLabC ckCRC formatArc ArcFeedC EOL
NEXTQuadrant
END
END
END
END
NEXTFeat
restoreAbsOrInc
RETURN

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

autoCycCutSub2: {part 2}
toolPath
SeqLabC absOrIncC CRCOffC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC ZCP2
END
EOL
SeqLabC '(ENS)' 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
SeqLabC absOrIncC Connect StrtPos EOL
milling
finishSub1
finishSubG92
RETURN

doSepSubZMoves:
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusInc EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle? AND AutoCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC {*SubCall*} '(CLS, ' Program# ')' EOL
IF NOT FeedConnect? AND NOT AbsValue?
TrackZNO# ZCP2PlusInc#
SeqLabC ZCP2C EOL
IF NOT AutoCycle?
TrackZNO# ClearancePlane3#
END
END
RETURN

setSepSubZ:
TrackZNO# ADD# FIRST SPZ# MUL# RepsLess1# RepeatZ#
RETURN

zonlyRepAutoCycle:
autoCycPat {write pattern moves and main calls}
startSub
NewProg
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
Connect
IF SPXMove? OR SPYMove?
SeqLabC incValueC StrtPosC EOL
absOrIncC
END
END
SetStatusOn
doSepSubZMoves
SetStatusOff
NextCycle
SetStatusOn
autoCycCutSub1 {build element sub}
TrackZNO# FIRST SPZ#
autoCycCutSub2
IF FeedConnect?
IF NOT AbsValue?
setSepSubZ
END
SeqLabC Rapid ZCP2 EOL
END
SeqLabC '(ENS)' EOL
CloseSub
{Element shift, not pattern}
RETURN

zonlyRep:
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
Connect
IF SPXMove? OR SPYMove?
SeqLabC StrtPosC EOL
END
END
doSepSubZMoves
NextCycle
startSub
TrackZNO# FIRST SPZ#
toolPath
finishSub1
SeqLabC '(ENS)' EOL
CloseSub
IF FeedConnect? AND NOT AbsValue?
setSepSubZ
END
RETURN

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF NOT Flag?('7')
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?
SeqLabC 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?
SeqLabC CRCOffC ZCP3C EOL
setSRXYtoACEP
ELSE
SeqLabC CRCOffC RapidC ZCP3C EOL
END
ELSE
IF Drilling?
SeqLabC ZCP2C EOL
GetCycle
IF RigidTap?
SeqLabC 'G84.1'
ELSE
IF FIFO? AND Dwell?
SeqLabC 'G89'
ELSE
SeqLabC Cycle
END
END
StrtPos 'Z' CalcZFmSurf# 'R' CalcZSurf# doFromCP doPeck FeedEnt EOL
IF CallMasterOp?
SeqLabC {*SubCall*} '(CLS, ' CallMasterNum# ')' EOL
skipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') { DrillSubs activated }
NewMasterProg
SeqLabC {*SubCall*} '(CLS, ' Program# ')' EOL
startSub
toolPath
SeqLabC '(ENS)' EOL
CloseSub
SetFlagF('1') { DrillSubs deactivated }
ELSE
toolPath
END
END
setDrillEndOpZ
SeqLabC DrillOff EOL
SeqLabC Rapid ZCP3 EOL
END
END
RETURN

progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { Status Register Variable for X Axis }
Save# Num#('2') Num#('0') { Status Register Variable for Y Axis }
Save# Num#('3') Num#('0') { Status Register Variable for Z Axis }
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 = 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
' 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#('32') {Changed from 6 - JHE}
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'(MSG, Not enough Work Fixture Offsets to handle this part. )' EOL
'(MSG, Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'(MSG, 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#('32') {Changed from 6 - JHE}
SetWFOCS { use WFO for CS changes }
ELSE
IF Flag?('8')
SetFlag('7')
END
IF UseComments?
'(MSG, Not enough Work Fixture Offsets to handle this part. )' EOL
'(MSG, Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'(MSG, Switching to '
IF Flag?('7')
'non'
ELSE
'G52'
END
'-wfo style output. )' EOL
END
END
END
END
END
RETURN

initOp:
'(PGM, ID="' Program# '")' EOL {Changed from ProgID1 - JHE}
':' Plane inchOrMetric AbsOrInc 'G94M26' EOL {G94 = Feed per Minute}
IF UseComments? AND ProgramNameComment? {M26 = full retract}
'(MSG, PROGRAM: ' ProgramName$ ' )'
END
EOL
IF UseComments?
IF ProgramComment?
'(MSG, ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
restoreScale
RETURN

firstOp1:
IF ToolChangeAtHome?
SetHome
END
doOpComments
':? ' Rapid Plane inchOrMetric AbsOrInc OpToolID ToolChng EOL
doPostScript
RETURN

firstOp2:
g52Stuff
checkPass
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB PreTool EOL
RETURN

firstOp2Xcp: {called only in mP1ToollAllPXcp after openMP}
checkPass
SeqLabC Rapid StrtPos Speed SpinOn ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB EOL
RETURN

firstOp3:
SeqLabC doCoolOn EOL
RETURN

newToolOp1:
SeqLabC RapidC ZCP1C CoolOff EOL
IF MultipleParts? AND FullUp?
SeqLabC 'M26' EOL {retract spindle}
END
RETURN

newToolOp2:
doEndOpPS
IF ToolChangeAtHome?
IF MultipleParts? AND FullUp?
{no output}
ELSE
SeqLabC 'M26' EOL {retract spindle}
END
IF AbsoluteMoves?
SeqLabC 'G98.1' Home SpinOff EOL
ELSE
SetAbs
SeqLabC 'G98.1' Home SpinOff EOL
SetInc
END
ELSE
SeqLabC SpinOff EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN

newToolOp3: {Start new Operation}
doOpComments
':? ' Rapid Plane inchOrMetric AbsOrInc OpToolID ToolChng EOL
doPostScript
RETURN

newToolOp4:
g52Stuff
checkPass
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB PreTool EOL
RETURN

newToolOp4Xcp: {called only in mP1ToollAllPXcp after openMP}
g52Stuff
checkPass
SeqLabC Rapid StrtPos Speed SpinOn ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB EOL
RETURN

newToolOp5:
SeqLabC doCoolOn EOL
RETURN

sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqLabC RapidC ZCP1C CoolOff EOL
SeqLabC 'M26' EOL {retract spindle}
SeqLabC SpinOff EOL
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqLabC RapidC ZCP1C 'M26' EOL
END
END
RETURN

sameToolOp2: {Start new Operation}
doOpComments
':? ' Rapid Plane inchOrMetric AbsOrInc EOL
doPostScript
checkPass
RETURN

sameToolOp3: {Start new Operation}
g52Stuff
IF LAST ProgStop?
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB EOL
SeqLabC doCoolOn EOL
ELSE
SeqLabC Rapid StrtPos SpeedC ToolOfst ckCRCNum wFOStuff cSAngleA cSAngleB EOL
IF NewToolOffset? OR AChange? OR BChange?
SeqLabC ZCP1 EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC doCoolOn EOL
END
END
RETURN

end1:
SeqLabC RapidC ZCP1C CoolOff EOL
IF MultipleParts? AND FullUp?
SeqLabC 'M26' EOL {retract spindle}
END
RETURN

end2:
doEndOpPS
IF ToolChangeAtHome?
IF MultipleParts? AND FullUp?
{no output}
ELSE
SeqLabC 'M26' EOL {retract spindle}
END
IF AbsoluteMoves?
SeqLabC 'G98.1' Home SpinOff EOL
ELSE
SetAbs
SeqLabC 'G98.1' Home SpinOff EOL
SetInc
END
ELSE
SeqLabC SpinOff EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqLabC absOrIncC
IF AAxisAvail?
cSAngleA
END
IF BAxisAvail?
cSAngleB
END
EOL
SeqLabC Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN

end3:
IF ToolChangeAtHome?
SeqLabC EOP EOL
ELSE
IF MultipleParts? AND FullUp?
SeqLabC EOP EOL
ELSE
SeqLabC 'M26' EOP EOL
END
END
CloseSub
Post2 {organize Subs into one program}
{EOR EOL} {Removed % - JHE}
Close
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END
ReTag {Added - JHE}
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
firstOp2Xcp {need StrtPos in Sub}
ELSE
IF NewTool?
closeMP
newToolOp1
newToolOp2 {to tool change, CS problem}
newToolOp3
newToolOp4
newToolOp5
openMP
newToolOp4Xcp {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:
Acr A2100 [VG] MT97 16 3m
Acr A2100 [VG] BT97 16 1
Acr A2100 [VG] MT97 16 3
Acr A2100 [VG] CT97 16 1
Acr A2100 [PG] CQ04 16 1
Acr A2100 [VG] RMT97 17 7
Acr A2100 [ALA] CX48 15 1
Cin Acr A2100 Sabre M751 12 1
Acr A2100 [VCA] MX31 89
Acr A2100 CC [SM] L734 85
Acr A2100 [DC] MQ56 12 1
Acr A2100 Generic L421 85 12
Acr A2100 [RPM] NMT09 12
Cin Acr A2100 [TVR] M875 82 6
Acr A2100 [GCS] L517 85 1
Acr A2100 [AB] CU30 15

więcej podobnych podstron