Cin Arrow 750 [DFM] MT60 89 1


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

{Prog Comments ****}

{
10/21/94 [cwh]
M703.82

Initial creation from M688.82.
Removed EOR from start and end of prog.
Added PRG comment line as first line.
Modified drill cycle commands.
Forced quotes around all comment lines.
}

{
11/9/94 [cwh]
Cin Acr A2100 M703.82.03 ( from M703.82.02 )

Added the function DoLastEndOpPS.
Modified End2 function to call DoLastEndOpPS.
}

{
11/22/94 [ws]
Cin Acr A2100 M703.82.04 ( from M703.82.03 )

Modified End of Program command from M2M53 to M30.
Modified so No Pretooling done on last tool change.
Modified so 'W' value posted on all drill lines based on "W = zretract - top surface"
Modified drilling 'R' value to be top surface via CalcZSurf#

11/30/94 [ws]
Cin Acr A2100 M703.82.05 (from M703.82.04)

Modified PGM Type A2100_247 to A2100_274

11/30/94 [ws]
Cin Acr A2100 M703.82.06 (from M703.82.05)

Modified G80 line to include a 'R' value where R = zretract.

12/05/94 [ws]
Cin Acr A2100 M703.82.07 (from M703.82.06)

Modified PGM block line so to eliminate the preceeding N#
Modified to support D-word and O-word offset values
Cleaned the way pretooling handled

12/15/94 [ws]
Cin Acr A2100 M703.82.08 (from M703.82.07)

Modified so 'Z' value for drilling is calculated as "Z = Tip Depth - Top Surface"
Modified so when using Post Script command for coolant change coolant reset back to the original

1/9/95 [ws]
Cin Acr A2100 M703.82.09 (from M703.82.08)

Modified so 1000 is not added to tool number so post can support CMI Tool ID#

1/27/95 [ws]
Cin Acr A2100 M703.82.10 (from M703.82.09)

Modified so colon blocks appear for every operation.
Modified to support Mustang cycle Parameter Values for drilling operations.
Modified so Post Script literal appears after turning coolant on after the colon block.

2/3/95 [ws]
Cin Acr A2100 M703.82.11 (from M703.82.10)

Modified to support additional Peck J words : J1 and J3.
Fixed output of Dwell Cycle Parameter Value for G82 cycle only.

2/4/95 [ws]
Cin Acr A2100 M703.82.12 (from M703.82.11)

Modified to support additional Peck J words : J2 and J12
Modified to support additional Peck Cycle Parameter G83_SHRT_RET.
Fixes Peck K word appearing on all drilling cycles.

2/7/95 [ws]
Cin Acr A2100 M703.82.13 (from M703.82.12)

Modified to support additional Peck Cycle Parameter G83_RELIEF.
Modified to support Part (.vnc) name in place of no part comment and included in comments.

2/8/95 [ws]
Cin Acr A2100 M703.82.14 (from M703.82.13)

Modified to support Cycle Parameter Index 2 instead of Index 1.

2/8/95 [ws]
Cin Acr A2100 M703.82.15 (from M703.82.14)

Changed Cycle Parameter string so end bracket is before the equal sign rather than after value.
Changes first line after PGM block to be a colon block as follows - :G17G70G90

2/8/95 [ws]
Cin Acr A2100 M703.82.16 (from M703.82.15)

Modified to support Cycle Parameter changes as per Mike - said the format he gave me wasn't correct.
}

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

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

{5/13/96, eliminated IF Metric? condition from drill cycle comment, this is and English post, MPK}

{13Jun97
Original: Cin Acr A2100 M703.87.1
Created: Cin Acr A2100 [VCA] MX31.89
For: Victaulic Company
Changes made per: Lou Moyer
Updated Post to .89 per Cin Acr A2100 [REN] CY33.15.1m
Changed WFO1 from H1 to H0 in MachSpec
Added ';' to the start of Comment Lines
Added litterals 'M26' and 'G0G98X10Y19.9' in End3
Changed litteral 'M30' to 'M2' in End3
Charles Winston}

{2Dec98
Original: Cin Acr A2100 [VCA] MX31.89
Created: Cin Mil Arrow 750 [DFM] MT60.89
For: DFM Engineering
Changes made per: Bill Cox
Added Post Header Comment at the top of Prog.
Added CheckSpinOn to output M13 for Spindle and CoolantOn. Called in FirstOp, NewTool and SameTool
Added spaced to all Codes
Changed (CLS,L to (CLS, in StdSub, ToolPath, ZonlyRepAutoCycle, ZonlyRep, CallMasterOp and MasterOp
Updated the rest of the post to match output code from Acr A2100 Generic M930.12.10
Charles Winston}

{17Dec98
Original: Cin Mil Arrow 750 [DFM] MT60.89
Created: Cin Mil Arrow 750 [DFM] MT60.89.1
For: DFM Engineering
Changes made per: Bill Cox
Added a comma to '(DFS,' in StartSub
Deleted 'M26' from the Metric Definition in FirstOperation
Deleted Literal ';H-WORD FIXTURE NUMBER FROM SEQUENCE STARTING NUMBER ' in FirstOperation
Deleted CoolOff in NewToolOp1
Charles Winston}

{Prog Numeric Format Definitions ****}

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CP1LessCP2#,4)
FORMAT(ABS#,4)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(CalcZSurf#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4)
FORMAT(Repeats#,5)
FORMAT(Tag#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Program#,7)
FORMAT(HelixPitch#,8)
FORMAT(Program#,9)

{Prog Subroutines ****}

{***** CMI specific Subroutines *****}

CheckSpinOn: {turns on spindle and coolant}
IF CoolOff?
SpinOn
ELSE
IF CWSpindle?
' M13'
ELSE
' M14'
END
END
RETURN

ToolCRCOfst:
IF CutterRadiusCompensation?
' D' ToolOffset# ' O' CRCOffset#
ELSE
' D' ToolOffset# ' O0'
END
RETURN

CMIPreTool:
IF NOT LastTool?
FORMAT(ADD#,7)
' T' NextTool# { PreTool }
FORMAT(ADD#,4)
END
RETURN


CMI_Wvalue:
IF RetractToCP1?
IF NotEqual? SUB# ClearancePlane1# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane1# CalcZSurf# Num#('0')
' W' SUB# ClearancePlane1# CalcZSurf#
END
END
ELSE
IF NotEqual? SUB# ClearancePlane2# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane2# CalcZSurf# Num#('0')
' W' SUB# ClearancePlane2# CalcZSurf#
END
END
END
RETURN

{***** End A2100 specific 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

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

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

DoSubComment:
IF UseComments? AND SubComment?
'(MSG, "SUB NUMBER: ' Program# '" )' EOL
END
RETURN

DoCSWFOComment:
'( CS#' CS# ' - ' CSComment$ ' )' EOL
'( ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' A' CSOffsetA# ' B' CSOffsetB# ' )' EOL
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

CSAngleA:
IF WFOCS?
'A0.'
ELSE
'A' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF WFOCS?
'B0.'
ELSE
'B' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

DoCoolOn:
{
IF ThruSpin?
' M27'
ELSE
IF Pulse?
' M28'
ELSE
IF Mist?
' M29'
ELSE
IF HiPressure?
' M07'
ELSE
IF FloodThruSpin?
' M8 M27'

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

PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F { ??? }
MasterOpF
CallMasterOpF
ResetCool
RETURN

GetIndex:
IF FourthCW?
FORMAT(FourthDegree#,2)
' A' FourthDegree#
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
' A' FourthDegree#
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
' B' FifthDegree#
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
' B' FifthDegree#
FifthCCWF {reset flag}
END
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
SeqLabC GetIndex EOL
NextPS
RETURN

DoLastEndOpPS:
PSInit
NEXT EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
SeqLabC GetIndex EOL
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt 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 'G10=[T2]V0' EOL {sets temporary register #2 to 0}
SeqLabC 'Q' Program# '1' EOL {branch label 1}
SeqLabC '(CLS,' Program# ')' EOL {call subroutine}
SeqLabC 'G10=[T2]V[T2]+1' EOL {increment register #2 by 1}
SeqLabC 'G11E[T2]=' Repeats# 'L' Program# '2' EOL {if register #2 is equal to number of repeats then jump to branch label 2}
SeqLabC 'G11L-' Program# '1' EOL {jump backwards to branch label 1}
SeqLabC 'Q' Program# '2' EOL {branch label 2}
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN

OpenMP:
IF WFOCS?
'(Advanced Mill Multiple parts, Long Hand not supported in this post)' EOL
ELSE
{TagInc}
IF WorkFixtureOffsets?
ELSE
'(Non-WFO Multiple parts, Long Hand not supported in this post)' EOL
END
END
RETURN

CloseMP:
IF WFOCS?
'(Advanced Mill Multiple parts, Long Hand not supported in this post)' EOL
ELSE
IF WorkFixtureOffsets?
ELSE
'(Non-WFO Multiple parts, Long Hand not supported in this post)' EOL
END
END
RETURN

SubCSMP:
IF WFOCS? AND ChangeCS?
SeqLabC EndSub EOL
CloseSub
NewProg
StartSub
SaveCSProg
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?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
IF ZMove?
MoveX MoveY MoveZ ArcIJ 'K' HelixPitch#
ELSE
MoveX MoveY ArcIJ
END
ELSE
{ ??? what about incr subs here ??? }
IF XZPlane?
IF YMove?
MoveX MoveY MoveZ ArcIJ 'J' HelixPitch#
ELSE
MoveX MoveZ ArcIJ
END
ELSE { YZPlane }
IF XMove?
MoveX MoveY MoveZ ArcIJ 'I' HelixPitch#
ELSE
MoveY MoveZ ArcIJ
END
END
{ ??? }
END
RETURN

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

ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC '(CLS,' Program# ')' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF Drilling?
IF SPXMove? OR SPYMove? OR SPZMove?
SeqLabC MoveSXYZC
CMI_Wvalue
EOL
END
ELSE
SeqLabC MoveSXYZC EOL
END
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 '(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 AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
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 '(CLS,' Program# ')' 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 '(ENS)' EOL
CloseSub
{Element shift, not pattern}
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 '(CLS,' Program# ')' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC '(ENS)' EOL
CloseSub
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
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}
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?
IF Repeats?
NewProg
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
END
EOL
{SeqLabC DrillCP EOL}
GetCycle

IF FIFO? AND Dwell? { Bore/Ream with Dwell }
SeqLabC PlaneC ' G89'
ELSE
IF FIRIFIRO?
SeqLabC PlaneC ' G88'
ELSE
IF BackBore?
SeqLabC PlaneC ' G87'
ELSE
IF FIStopOffWallRO?
SeqLabC PlaneC ' G86'
ELSE
IF RigidTap?
SeqLabC PlaneC ' G84.1'
ELSE
SeqLabC PlaneC Cycle
END
END
END
END
END
StrtPos
IF Backbore?
' Z' ADD# Zdepth# ClearancePlane2#
ELSE
' Z' Sub# Add# ClearancePlane2# Zdepth# CalcZSurf# { Z = tip depth - Top Surface}
END
IF Backbore?
' R' ClearancePlane2#
ELSE
IF AbsValue?
' R' CalcZSurf#
ELSE
SetAbs
' R' CalcZSurf#
SetInc
END
END
CMI_Wvalue
IF FIStopOffWallRO?
' U' MUL# Num#('-1.0') ABS# Retract# 'V0J0'
END
IF BackBore?
FORMAT(Recall#,4)
Save# Num#('3') DIV# ToolDiameter# Num#('2.0') {Tool Radius}
Save# Num#('4') DIV# ShankDiam# Num#('2.0') {Shank Radius}
Save# Num#('5') ADD# ShankDiam# SUB# Recall# Num#('3') Recall# Num#('4') {Width}
Save# Num#('6') MUL# Num#('-1.0') ABS# SUB# DIV# Recall# Num#('5') Num#('2.0') Recall# Num#('4') {U}

' I' SUB# ClearancePlane2# CalcZSurf# ' K' FluteLen# ' U' Recall# Num#('6') ' V0 J0'
FORMAT(Recall#,5)
END
IF FIRIFIRO?
' I' Peck# ' K' Retract#
END
IF Peck?
IF NotEqual? Peck# Num#('0')
' K' ABS# Peck#
END
END
GetIndex FeedEnt
IF Peck?
IF PeckFullRetract?
IF GreaterThan? Peck# Num#('0')
' J13'
ELSE
' J3'
END
ELSE {Chip Break}
IF GreaterThan? Peck# Num#('0')
IF GTEqual? Retract# Num#('0')
' J11'
ELSE
' J12'
END
ELSE
IF GTEqual? Retract# Num#('0')
' J1'
ELSE
' J2'
END
END
END
ELSE
{
IF Tap? AND OptCyc1?
'J1'
END
}
END
EOL

IF CallMasterOp?
SeqLabC '(CLS,' CallMasterNum# ')' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLabC '(CLS,' Program# ')' EOL
StartSub
ToolPath
SeqLabC '(ENS)' EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLabC Rapid ZCP3C EOL
IF Repeats?
FinishSubG92
END
END
END
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3}
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2}
UseSeparateSubCalls
SetMaxSeparateSubCalls('500')
SetMaxRPM('10000')
SetMaxFeed('500')

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

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

NotSameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
SeqLabC CSWFO EOL
END
ELSE
IF NeedWFO1?
' H' NewWFO#
END
END
RETURN

SameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
SeqLabC CSWFO EOL
END
END
RETURN

InitOp:
'(PGM, '

IF ProgramComment?
'NAME="' ProgramComment$ '",'
ELSE
'NAME="' PartName$ '",'
END

IF GTEqual? Program# Num#('0')
' ID="' Program# '",'
END
' TYPE="A2100_274" )'
EOL

IF ToolChangeAtHome?
SetHome
END

IF Metric?
':G17 G71 G90' EOL
ELSE
':G17 G70 G90' EOL
END
IF UseComments?
'(MSG, PART: ' PartName$ ' )' EOL

IF ProgramNameComment?
'(MSG, PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'(MSG, ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
IF Metric?
'(MSG, OUTPUT IN ' MoveType$ ' MM )' EOL
ELSE
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
RETURN

ColonBlock:
SetAbs
IF Metric?
':?' Plane ' G71 G90' Rapid FeedEnt
ELSE
':?' Plane ' G70 G90' Rapid FeedEnt
END
SetFlag('3')
RETURN

CoolantOn:
IF AbsoluteMoves?
SeqLabC DoCoolOn EOL
ELSE
SeqLabC AbsOrInc DoCoolOn EOL
END
RETURN

FirstOp1:
DoOpComments
':?' Plane ' G70' AbsOrInc Rapid { Inch }
FORMAT(ADD#,7)
' T' Tool# ToolChng EOL
FORMAT(ADD#,4)
RETURN

FirstOp2:
RETURN

FirstOp3:
CheckPass
SeqLabC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

FirstOp3a: {can't XY position before WFO}
CheckPass
SeqLabC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

FirstOp3b:
CheckPass
SeqLabC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn NotSameToolWFO CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

NewToolOp1:
{ SeqLabC CoolOff EOL }
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
DoOpComments
':?' Plane ' G70' AbsOrInc Rapid { Inch }
FORMAT(ADD#,7)
' T' Tool# ToolChng EOL
FORMAT(ADD#,4)
RETURN

NewToolOp4:
RETURN

NewToolOp5:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

NewToolOp5a:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

NewToolOp5b:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn NotSameToolWFO CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLabC SpinOff EOL
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset? OR ChangeCS?
{ ??? due full up here ??? }
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
':?' Plane ' G70' AbsOrInc Rapid { Inch }
FORMAT(ADD#,7)
' T' Tool# ToolChng EOL
FORMAT(ADD#,4)
CheckPass
RETURN

SameToolOp3: {Start new Operation}
SeqLabC PlaneC Rapid StrtPos GetIndex ToolCRCOfst Speed CheckSpinOn NotSameToolWFO CMIPreTool EOL
SeqLabC DoCoolOn EOL
DoPostScript

{ Old way of handling the SameToolOp3 routine
IF LAST ProgStop?
SeqLabC PlaneC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst Speed CheckSpinOn EOL
SeqLabC DoCoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqLabC PlaneC Rapid StrtPos ZCP1 GetIndex ToolCRCOfst SpeedC EOL
ELSE
SeqLabC PlaneC Rapid StrtPos GetIndex ToolCRCOfst SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC DoCoolOn EOL
END
END
}
RETURN

End1:
RETURN

End2:
DoLastEndOpPS
IF FIRST ToolChangeAtHome?
SeqLabC AbsOrInc Rapid FirstHome EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN

End3:
SeqLabC ' M26 M2' EOL { End of Program }
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
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
END
{ EOR EOL }
Close
ReTag
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
OpenMP
NewWFO
EachWFO {simple eachPart, ***start loop}
SeqLabC SetWFO EOL
IncWFO
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
IF LastOP?
End1 {End of program}
End2
CloseMP
NextWFO {simple NextPart**** end loop}
SeqLabC WFO1 EOL
END
NextOp {loops back to EachOP until last Operation}
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
OpenMP
NewWFO
EachWFO {simple eachPart, ***start loop}
SeqLabC SetWFO EOL
IncWFO
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NextWFO {simple NextPart**** end loop}
SeqLabC WFO1 EOL
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
OpenMP
NewWFO
EachWFO {simple eachPart, ***start loop}
SeqLabC SetWFO EOL
IncWFO
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
IF LastOP?
End1 {End of program}
CloseMP
NextWFO {simple NextPart**** end loop}
SeqLabC WFO1 EOL
END
NextOp {loops back to EachOP until last Operation}
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3a
OpenMP
NewWFO
EachWFO {simple eachPart, ***start loop}
SeqLabC SetWFO EOL
IncWFO
SeqLabC StrtPos EOL
ELSE
IF NewTool?
CloseMP
NextWFO {simple NextPart**** end loop}
SeqLabC WFO1 EOL
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5a
OpenMP
NewWFO
EachWFO {simple eachPart, ***start loop}
SeqLabC SetWFO EOL
IncWFO
SeqLabC StrtPos EOL
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
IF LastOP?
CloseMP
NextWFO {simple NextPart**** end loop}
SeqLabC WFO1 EOL
END
NextOp {loops back to EachOP until last Operation}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3b
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5b
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolWFO
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}

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


Wyszukiwarka

Podobne podstrony:
Cin Acr 900V2 [KM] MT25 89
Cin Acr A8D 7VT1000 MY96 89
Cin Acr 850SX [WI] M598 89
Cin Acr 900 [CKC] M818 89
Cin Acr 850MC (AMP) M692 89
Cin Acr 900 [MS] MZ14 89
Cin Acr 850MC MC M311 89
Cin Big Blue [OI] M994 89
Cin Acr 850MC M196 89
Cin 5H 2500 Acr 8D PMW MV67 89
Cin Mil Arrow Gen CT C673 12 1
Fanuc 0MC Cin Sabre M978 89
Cin Mil Arrow M673 12 2
Cin Mil Arrow CT [MA] M990 12 1
Fanuc 0MC Cin Sabre M978 89 1m

więcej podobnych podstron