Fagor 8050 [MDR] MX28 89


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

{11/26/90
Copied & modified: Fanuc 6M M001.76.1
For: Ashland Inc.
Add SeqLabC to comment lines except for footer comments.
Modify WFOStuff sub to output WFO1 in first operation only, unless NewWFO is used.
Machine has manual speed control, change SpinOn to a comment line & delete SpeedC.
Change colons to ". " (period space) in comments.
Added ESC character, ASCII('27'), to end of prog after EOR.
Jim Radcliffe}

{4/03/91
Modified: Fagor Nasa M360.76.1
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}

{5/17/95
Initial: Fagor Nasa M360.79
ForUser: Hendrickson
Control: Fagor 8025
Machine: MTS Mega II
Comment: New Processor. Modifications per marked up readout and instructions.
Jim Radcliffe}

{6/1/95
Initial: Fagor 8025 MTS Mega II M792.79
Created: Fagor 8025 MTS Mega II M792.80
Comment: Modified sub calls and identificaton per Ricardo at Fagor.
Using G20 to call, G22 to identify and G24 to end.
Subroutines placed at enf of main program.
Changed to use Retag for consecutive sequnce numbers thru the subroutines.
Jim Radcliffe}

{12/1/95
Initial: Fagor 8025 MTS Mega II M792.80
Created: Fagor 8025 MTS Mega II M792.85
ForUser: Hendrickson Enterprises
Develop: ComPost 4.21.33, Catalyst68K v2.30.18C
Comment: Modified per marked up readout from Marc at Hendrickson.
Updated to .85 format
Added helical interpolation.
Can only loop a sub 99 times:
Created checks for loops over 99
Created CallSubCall that calls sub looped 99 times
Var#1 = desired number of loops
Var#2 = number of times to loop 99 times
Var#3 = number of remaining loops
Jim Radcliffe}

{1/12/96
Initial: Fagor 8025 MTS Mega II M792.80
Created: Fagor 8025 MTS Mega II M792.85.1
ForUser: Hendrickson Enterprises
Comment: Modified per marked up readout from Marc at Hendrickson.
Modified Fform for no negitive K values in
JM}

{1/17/96, Updated .85 to .86 version, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{3/30/96,
Initial: Fagor 8025 MTS Mega II M792.89
Created: Fagor 8025 MTS Mega II M792.89.1
Added Num Format #8, Changed Helix pitch to Format #8 in order to always output positive K value,
undid change to form that Jeff M. made on 1/12/96, MPK}

{5/6/96
Initial: Fagor 8025 MTS MegaII M792.89.1
Created: Fagor 8025 Burg [FRB] MXXX.89.1
For FRB Machine
Comment: Modified per format instructions from Marc
Added format 9 for Tool# and ToolOffset#
Deleted ProgramName$ from comments and moved it to first line of program; they always want it here.
Changed tool startup and end code to their specifications.
Added M00 after the toolchange if Tapping; they like to stop and check for chips before tapping any holes.
Added logic in Tapping to insert .3 second dwell if spindle RPM is over 130.
Joe Cusimano}

{8/8/96
Inital: Fagor 8025 Burg [FRB] MXXX.89.1
Created: Fagor 8025 Burg [FRB] MZ01.89
For FRB Machine
Added aditonal WFOStuff after G74 (G74 cancels G54-G59)
Added Literal M01 at tool cahnge if not tapping.
JM}

{1/21/97
Initial: Fagor 8025 Burg [FRB] MZ01.89
Created: Fagor 8050 [GV] Mxxx.89
ForUser: General Veneer
Control: Fagor 8050
Machine: ????
Develop: ComPost2 MSL 68K, Virtual Gibbs 3.23
Comment: New processor per marked up readout from Douglas DeWitt
Changed EOR Program# to EOR ProgramName$.
Deleted ProgramName$ from saftey start block.
Changed comment lines to begin with semi-colon.
Changed end of tool to use standard ToolChangeAtHome stuff.
Added program stop at end of tool as this is a manual tool change amchine.
Jim Radcliffe}

{2/4/97
Initial: Fagor 8050 [GV] MY12.89
Created: Fagor 8050 [GV] MY12.89.1
ForUser: General Veneer
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.23
Comment: Modified per conversation with Robert Kane
WFOs by request only.
Clean up beginning of tool.
Deleted Coolant.
Manual Tool Changer. ToolChng outputs M0.
Made ToolTypeComment a type 2 block to display to operator tool to put in spindle.
Jim Radcliffe}

{2/28/97
Initial: Fagor 8050 [GV] MY12.89.1
Created: Fagor 8050 [GV] MY12.89.2
Comment: Modified Drill Cycles & Subs per manual.
Drilling Modifications:
Changed Peck cycles from G83 to G69.
Un-commented out Peck information in drilling
Added J value for PeckChipBreaker.
Deleted K parameter from tapping.
Added R parametr for tapping.
Modified prog formatter for Dwell#
Deleted G89 cycle. Can have a Dwell with G85 FIFO cycle! G89 is for FI SpinOff FO!
Subroutine Modifications:
Changed Sub IDs and Sub calls to High Level mnemonic commnds.
Jim Radcliffe}

{3/19/97
Updated: Fagor 8050 [GV] MY12.89.2
Created: Fagor 8050 [GV] MY12.89.3
For: Gibbs & Associates/MD Research
Versions: Catalyst v3.32C/ComPost2 MSL 68K
Updated for Catalyst v3.32C per Fanuc 6M M001.89b Format
Added M001.14 source.
Changed FORMAT#2 from ###.###;0. to #####.###;0. at Prog Numeric Format Definitions.
Changed FORMAT#3 from *###.###;0. to *#####.###;0. at Prog Numeric Format Definitions.
Deleted version comments.
Deleted uncalled StdLine sub.
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 SeqLabC 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 SeqLabC 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.
Added Flag(5) to Suppress Redundant WFO for MultipleParts WorkFixtureOffsets programs.
Only concerns OneToolAllParts ExitClearancePlane situations.
DWB}

{3/20/97
Copied: Fagor 8050 [GV] MY12.89.3
Created: Fagor 8050 [MDR] A024.89
For: MD Research
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.10/ComPost2 MSL 68K
Changes made per Pete Jackson.
Converted to 4 Axis
Updated to Version 4.2 per Fanuc 6M A001.85.02b Format.
Added address W in Polar Angle Lable Edit Field in Compost Polar Coordinates Dialog.
Added FORMAT #####.###;0. to Address W Edit Field in Compost Default Formats Dialog.
Commented out SetSRXYtoEP command at ZonlyRepAutoCycle sub.
Commented out IF SPXMove? OR SPYMove? stuff two places at ZonlyRepAutoCycle sub.
DWB}

{6/11/97
Updated & Modified: Fagor 8050 [MDR] A024.89
Created: Fagor 8050 [MDR] A024.89.1
For: MD Research
Versions: Catalyst v3.33C/ComPost2 MSL 68K
Changes made per Greg Hutton of MD Research, phone calls sample parts and text.
Updated to Version 4.2 per Fanuc 6M A001.85.02c Format.
Deleted FORMAT# 8, '00' at Prog Numeric Format Definitions.
Added SUB# to FORMAT#2 at Prog Numeric Format Definitions.
Deleted TCZ# from FORMAT#4 at Prog Numeric Format Definitions.
Deleted Recall# from FORMAT#5 at Prog Numeric Format Definitions.
Changed Tool# from FORMAT#8 to FORMAT#5 at Prog Numeric Format Definitions.
Deleted ToolOffset# from FORMAT#8 at Prog Numeric Format Definitions.
Customer reported that MoveC is outputting incorrectly.
Current method is Fanuc Style, needs Fadal Style.
This requires that the sign indicates clockwise/counterclockwise direction and value indicates
Absolute position, i.e. Fanuc C-22. equal Fagor W338. or W-338.
Added support of Fadal Style CAxis Index Positioning.
Added TruncFadalMoveC and FadalMoveC subs.
FadalMoveC sub is called from two places at StartPos sub.
FadalMoveC sub is called from ToolPath PointFeat RotaryMill AutoCycle.
FadalMoveC sub currently outputs a clockwise move.
Added RotaryMill AND NOT AutoCycle, FirstFeat tests at DoAbsOrInc.
Added RotaryMill, FirstFeat tests at DoDrillAbsOrInc.
Added RotaryMill AND NOT AutoCycle test at RestoreAbsOrInc.
Added call to DoDrillAbsOrInc at ToolPath PointFeat RotaryMill Drilling.
ToolPath is output Incrementally.
Customer reported that LineNumbers were outputting incorrectly.
Changed all SeqC to SeqLabC for Retag.
Post was outputting N1?, N2?, N3? during first pass and final output was N11, N22, N33.
Customer requested Rapid Home ZCP1 block at start of output.
Added Rapid Home ZCP1 block following SafeStart block at FirstOperation.
Added ZCP1 block to MP-OTAP-FU condition at FirstOperation and NewTool.
Customer requested G43, OfstOn code be output with ZCP2 for Milling, and by itself for Drilling.
Added GetG43 sub.
Called from IF Milling and IF Drilling.
Deleted 'G43' ZCP1 block at FirstOperation, NewTool and two places at SameTool.
Customer requested G00Z5. between Operations to be changed to G44 Rapid ZCP1, OfstOff code.
Z5. was caused by support of PostScript TCZ.
Deleted SetTCZ('5') at setup and initializations.
Changed Rapid 'Z' TCZ# to 'G44' Rapid LAST ZCP1 for OfstOff at NewTool and two places at SameTool.
Changed Rapid 'Z' TCZ# to 'G44' Rapid ZCP1 for OfstOff at end of Prog.
Customer requested Tnn.nn be changed to Tnn Dnn.
Changed 'T' Tool# '.' ToolOffset# to OpToolID ToolOfst at FirstOperation, NewTool and two places
at SameTool.
Other customer requested changes:
Added literal ',MX,' to EOR ProgramName$ block at FirstOperation.
Added literal 'G70', Inch code to SafeStart block at FirstOperation.
Deleted ToolChng at FirstOperation and NewTool.
Deleted AbsOrInc from StartPos block at FirstOperation, NewTool and three places at SameTool.
Deleted AbsOrInc from StartPos block for MP-OTAP-ECP condition at FirstOperation and NewTool.
Deleted 'R1' and 'R0' parameters from Canned RigidTap/Tap at IF Drilling.
Discovered and corrected problem with logical order of nested SubProgram Numbers.
Added TagUp at OpenMP, Milling, ZonlyRepAutoCycle, IF Milling and IF Drilling Repeats and MasterOp.
Added TagDown at FinishSubG92, two places at CloseMP, Milling, two places at ZonlyRepAutoCycle,
ZonlyRep and IF Drilling MasterOp.
DWB}

{6/12/97
Copied: Fagor 8050 [MDR] A024.89.1
Created: Fagor 8050 [MDR] MX28.89
For: MD Research
Versions: Catalyst v3.33C/ComPost2 MSL 68K
Changes made per Greg Hutton of MD Research, phone calls sample parts and text.
Converted to 3Axis post.
Deleted all RotaryMill and MoveC related codes.
DWB}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SUB#,2)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(CalcCP2FmSurf#,4)
FORMAT(Retract#,4)
FORMAT(ADD#,5)
FORMAT(Tag#,5)
FORMAT(SpeedRPM#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Repeats#,5)
FORMAT(Dwell#,6)
FORMAT(HelixPitch#,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

WFONum:
'G' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
ELSE
IF Flag?('2')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO1
ELSE
{WFONum}
END
ELSE
{WFONum}
END
END
END
END
SetFlagF('2')
RETURN

DoSubComment:
IF UseComments? AND SubComment?
SeqLabC '; SUB NUMBER. ' Tag# EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLabC '; OPERATION ' Operation# '. ' OperationType$ EOL
END
IF OperationComment?
SeqLabC '; ' OperationComment$ EOL
END
IF WorkGroupComment?
SeqLabC '; ' WorkGroupComment$ EOL
END
IF ToolTypeComment?
SeqLabC '(MSG "TOOL ' Tool# '. ' ToolDiameter# ' ' ToolType$ '")' EOL
END
IF ToolComment?
SeqLabC '; ' ToolComment$ EOL
END
RestoreScale
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'W' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'W' 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

EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
SeqLabC '(SUB ' Tag# ')' EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqLabC '; WARNING Z CLEARANCE WILL CHANGE' EOL
SeqLabC '; WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
RETURN

StdSub:
'>' Tag# EOL
SeqLab '(CALL ' Tag# ')' EOL
SeqLab Preset ShiftRC EOL
'<' Tag# EOL
SeqLabC '(RPT ' 'NÅ‚' Tag# ',N²' Tag# ') N' RepsLess1# EOL
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqLabC '(RET)' EOL
TagDown
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN

OpenMP:
TagUp TagInc
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqLabC SetWFO EOL
END
SeqLabC '(CALL ' Tag# ')' EOL
IncWFO
NextWFO {simple NextPart}
ELSE
'>' Tag# EOL
SeqLab '(CALL ' Tag# ')' EOL
SeqLab Preset ShiftPC EOL
'<' Tag# EOL
SeqLabC '(RPT ' 'NÅ‚' Tag# ',N²' Tag# ') N' PartsLess1# EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLabC '(RET)' EOL
TagDown
CloseSub
SeqLabC WFO1 EOL
ELSE
SeqLabC '(RET)' EOL
TagDown
CloseSub
SeqLabC Preset UnshftPC EOL
END
RETURN

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqLabC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArc
ELSE
CCWArc
END
IF XYPlane?
MoveX MoveY ArcIJ
IF ZMove?
MoveZ 'K' HelixPitch#
END
ELSE
IF XZPlane?
MoveX MoveZ ArcIJ
IF YMove?
MoveY 'J' HelixPitch#
END
ELSE { YZPlane }
MoveY MoveZ ArcIJ
IF XMove?
MoveX 'I' HelixPitch#
END
END
END
RETURN

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

ckCRCNum:
{ Not Supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC '(CALL ' Tag# ')' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC DoDrillAbsOrInc MoveSXYZC EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC DoAbsOrInc ckCRC RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed EOL
ELSE
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLabC IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
ToolPath
SeqLabC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqLabC '(RET)' EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after TagInc for correct sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
TagUp TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
TagDown
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SeqLabC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagUp TagInc
EachCycle
{SetSRXYtoEP}
IF FeedConnect?
Feed
IF NOT FirstCycle?
{IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
END}
END
SeqLabC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
{IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
END}
IF FeedEntry?
SeqLabC ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC '(CALL ' Tag# ')' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLabC Feed ZCP2 FeedEnt EOL
ELSE
SeqLabC Rapid ZCP2 EOL
END
END
SeqLabC '(RET)' EOL
TagDown
CloseSub
{Element shift, not pattern}
TagDown
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC '(CALL ' Tag# ')' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC '(RET)' EOL
TagDown
CloseSub
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN

GetG43:
IF FirstOperation? OR NewTool? OR LAST ProgStop? OR NewToolOffset?
'G43' { OfstOn }
END
RETURN

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

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

GetStartOfSameTool:
DoOpComments
DoPostScript
SeqLabC WFOStuff EOL
CheckPass
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
IF PSComment? AND UseComments?
'PostScript:' 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
' EndOP -' EOL
' all literals and commands before an ENDOP command' EOL
' will appear at the beginning of the operation. All ' EOL
' literals and commands after an ENDOP command will appear' EOL
' at the end of the operation. ' 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
EachOp {Start of post processing *********************}
IF MultipleParts?
IF AllToolsOnePart?
IF EquallySpacedOffsets?
SetFlag('2') { WFOStuff }
END
ELSE {implied OneToolAllParts?}
IF FullUp?
IF EquallySpacedOffsets?
SetFlag('2') { WFOStuff }
END
ELSE {implied ExitClearancePlane?}
SetFlag('2') { WFOStuff }
END
END
ELSE
SetFlag('2') { WFOStuff }
END
IF FirstOperation?
EOR ProgramName$ ',MX,' EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramComment?
SeqLabC '; ' ProgramComment$ EOL
END
IF FormatNameComment?
SeqLabC '; FORMAT. ' FormatName$ EOL
END
IF TimeComment?
SeqLabC '; ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
SeqLabC '; OUTPUT IN ' MoveType$ ' INCHES' EOL
END
IF PartsComment?
SeqLabC '; PARTS PROGRAMMED. ' Parts# EOL
END
IF StartToolComment?
SeqLabC '; FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Rapid Plane CRCOff DrillOff AbsOrInc 'G70' EOL { English }
SeqLabC Rapid Home ZCP1 EOL
SeqLabC OpToolID ToolOfst EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
SeqLabC ZCP1 EOL
END
SeqLabC WFOStuff EOL
SeqLabC Speed SpinOn EOL
CheckPass
SeqLabC Rapid StrtPos EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC WFOStuff EOL
SeqLabC Speed SpinOn EOL
SeqLabC Rapid StrtPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC 'G44' Rapid LAST ZCP1 EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC Rapid Home SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF LAST ProgStop?
SeqLabC 'M00' EOL
END

{Start new Operation}

SeqLab Rapid Plane CRCOff DrillOff AbsOrInc EOL
SeqLabC OpToolID ToolOfst EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
SeqLabC ZCP1 EOL
END
SeqLabC WFOStuff EOL
SeqLabC Speed SpinOn EOL
CheckPass
SeqLabC Rapid StrtPos EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC WFOStuff EOL
SeqLabC Speed SpinOn EOL
SeqLabC Rapid StrtPos EOL
END
ELSE
IF SameTool?
IF LAST ProgStop?
SeqLabC 'G44' Rapid LAST ZCP1 EOL
DoEndOpPS
SeqLabC SpinOff EOL
SeqLabC 'M00' EOL

{Start new Operation}

SeqLabC OpToolID ToolOfst EOL
GetStartOfSameTool
SeqLabC SpeedC SpinOn EOL
SeqLabC PlaneC Rapid StrtPos EOL
ELSE
IF NewToolOffset?
SeqLabC 'G44' Rapid LAST ZCP1 EOL
DoEndOpPS

{Start new Operation}

SeqLabC OpToolID ToolOfst EOL
GetStartOfSameTool
SeqLabC SpeedC EOL
SeqLabC PlaneC Rapid StrtPos EOL
ELSE
DoEndOpPS

{Start new Operation}

GetStartOfSameTool
SeqLabC SpeedC EOL
SeqLabC PlaneC Rapid StrtPos EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC GetG43 ZCP2C EOL
IF Repeats?
TagUp TagInc
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
SetFlag('1') { Milling ZShiftOnly SepSubs }
ZonlyRep
SetFlagF('1')
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO?
SeqLabC FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
SeqLabC GetG43 EOL
IF Repeats?
TagUp TagInc
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC ZCP1 EOL
END
GetCycle
SeqLabC Cycle FromCP StrtPos RLevel ZDepth Peck
IF Peck?
'C' Retract#
'D' CalcCP2FmSurf#
IF PeckChipBreaker?
'H' Retract#
'J' ADD# NumFullPecks# Num#('1')
END
END
Dwell FeedEnt EOL
IF CallMasterOp?
SeqLabC '(CALL ' CallMasterNum# ')' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
TagUp
NewMasterTag
SeqLabC '(CALL ' Tag# ')' EOL
StartSub
ToolPath
SeqLabC '(RET)' EOL
TagDown
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLabC DrillOff ZCP3 EOL
IF Repeats?
FinishSubG92
END
SeqLabC RapidC ZCP3C EOL
END
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC 'G44' Rapid ZCP1 EOL { OfstOff }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC Rapid FirstHome SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF ProgStop?
SeqLabC 'M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC EOP EOL
CloseSub
Post2 {organize Subs into one program}
ASCII('27') EOL
Close
Retag
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


Wyszukiwarka

Podobne podstrony:
Fagor 8050 [MDR] MX28 89m
Fagor 8025 [PI] MY79 89 1m
Fagor 8025 [PI] MY79 89 1
Fagor 8025 MTS MegaII M792 89 1
Fagor 8025 Burg [FRB] MZ01 89
Fagor 8025 MG Bosto M913 89
Bandit IV AB [DM] MV32 89 1
Fadal Format 2 [MM] MW60 89
Fadal Format 2 [PEP] M116 89 1
Fanuc MF M4 MS NS SSI M421 89 2
SDIZO MDR
Fanuc 10M MVJR [DM] M740 89

więcej podobnych podstron