{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=F
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}
{Change Comments ***********************************************************}
{7/28/97,
Initial: Servo II [DE] M108.89
Created: Servo II [DTI] MXXX.89
For: Diversified Technologies Inc.
Added literal 'M00' and 'M25' to FirstOp for first Tool Change, {M25 is a full quill retract}
Added a literal 'M25' to just before move to Home in NewTool and end of Program,
eliminated IF NewToolOffset? case in SameTool, added literal 'M25' to all SameToolcases,
MPK}
{7/30/97,
Initial: Servo II [DTI] MX63.89
Created: Servo II [DTI] MX63.89.1
For: Diversified Technologies Inc.
Added tool calls to FirstOp and NewTool,
Added tool cancel (literal 'T0' to NewTool and end of program,
MPK}
{10/29/97,
Initial Post: Servo II [DTI] MX63.89.1
Created: Servo II [IMM] MW38.89
Customer: Island Mould & Machine Co
Changes to "Prog":
1. Removed M25 and M00 from tape start.
2. Removed all T0 output.
3. Added Coolant On/Off logic
JHE}
{11/14/97
Initial: Servo II [IMM] MW38.89
Created: Servo II [IMM] MW38.89.1
For: Island Mould
Comments: Modified SameTool to only output 'M25' when Optional stop is true,
when OptionalStops? is true, at SameTool will output:
M9
M25
M00
M8
*****WARNING THIS IS NOT STANDARD PROGRAM STOP PROCEDURE FOR SAMETOOL****
MPK
}
{11Nov98
Original: Servo II [IMM] MW38.89.1
Created: Servo II [IMM] MW38.89.2
For: Island Mould & Mach. Co.
Changes made per: Tom Weismail
Added Post Header Comment at the top of Prog.
Deleted old version numbers and comments e.g. {.62}, {commands}, {literals}, etc
Deleted 'M25' in SameTool at IF OptionalStops?
Charles Winston}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0'
#3 = '*###.###;0'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '###.##;0.'
#7 = '####.##;0.'
#8 = '00'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ZDepth#,4)
FORMAT(CalcZSurf#,4)
FORMAT(CalcZFmSurf#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Dwell#,6)
FORMAT(MUL#,7)
FORMAT(FeedEntry#,7)
FORMAT(Tag#,8)
FORMAT(CallMasterNum#,8)
FORMAT(Repeats#,8)
FORMAT(Parts#,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
PSInit:
NewWFOF
RotateF
MasterOpF
CallMasterOpF
RETURN
PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC 'C' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC 'C' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF
END
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
CloseSub
SeqC Preset UnshftRC EOL
RETURN
OpenMP:
TagInc
IF WorkFixtureOffsets?
'This processor does not support Multiple Parts with Work Fixture Offsets' EOL
ELSE
SeqC 'P' Tag# Parts# EOL
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets?
'This processor does not support Multiple Parts with Work Fixture Offsets' EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC 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?
SeqC AbsValue EOL
END
RETURN
FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
CkCRC:
IF LastFeat? { Exit Length Feature }
CRCOffC
ELSE
IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets }
CRCOnC
END
END
RETURN
StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqC DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC EOL
END
END
RETURN
DoDrillCycle:
SeqC
IF FIFO? AND Dwell?
'G89'
ELSE
Cycle
END
RLevel 'T' CalcZSurf# 'D' CalcZFmSurf# Dwell Peck
IF PeckChipBreaker?
'P' Retract#
END
EOL
RETURN
DoCycle:
IF Tap?
IF RetractToCP1? AND NotEqual? ClearancePlane1# ClearancePlane2#
SeqC ZCP2 EOL
END
SeqC Feed 'Z' ZDepth# EOL
IF Dwell?
SeqC 'G4F' Dwell# EOL
END
SeqC ZCP2 EOL
IF RetractToCP1? AND NotEqual? ClearancePlane1# ClearancePlane2#
SeqC Rapid ZCP1 EOL
END
ELSE
DoDrillCycle
IF AbsoluteMoves?
SeqC IncValue 'X0.Y0.' EOL { execute cycle with incremental move of zero }
SeqC AbsValue DrillOff ZCP1 EOL { retract to CP1 }
ELSE
SeqC 'X0.Y0.' EOL { execute cycle with incremental move of zero }
SeqC DrillOff ZCP1 EOL { retract to CP1 }
END
END
RETURN
DrillPath:
EachFeat
IF FirstFeat?
SeqC MoveSXYC EOL
IF LastFeat?
DoCycle
ELSE { there is more than 1 hole so put the cycle in a sub! }
TagInc
SeqC 'P' Tag# '01' EOL
StartSub
DoCycle
SeqC EndSub EOL
CloseSub
END
ELSE
SeqC Rapid MoveSXYC EOL
SeqC 'P' Tag# '01' EOL
END
NextFeat
RETURN
ToolPath:
ResetCRCNum
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
END
ELSE
IF RapidFeat?
IF AutoCycle?
IF LastFeat?
CRCOffC {.70}
END
SeqC RapidC MoveXYZC EOL
ELSE
IF ZMove? AND NOT XMove? AND NOT YMove?
CRCOffC {.82}
END
IF XMove? OR YMove? OR ZMove?
SeqC RapidC MoveXYZC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC DoAbsOrInc CRCOffC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC DoAbsOrInc FeedC MoveXYZC EOL
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
SeqC FormatArc ArcFeedC EOL
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN
WFOStuff:
{IF NewWFO?
SeqC 'T' NewWFO# EOL
END}
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?
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?
TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
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
TagInc
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Feed IncValue StrtPosC EOL
SeqC AbsOrInc
ELSE
SeqC Feed
END
ELSE
SeqC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqC AbsOrInc ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqC Rapid ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
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
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
END
IF FeedConnect?
SeqC FeedC ZInPlusInc EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL
END
SeqC Feed ZInPlusInc EOL
ELSE
SeqC RapidC ZInPlusInc EOL
END
END
SeqC 'P' Tag# '01' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
WFOStuff
CheckPass
RETURN
SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN
SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
TagInit
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2}
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 + C move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - C 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 FirstOperation?
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
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
DoOpComments
DoPostScript
{SeqC 'M25' EOL} {Full Quill Retract} {Removed these 2 blocks - JHE}
{SeqC 'M00' EOL}
WFOStuff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC OpToolID EOL
SeqC Plane AbsOrInc Rapid StrtPos EOL
SeqC CoolOn EOL {Added - JHE}
SeqC ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
{SeqC 'T0' EOL} {Removed this line - JHE}
SeqC CoolOff EOL {Added - JHE}
SeqC RapidC EOL
SeqC 'M25' EOL {Full Quill Retract}
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqC RapidC Home EOL
END
{Start new Operation}
SeqC 'M00' EOL { Manual ToolChng }
DoOpComments
DoPostScript
WFOStuff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
SeqC OpToolID EOL
CheckPass
SeqC Plane AbsOrInc Rapid StrtPos EOL
SeqC CoolOn EOL
SeqC ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC AbsOrInc Rapid StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC CoolOff EOL
SeqC 'M25' EOL
SeqC 'M00' EOL
{Start new Operation}
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
SeqC CoolOn EOL
SeqC ZCP1 EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
ELSE
IF OptionalStops?
SeqC CoolOff EOL
END
END
IF OptionalStops?
{ SeqC 'M25' EOL }
SeqC 'M00' EOL
END
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StrtPos EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqC CoolOn EOL
ELSE
IF OptionalStops?
SeqC CoolOn EOL
END
END
END
END
END {common point for all operations}
{output all feed rates}
SeqC 'E' FeedEntry#
IF Milling?
FeedRate
END
EOL
IF Milling?
SeqC ZCP2C EOL
IF Repeats?
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') {std sep sub Zreps are in effect} {rep change 2}
ZonlyRep {rep change 1}
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3}
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?
IF Repeats?
TagInc
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC DrillCP EOL
GetCycle
IF Tap? OR RetractToCP1?
DrillPath
ELSE
DoDrillCycle
IF CallMasterOp?
SeqC 'P' CallMasterNum# '01' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterTag
SeqC 'P' Tag# '01' EOL
StartSub
SeqC StrtPos EOL
ToolPath
SeqC EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
SeqC StrtPos EOL
ToolPath
END
END
SetDrillEndOpZ
SeqC Rapid 'G80' ZCP3 EOL
END
IF Repeats?
FinishSubG92
END
SeqC 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
{SeqC 'T0' EOL} {Removed this line - JHE}
SeqC CoolOff EOL {Added - JHE}
SeqC RapidC EOL
SeqC 'M25' EOL {Full Quill Retract}
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqC Rapid FirstHome EOL
END
IF ProgStop?
SeqC 'M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
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
Wyszukiwarka
Podobne podstrony:
Servo II [DE] M108 89Servo II [BI] M845 89Servo II [DTI] MX63 89 2Servo II [CI] MX30 89 1II CR 419 89Servo II Acra [WE] BQ34 16 1Servo II M693 87Servo II [TMC] D946 12 2Mazatrol M32A [IMM] MW39 89 2Servo II Acra [WE] BQ34 16 1mch stawow o podl imm cz IIServo 7501 MZ32 89 1Anilam Crusader II G&C M995 89BP Boss 6 Series II M289 89 1więcej podobnych podstron