{Change Comments ***********************************************************} {9/27/89, added PostScript to: Okuma OSP5000M-G M101.51, JR} {3/29/90, Updated: Okuma OSP5000M-G M101.61 to .70.3 format, JR} {7/5/90, Updated: Okuma OSP5000M-G M101.70.3 to .72.1 format, JR} {7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB} {12/19/90 Copied & modified: Okuma 5000M-G M101.73 For: Gibbs & Associates Machine: Okuma Control: 5000M-G Updated to Version 3.2 per Fanuc 6M M001.76.1 Format. DWB} {12/19/90 Copied & modified: Okuma 5000M-G M101.76.1 For: IOmega Machine: Okuma MC4VAE Control: 5020 Modified SetMaxRPM('10000') to be SetMaxRPM('6000') at beginning. Changed comment to inform that First tool is not in spindle. Added OpToolID and ToolChng to first operation. Added command to load dummy tool #50 at end of prog. Changed IF LastTool? Boolean at end of prog to ToolChng. DWB} {4/03/91 Modified: Okuma OSP 5020M M374.76.1 For: Gibbs & Associates Updated to Version 4.0 per Fanuc 6M M001.80 Format. DWB} { Format: Okuma OSP 5020M C374.00 1/19/95 Converted to C Style post per C001.00.05 TH} { Added ClearCSOffset to SubCSMP TH} {8/23/95 - Updated to .10 format TH} {1/17/96, Updated .10 to .11 version, MPK} {3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK} {Prog Numeric Format Definitions *******************************************} #1 = '#.00' #2 = '###.###;0.' #3 = '*###.###;0.' #4 = '####.####;0.' #5 = '########;0' #6 = '####^###;' #7 = '###0' #8 = '*#####.##;0.' FORMAT(FileFeet#,1) FORMAT(FileMeters#,1) FORMAT(ToolDiameter#,4) {.72} FORMAT(Operation#,5) {.72} FORMAT(Tool#,5) {.72} FORMAT(NewWFO#,5) {.72} FORMAT(CallMasterNum#,5) FORMAT(Dwell#,6) {.72} FORMAT(Program#,7) {.72} FORMAT(Parts#,7) {.72} FORMAT(Repeats#,7) {.72} FORMAT(CSOffsetX#,4) FORMAT(CSOffsetY#,4) FORMAT(CSOffsetZ#,4) FORMAT(CSOffsetA#,8) FORMAT(CSOffsetB#,8) FORMAT(TrackZNO#,4) FORMAT(ADD#,5) FORMAT(CS#,5) {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: ' Program# ' )' 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: ' G15 H' ADD# CS# SUB# NewWFO# Num#('1') RETURN CalcCSWFO: {(iPart-1)*NumOfCS#)} ' G15 H' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1') RETURN CSAngleA: IF AAxisAvail? 'A' 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 PSInit: 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 FeedEnt EOL ELSE SeqC RapidC ZIn EOL END RETURN StartSub: OpenSub SubID 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 ' CALL O' Program# ' Q' Repeats# EOL StartSub RETURN FinishSub1: {part 1} SeqC CRCOffC IF NOT FeedConnect? RapidC ZCP3C END EOL RETURN FinishSubG92: {part 2} SeqC Preset ShiftRC EOL 'RTS' EOL CloseSub SeqC Preset UnshftRC EOL RETURN ToggleIncDecWFO: IF Flag?('3') SetFlagF('3') ELSE SetFlag('3') END RETURN OpenMP: IF WFOCS? NewProg StartSub SaveCSProg SaveCSOpStart ClearCSOffset ELSE NewProg IF WorkFixtureOffsets? NewWFO EachWFO SeqC ' G15' SetWFO EOL SeqC ' CALL O' Program# EOL IncWFO NextWFO ELSE SeqC ' CALL O' Program# ' Q' Parts# EOL END StartSub END RETURN CloseMP: IF WFOCS? SeqC EndSub EOL CloseSub IF Flag?('3') NewWFO EachWFO {simple eachPart} EachCSOp DoCSWFOComment ClearCSOffset SeqC CalcCSWFO EOL SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL NextCSOp ClearCSOffset IncWFO NextWFO {simple NextPart} ELSE LastWFO EachWFO {simple eachPart} EachCSOp DoCSWFOComment ClearCSOffset SeqC CalcCSWFO EOL SeqC SubCall CallLabB CSSubID# RepLab OnePart EOL NextCSOp ClearCSOffset DecWFO NextPrevWFO {simple NextPart} END IF Flag?('4') ToggleIncDecWFO END ELSE IF WorkFixtureOffsets? 'RTS' EOL CloseSub SeqC ' G15' WFO1 EOL ELSE SeqC Preset ShiftPC EOL 'RTS' EOL 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 XMove? OR YMove? { Approach Length Feature and Multiple Pockets } IF NOT ZMove? CRCOnC IF NOT EmptyLine? ResetCRCNum END END END IF LastFeat? AND EmptyLine? { Exit Length Feature } CRCOffC END RETURN StdLine: {enables CRC on first call, .70} IF Decelerate? IF RoomToDecel? DecelMove1 SeqC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL DecelMove2 END SeqC DoAbsOrInc CkCRC FeedC MoveXYZC DecelFeed CRCOffsetC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqC DoAbsOrInc CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL END END RETURN ToolPath: EACHFeat IF PointFeat? SeqC MoveSXYC EOL IF AutoCycle? SeqC ' CALL O' Program# EOL CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY} ELSE SeqC DoDrillAbsOrInc MoveSXYZC EOL END ELSE IF RapidFeat? IF LastFeat? AND AutoCycle? {.70} SeqC DoAbsOrInc CRCOffC RapidC MoveXYZC EOL ELSE IF XMove? OR YMove? OR ZMove? SeqC DoAbsOrInc 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 FeedRateC EOL ELSE StdLine {enables CRC on first call} END END ELSE StdLine END ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop } IF LastQuadrant? AND Decelerate? IF RoomToDecel? DecelMove1 SeqC FormatArc ArcFeedC EOL DecelMove2 END SeqC FormatArc DecelFeed EOL ELSE SeqC 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 Seq IncValue EOL RETURN AutoCycCutSub2: {part 2} ToolPath IF Repeats? AND FeedConnect? AND ZshiftOnly? SeqC AbsOrInc EOL {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath} ELSE SeqC AbsOrInc RapidC ZCP2 EOL {.71.2 removed CRCOffC, gets turned off in ToolPath} END 'RTS' 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 SeqC AbsOrInc Connect StrtPos EOL Milling FinishSub1 FinishSubG92 RETURN ZonlyRepAutoCycle: AutoCycPat {write pattern moves and main calls} StartSub NewProg 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...
kmex