Servo II [TMC] D946 12 2


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

{7/24/90, Updated: Yasnac MX2 Matsuura M017.55 to .72.1 format, JR}
{7/30/90, Replaced SetSRXYZero with SetSRXYtoSP, JR}

{4/03/91
Modified: Yasnac MX2 Matsuura M017.73
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}

{9/29/91, Made from M017.79, added 4 axis capabilities, wfg}
{11/11/91, added 4 axis feed, wfg}

{*
6-11-92, v.80.03, [cwh]
added pre tool selection using 'PreTool'.
changed SpinOff from M5 to M19 and then hard coded an M5 at the end.
combined tool number and tool change (M06) lines.
6-12-92, [cwh]
changed arc format to use R when less than 175 degrees.
*}

{11/18/92, Updated to .81 format, minor corrections, JR}

{11/18/92 - 4/6/93
Copied & modified: Yasnac MX3 4A Mat A001.81
For: Unitek
Control: Servo II
Machine: Supermax YCM-40
Deleted Plane commands from MachSpec, no plane selection, arcs in the Z axis are segmented.
Three different feed addresses used:
X & Y use an F
Z uses an E - Changed FeedEnt to 'E' FeedEntry#.
C uses a D - Calculating based on FeedContour# and ZDepth#
Talked with Greg at Servo on 4/6/93 and modified usage of feeds per that discussion.
All FeedRates are called once at the beginning of the operation.
Only left in other places where they could have been modified due to ConstantSurfaceFeed.
No ToolChng command, using M00 for a manual tool change.
Coolant is M7, no spindle speed command, SpinOn only used, no EOR codes, or ProgID.
Comments use an open paren only.
Modified Subroutine commands:
Changed NewProg to TagInc
Deleted SubCall & RepLab
Changed CallLab to 'P' Tag#
Changed RepCycs to Repeats#, outputting '01' for only 1 repeat or part.
WFOs by PostScript request only, they are the same code as the tool offsets.
T code calls Diameter, X, Y, Z & C offsets.
No drill cycles, added manual drilling & put cycle in sub when there is more than 1 feature.
CRCOff with last linear feature.
Jim Radcliffe}

{6/25/93, v.81.4
For: general
By: [cwh]
Added the SetOpArcSegAcc to the EachOp/NextOp loop to set the arc segmentation
accuracy value to the value entered in ncCAM.
}

{9/21/94
Updated: Servo II A006.81.4
For: Gibbs & Associates
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per Pete Jackson
Updated to Version 4.2 per Fanuc 6M A001.81.2e Format.
Reorganized Prog Numeric Format Definitions to conform with master.
Corrected FORMAT5 from '########;0' to '#######0'.
Corrected FORMAT6 for Dwell# from '####^###;' to '####^##0'.
Minor modification to StartPos sub.
Added RotaryMove sub.
Minor modification to StdLine sub.
Added DrillStuff sub.
Contains code previously handled at ToolPath PointFeat.
Minor modification to ToolPath PointFeat, RapidFeat and LineFeat.
Minor modification to AutoCycCutSub2 sub.
Moved UnSkipZ from FinishSub1 to ZOnlyRep where SkipZ is set.
Added CkCRC sub for CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Added support of CRC during multiple pocket dog-bone operation.
Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
Outputs G41/G42 on First LineFeat after Z Plunge.
Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
Assures that G40 is not output prior to LastFeat.
Added CRCOffC to RapidFeat at ToolPath.
Outputs G40 for ZMoveOnly Feature at ToolPath RapidFeat.
Modified Rotary PointFeat to support AutoCycles and Drilling better at ToolPath.
Changed order of RapidFeat and LineFeat handling.
Checks for RotaryMill before other types.
Deleted FIRST modifier for CalcSCAng at StartPos sub.
It was Modifying all Operations by FirstOperation conditions.
Moved condition for checking IF RotaryMill? AND YZPlane? to common point.
Changed Post command to CloseSub Post2 at end of Prog
DWB}

{9/22/94
Copied: Servo II A006.81.4
Created: Servo II M693.81.5
For: Gibbs & Associates
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Versions: Catalyst v2.05.54C/Compost 4.21.22
Changes made per Pete Jackson.
Stripped all 4 Axis code for purpose of converting to 3 Axis Mill for Virtual.
Deleted StartPosX# from Prog Numeric Format Definitions.
Deleted StartPosY# from Prog Numeric Format Definitions.
Deleted SetScale('1') at RestoreScale sub.
Deleted StartPos sub.
Deleted RotaryMove sub.
Deleted all IF RotaryMill? conditions.
Deleted all calls to RotaryMove sub.
Changed all calls to StartPos sub to StrtPos command.
Deleted SetOpArcSegAcc at Start of post processing.
Deleted literal 'C00.000', Home Reference Position at FirstOperation.
Deleted IF RotaryMill? AND YZPlane? condition at common point.
Deleted FORMULA for RotaryMill FeedRate at common point.
}

{2/9/96, Updated .81 version to .84, MPK}

{2/24/96
Copied: Servo II M693.84
Created: Servo II [MIDAS] M946.84
For: The Midas Company
Changes made per Bill Garland.
Removed G92 Line & Replaces it with G0X0Y0 literal
Added spindle speed to all M3 lines
Replaced OffstOff w/ M25 Literal
JM}

{3/22/96, Tested ZOnlyRepAutoCycle, Incremented number to .87, MPK}

{5/24/96
Modified: Servo II [TMC] M946.87
Created: Servo II [TMC] M946.12
For: The Midas Company
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.05C/Compost 4.21.37/1.0a
Updated for Catalyst v3.0 per Fanuc 6M M001.12 Format.
Changed literal 'G0X0X0' to 'G0X0Y0' at FirstOperation.
This was a typo, see 2/24/96.
Commented out CRCOnC at ckCRC sub.
Customer requested no CutterRadiusCompensation.
Replaced manual Drill Cycles with Servo Version 4.0 Canned Drill Cycles.
Problems corrected:
1. Tagging now handles all situations, including special DrillSub handling.
Was not working for most nested conditions.
2. MultipleParts WorkFixtureOffsets no longer calls StartSub.
Was causing OpenSub without corresponding CloseSub.
3. Deleted all remaining FeedEnt/FeedRate/DecelRate/ArcFeedC commands.
FeedRate is output at CommonPoint per program manual rules.
4. Deleted all NewWFO related commands.
Control does not support WorkFixtureOffsets.
Changes made per Bill Garland at The Midas Company.
DWB}

{5/24/96, M946.12, Updated for Catalyst v3.0 per Fanuc 6M (NW) D001.12 Format, DWB}

{07/15/98,
Initial: Servo II [TMC] D946.12
Created: Servo II [TMC] D946.12.1
For: The Midas Company

Changes to Prog:
1) Per Customer request - deleted previous Servo Canned Drill Cycles. Replaced
with manual Drill cycles from Fanuc 6M NoSubs NoDr M001.
2) DrillPoint - This subroutine used to be DrillFeat, just renamed.
3) OpGuts - Added code so that Zmoves will be in a subroutine.
CDH}

{07/22/98,
Initial: Servo II [TMC] D946.12.1
Created: Servo II [TMC] D946.12.2
For: The Midas Company

Changes to Prog:
1) OpGuts - Added TrackZNO# SPZ# to right before toolpath call in Drilling.
CDH}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(ToolDiameter#,4)
FORMAT(SUB#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(CalcZSurf#,4)
FORMAT(Peck#,4)
FORMAT(ZDepth#,4)
FORMAT(TrackZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Dwell#,6)
FORMAT(FeedEntry#,6)
FORMAT(Parts#,7)
FORMAT(Tag#,7)
FORMAT(CallMasterNum#,7)
FORMAT(Repeats#,7)
FORMAT(CSOffsetA#,8)
FORMAT(CSOffsetB#,8)

{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

DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Tag# 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
END
RETURN

CSWFO:
'G' ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CalcCSWFO: {(iPart-1)*NumOfCS#)}
'G' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1')
RETURN

CSAngleA:
IF AAxisAvail?
'C' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

DoCSWFOComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
'( ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
RETURN

DoCSG52Comment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
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?
SeqC Feed ZIn EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
'P' Tag# 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 'P' Tag# Repeats# EOL
StartSub
RETURN

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

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

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

OpenMP:
NewProg
IF Flag?('2') OR WFOCS?
StartSub
SaveCSProg
SaveCSOpStart
ClearCSOffset
ELSE
IF WorkFixtureOffsets?
'This processor does not support Multiple Parts with Work Fixture Offsets' EOL
ELSE
TagUp TagInc
SeqC 'P' Tag# Parts# EOL
StartSub
END
END
RETURN

CloseMP:
IF Flag?('2') OR WFOCS?
SeqC EndSub EOL
CloseSub
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
IF Flag?('2')
SeqC SetWFO EOL
EachCSOp
DoCSG52Comment
ClearCSOffset
SeqC 'G94X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ELSE
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
END
ClearCSOffset
IncWFO
NextWFO {simple NextPart}
ELSE
LastWFO
EachWFO {simple eachPart}
IF Flag?('2')
SeqC SetWFO EOL
EachCSOp
DoCSG52Comment
ClearCSOffset
SeqC 'G94X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
ELSE
EachCSOp
DoCSWFOComment
ClearCSOffset
SeqC CalcCSWFO EOL
SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL
NextCSOp
END
ClearCSOffset
DecWFO
NextPrevWFO {simple NextPart}
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
IF WorkFixtureOffsets?
'This processor does not support Multiple Parts with Work Fixture Offsets' EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
TagDown
CloseSub
SeqC Preset UnshftPC EOL
END
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
SeqC EndSub EOL
CloseSub
NewProg
StartSub
SaveCSProg
END
ClearCSOffset
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?
SeqC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
{CRCOnC} { Not Supported }
END
END
RETURN

FormatLine:
DoAbsOrInc ckCRC FeedC MoveXYZC
RETURN

ckCRCNum:
{ CRCOffsetC not supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC 'P' Tag# '01' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC DoDrillAbsOrInc MoveSXYZC EOL
SeqC 'P' Tag# '01' EOL
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 FormatLine ckCRCNum EOL
END
ELSE
IF ArcFeat?
SeqC FormatArc EOL
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
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{removed RapidC}
{removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO?
FeedC ZCP2
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 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
SeqC 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?
SeqC IncValue StrtPosC EOL
AbsOrInc
END
END
SeqC ZInPlusInc 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 EOL
ELSE
IF FirstCycle?
Rapid
END
SeqC RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC 'P' Tag# '01' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqC Feed ZCP2 EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
SeqC EndSub EOL
TagDown
CloseSub
{Element shift, not pattern}
TagDown
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc EOL {changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc EOL
ELSE
SeqC RapidC ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better}
END
END
SeqC 'P' Tag# '01' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC EndSub EOL
TagDown
CloseSub
RETURN

DoPeck:
IF NOT Flag?('2')
SetScale('1')
IF GreaterThan? SUB# Recall# Num#('4') Peck# SPZ# {IF OldZ - Peck# > Depth}
Save# Num#('4') SUB# Recall# Num#('4') Peck# {Save#1 = OldZ - Peck# = NewZ}
RestoreScale
SeqC Feed 'Z' TrackZ# MUL# Recall# Num#('4') NumSc#('1') FeedEntC EOL {move to NewZ}
IF PeckFullRetract?
SeqC Rapid ZCP2 EOL {move to CP2}
END
SeqC RapidC 'Z' TrackZ# ADD# Recall# Num#('4') Retract# EOL {move to RetractZ}
ELSE
RestoreScale
SeqC Feed 'Z' TrackZ# SPZ# FeedEntC EOL {move to Depth}
IF RetractToCP1?
SeqC Rapid ZCP1 EOL {move to CP1}
ELSE
SeqC Rapid ZCP2 EOL {move to CP2}
END
SetFlag('2')
END
END
RETURN

DrillPoint:
SeqC ZCP2C EOL
IF Peck?
SetFlagF('2') { done flag }
SetScale('1')
Save# Num#('4') ClearancePlane2#
RestoreScale
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
ELSE
SeqC Feed 'Z' ZDepth# FeedEntC EOL
IF Dwell?
SeqC 'G4X' Dwell# EOL
END
IF FIRO?
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
ELSE
SeqC Rapid ZCP2 EOL
END
END
IF FIFO?
SeqC ZCP2 EOL
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
END
END
IF TAP?
SeqC InverseSpinOn EOL
SeqC ZCP2 EOL
SeqC SpinOn EOL
IF RetractToCP1?
SeqC Rapid ZCP1 EOL
END
END
END
RETURN

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

ProgStart:
InitProg
TagInit
StandardXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { use WFO for CS changes }
SetFlag('3') {True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP}
SetFlag('4') {True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') { CRCOffsetC }
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
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('0')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('2')
END
END
ELSE
IF LTEqual? NumOfCS# Num#('0') {****}
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('2')
END
END
RETURN

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

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

OpGuts:

{output all feed rates}
SeqC 'E' FeedEntry#
IF Milling?
FeedRate
END
EOL

IF Milling?
SeqC 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?
SeqC ZCP3C EOL
ELSE
IF FIFO?
SeqC FeedC CRCOffC ZCP3C EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
TagInc
StartSub
drillPoint
SeqC EndSub EOL
CloseSub
TrackZNO# SPZ#
toolPath
SeqC Rapid ZCP3 EOL
END
END
RETURN

NotSameToolWFO:
IF WFOCS?
DoCSWFOComment
SeqC CSWFO EOL
ELSE
IF ChangeCS?
DoCSG52Comment
SeqC 'G94X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
ELSE
IF NeedWFO1?
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
END
END
END
ClearCSOffset
RETURN

SameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
SeqC CSWFO EOL
END
ELSE
IF ChangeCS?
DoCSG52Comment
SeqC 'G94X' CSOffsetX# 'Y' CSOffsetY# 'Z' CSOffsetZ# EOL
END
END
ClearCSOffset
RETURN

InitOp:
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'( ' ProgramName$ EOL
END
IF ProgramComment?
'( ' ProgramComment$ EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
SeqC 'G70' AbsOrInc 'G99' EOL
'( Set Home Reference Position' EOL
'G0X0Y0' EOL {added per customer midas}
RETURN

FirstOp1:
DoOpComments
Seq OpToolID EOL
DoPostScript
RETURN

FirstOp2:
SeqC SpinOn Speed EOL
RETURN

FirstOp3:
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
SeqC ZCP1 EOL
SeqC CoolOn EOL
RETURN

FirstOp3a: {can't XY position before WFO}
CheckPass
SeqC ZCP1 EOL
SeqC CoolOn EOL
RETURN

NewToolOp1:
SeqC CoolOff EOL
SeqC RapidC 'M25' EOL
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqC RapidC Home EOL
END
RETURN

NewToolOp3: {Start new Operation}
SeqC 'M00' EOL { Manual ToolChng }
DoOpComments
Seq OpToolID EOL
DoPostScript
RETURN

NewToolOp4:
SeqC SpinOn Speed EOL
RETURN

NewToolOp5:
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
SeqC ZCP1 EOL
SeqC CoolOn EOL
RETURN

NewToolOp5a:
CheckPass
SeqC ZCP1 EOL
SeqC CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC RapidC 'M25' EOL
SeqC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC RapidC 'M25' EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqC PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB SpinOn Speed EOL
SeqC ZCP1 EOL
SeqC CoolOn EOL
ELSE
SeqC PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
IF NewToolOffset?
SeqC ZCP1 EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
END
END
RETURN

End1:
SeqC CoolOff EOL
SeqC RapidC 'M25' EOL
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC Rapid FirstHome EOL
END
IF ProgStop?
SeqC 'M00' EOL
END
RETURN

End3:
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
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
IF FirstOperation?
InitOp
OpenMP
FirstOp1
{WFOStuff}
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
{WFOStuff}
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
End1
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp
IF FirstOperation?
InitOp
FirstOp1
{WFOStuff}
FirstOp2
OpenMP
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
{WFOStuff}
NewToolOp4
OpenMP
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
End1
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp
IF FirstOperation?
InitOp
FirstOp1
{WFOStuff}
FirstOp2
FirstOp3a
OpenMP
SeqC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
{WFOStuff}
NewToolOp4
NewToolOp5a
OpenMP
SeqC AbsOrInc Rapid StrtPos CSAngleA CSAngleB EOL
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END
OpGuts
NextOp
CloseMP
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp
IF FirstOperation?
InitOp
FirstOp1
NotSameToolWFO
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NotSameToolWFO
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolWFO
SameToolOp3
END
END
OpGuts
NextOp
End1
End2
End3
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END


Wyszukiwarka

Podobne podstrony:
Lab ME II zad rach 12 13
II CSK 593 12 1 (2)
Servo II Acra [WE] BQ34 16 1
Servo II [DE] M108 89
Servo II [BI] M845 89
II CSK 583 12
Servo II [IMM] MW38 89 2
Servo II M693 87
surowce II st 2011 12 04 ST i NST metody badania surowców
surowce II st 2011 12 04 ST i NST metody badania surowców
Servo II [DTI] MX63 89 2
II CSK 271 12 1
II CSK 187 12 1 (2)
ZRF wyklad II problemy wyceny 12

więcej podobnych podstron