Acr A2100 [VG] MT97 16 3m


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

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

{5/15/98,
Updated: Fanuc 6M M001.15
Created: Fanuc 6M M001.16
For: Gibbs & Associates
Versions: Catalyst v4.23.13(mac)/ComPost2 1.1b3
Update necessary to stay consistant with AdvancedMill Update.
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 DoWFOOps Procedure.
Identicle to DoCSG52Ops sub in Fanuc 6M (PW) C001.16.
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.
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 supports ZShiftOnly Repeats.
Rewrote OpGuts Procedure.
Limited Milling Repeats to ZShiftOnly at IF Milling.
Deleted Drilling Repeats at IF Drilling.
Deleted UseSeparateSubCalls at ProgStart Procedure.
Deleted SetMaxSeparateSubCalls('50') at ProgStart Procedure.
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.
7/30/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 FIRST modifier to ToolChangeAtHome Boolean at initOp Procedure.
Reported bug caused PC to crash without this.
8/7/98
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.
Deleted FIRST modifier as this did not solve the problem.
Added IF NOT AbsoluteMoves? Boolean and SetSRXYtoEP command to zonlyRep.
This fixes problem with Incremental output of move back to StrtPos for additional passes.
Added IF FirstOperation? OR NewTool? condition two places at entryMove Procedure.
To force FeedEnt and RapidF#.
SameTool condition outputs conditional FeedEntC.
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.
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}

{12/23/98
Updated: Fanuc 6M M001.16
Created: Fanuc 6M M001.16.1
For: Gibbs & Associates
Versions: Virtual 5.03/ComPost2 1.7b11
Added Recall# to FORMAT#4 at Prog Numeric Format Definitions.
Added ADD# to FORMAT#4 at Prog Numeric Format Definitions.
Changed name of wFO procedure and all calls to wfo.
Changed name of wFOStuff procedure and all calls to wfoStuff.
Changed name of pSStuff procedure and all calls to psStuff.
Moved absValueC, incValueC and absOrIncC procedures to before entryMove.
Modified entryMove procedure regarding RapidF#.
RapidF# works for FeedEntC.
Deleted FIFO Boolean condition at finishSub1, autoCycCutSub2, zonlyRepAutoCycle and opGuts.
Moved contents of formatArc to ToolPath.
Added SetAbs/SetInc at setSepSubZ.
Moved Connect command at zonlyRepAutoCycle.
Deleted Variable(3) at progStart.
Changed name of mPallTools1P procedure and all calls to mpAllTools1P.
Changed name of mP1ToollAllPfu procedure and all calls to mp1ToollAllPfu.
Changed name of mP1ToollAllPXcp procedure and all calls to mp1ToollAllPXcp.
DWB}

{12/23/98
Updated: Fanuc 6M M001.16.1
Created: Fanuc 6M M001.16.2
For: Gibbs & Associates
Versions: Virtual 5.03/ComPost2 1.7b11

.Added IF NOT FirstFeat at toolPath PointFeat.
.Deleted FIRST modifier at setSepSubZ.
.Deleted FIRST modifier at zonlyRepAutoCycle.
.Deleted FIRST modifier at zonlyRep.
.Moved checkPass to before opGuts.
.Deleted FIRST modifier at opGuts Drilling.
.Deleted FIRST modifier at end2.
DWB}

{2/10/99,
Initial : Fanuc 6M M001.16.2
Created: Acr A2100 [VG] MT97.16.2
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 H16
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. Added MSG, to all comments.
2. Removed EOR at tape start and changed ProgID1 to (PGM, ID=Program#).
3. Added start-up block after ProgID.
4. Changed all Seq to ':? ', all SeqC to SeqLabC, and added ReTag at end3.
5. Added inchOrMetric sub to output G70/71.
6. Changed #6 FORMAT (Dwell) to decimal point.
7. Moved wfoStuff into StrtPos block.
8. Changed wfo sub name to doNewWFO and changed 'G' to 'H'.
9. Changed ckCRCNum sub and moved all call from toolPath to StrtPos.
10. Changed ckCRC sub and added a call in ArcFeat.
11. Changed firstOp1, 2, & 3 to match the output of RMT97.
12. Changed newToolOp1, 3, 4, & 5 to match the output of RMT97.
13. Changed sameToolOp1, 2, & 3 to match the output of RMT97.
14. Changed end1, 2, & 3 to match the output of RMT97.
15. Changed all CoolOn to doCoolOn and added doCoolOn sub. The new sub can output
up to 6 different types of coolant.
16. Under ArcFeat, removed C from ArcIJ and ArcR. Force the output of 2 axes and
added Helix lead for XY-plane helix cuts.

drilling cycles:

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

sub routines:

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

{2/15/99,
Initial : Acr A2100 [VG] MT97.16
Created: Acr A2100 [VG] MT97.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}

{03/26/99,
Changed to Metric,
CDH}

{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#,4)
FORMAT(ADD#,4)
FORMAT(ToolDiameter#,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(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)

{Prog Subroutines *********************************}

restoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is a Metric post}
END
RETURN

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

doNewWFO:
'H' NewWFO#
RETURN

wfoStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
doNewWFO
END
ELSE
IF Flag?('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO1
ELSE
doNewWFO
END
ELSE
doNewWFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time wfoStuff is called for MP-WFO-OTAP-ECP }
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
END
RETURN

psInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

psStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN

doPostScript:
psInit
EachPS
SeqLabC PostScript EOL
psStuff
NextPS
RETURN

doEndOpPS:
psInit
EachEOPS
SeqLabC EndOpPS EOL
psStuff
NextPS
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

entryMove:
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedEnt/FeedRate }
END
IF FeedEntry?
SeqLabC Feed ZIn FeedEntC EOL
ELSE
SeqLabC RapidC ZIn EOL
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?
RapidC ZCP3C
END
EOL
RETURN

finishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
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 OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
startSub
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

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

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 doAbsOrInc ckCRC
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
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:
SetAbs
TrackZNO# ADD# SPZ# MUL# RepsLess1# RepeatZ#
SetInc
RETURN

zonlyRepAutoCycle:
autoCycPat {write pattern moves and main calls}
startSub
NewProg
EachCycle
SetSRXYtoEP
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC incValueC Connect StrtPosC EOL
absOrIncC
ELSE
Connect
END
END
SetStatusOn
doSepSubZMoves
SetStatusOff
NextCycle
SetStatusOn
autoCycCutSub1 {build element sub}
TrackZNO# 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# SPZ#
toolPath
finishSub1
SeqLabC '(ENS)' EOL
CloseSub
IF FeedConnect? AND NOT AbsValue?
setSepSubZ
END
RETURN

skipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

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

checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
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# 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 }
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
SetFlagF('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part option.' EOL
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
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$ ' MILLIMETERS )' 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:
checkPass
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wfoStuff PreTool EOL
RETURN

firstOp2Xcp: {called only in mP1ToollAllPXcp after openMP}
checkPass
SeqLabC Rapid StrtPos Speed SpinOn ToolOfst ckCRCNum wfoStuff 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:
checkPass
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wfoStuff PreTool EOL
RETURN

newToolOp4Xcp: {called only in mP1ToollAllPXcp after openMP}
checkPass
SeqLabC Rapid StrtPos Speed SpinOn ToolOfst ckCRCNum wfoStuff 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?
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}
IF LAST ProgStop?
SeqLabC Rapid StrtPos ZCP1 Speed SpinOn ToolOfst ckCRCNum wfoStuff EOL
SeqLabC doCoolOn EOL
ELSE
SeqLabC Rapid StrtPos SpeedC ToolOfst ckCRCNum wfoStuff EOL
IF NewToolOffset?
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 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}
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
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
sameToolOp2
sameToolOp3
END
END {common point for all operations}
opGuts
NextOp {loops back to EachOP until last Operation}
end1
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
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
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 3
Acr A2100 [VG] BT97 16 1
Acr A2100 [VG] CT97 16 1
Acr A2100 [VG] DT97 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