plik


{Change Comments ***********************************************************} {8/29/91 Copied & modified: Fanuc 0T MS (+G30) L212.82 For: Superior Screw Products Machine: Mori Seiki Control: Fanuc 0T Control Modifications made per conversations with Geoffrey Gens @ Superior Screw Products and sample printout. Machine has a Sub Spindle for machining backside of part. Sub Spindle is advanced towards Main Spindle using 'B' axis for positioning. Turret has 10 Tool Stations on Main Spindle Side, and 10 Tool Stations on Sub Spindle Side. If User has selected Tools #11-20, Post Processor will subtract 10 from Tool# for OpToolID. IF FirstOperation? AND Drilling? = TRUE, then Post Processor assumes User has requested a Bar Feeder Type Operation. Flag('1') will be turned on, and special output will occur. Post Processor will fall through to NextOp. IF NewTool? uses same Tool as FirstOperation, and Drilling? = TRUE, Post Processor will assume User has requested an additional Bar Feeder Operation, and will output same as FirstOperation. IF User has selected Tool#('17'), Post Processor will shift into Sub Spindle Mode. Flag('2') will be turned on. Post Processor will not output anything for this Operation. User must select a Drilling Operation. Only values required for Sub Spindle Positions are ClearancePlane3# and ZDepth#. Next Operation, User must select Tool#('7'), and program a standard Part Off routine. Flag('2') will be turned off and Flag('3') will be turned on, and NegateZ and ReverseXZArcs will then be in effect. While SpinOff, following sequence of events will be output: Part Off Tool will move to XCP ZCP, and then to ZSPC. Sub Chuck will open, and then Sub Spindle will be advanced to 'B' LAST ClearancePlane3#. Sub Spindle Air will turn on to blow any chips out, and then Sub Spindle will move to LAST ZDepth# at SETLASTOP FeedRate. Sub Chuck will close, and Sub Spindle Air will be turned off. Coolant will be turned on and Synchronous Operation will be turned on. Main Spindle and Sub Spindle will then simultaneously revolve in same direction. Balance of Part Off operation will occur. Sub Spindle will retract to 1st Zero Position, before Turret returns to ToolChng Position. All Operations from this point on will machine part held in Sub Spindle. After Final Operation is completed, Sub Spindle will move to 2nd Zero Position, both Spindles will be turned off, Parts Catcher will advance, Sub Spindle will Open, Sub Spindle Air will be turned on to blow part into Parts Catcher, Air will be turned off, and Parts Catcher will retract. Subroutines added deal with SUBtracting 10 from Tool# on Sub Spindle Side of Turret, and Sub Spindle SpinOn, InverseSpinOn and SpinOff. DWB} {11/1/91 Modified: Fanuc 0T MS L233.82 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products and sample printout. Added logic at NewTool to handle SameTool Situation when User sandwiches the SubSpindle Operation between two Operations that use Tool# 7. Added DoSubSpindleOpComments sub in Prog. Deleted CoolOff from NewTool and end of Prog. 'G28' automatically causes CoolOff. DWB} {11/26/91 Modified: Fanuc 0T MS L233.82.1 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products and sample printouts. Added FORMAT#7 = '*###.####;0.' for Recall# . Added FORMAT#8 = '±####.####' for ZStockMin# Warning. Warning will alert User IF NotEqual? ZStockMin# Num#('0') Added CoolOff to line following SpinOff when Activating Sub Spindle IF LAST NOT CoolOff = TRUE. Added SpinOff, SubSpinOff, and CoolOff when returning Sub Spindle to 'B' Axis Home. Added CalcBAxis Sub with Formulas to Calculate 'B' Axis Moves to Face of Part and Grab Dimension. Save# Num#('1') = Length of Part. Save# Num#('2') = Distance from 'B' Axis Home to Face of Part. Replaced LAST ClearancePlane3# with Var#('2'). Save# Num#('3') = Grab Dimension of Part. Save# Num#('4') = Distance from 'B' Axis Home to Grab Dimension. Replaced LAST ZDepth# with Var#('4'). Deleted SetStatusOff/SetStatusOn condition. Deleted SpinOff at end of Prog when Sub Spindle is active. Added CoolOff for Sub Spindle at end of Prog. Moved 'M252' { Sub Spindle Air Blow 2 On } line to before 'M211' { Sub Chuck Unclamp } line at end of Prog. DWB} {11/27/91 Modified: Fanuc 0T MS L233.82.2 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products and sample printouts. Changed FORMAT for Recall# from '*###.####;0.' to '###.####;0.'. Deleted FORMAT#8 for ZStockMin# Warning. Deleted FORMATting of ZDepth#. Modified Formulas to Calculate 'B' Axis Moves to Face of Stock and Grab Dimension. Save# Num#('1') = Length of Stock Save# Num#('2') = Stock to Z0 Save# Num#('3') = Length of Part Save# Num#('4') = Grab Dimension Save# Num#('5') = B Axis Home Position Save# Num#('6') = Distance to Face of Stock Save# Num#('7') = Distance to Face of Part Save# Num#('8') = Distance to Grab Dimension Deleted ZStockMin# Warning from CalcBAxis Sub Forcing CoolOff on line following SpinOff when Activating Sub Spindle regardless of IF LAST NOT CoolOff? Deleted IF ProgStop? Output from end of Prog. DWB} {12/2/91 Modified: Fanuc 0T MS L233.82.3 For: Superior Screw Products Modification made per sample printouts. Corrected minor error in 'B' Axis Formula for Grab Dimension. DWB} {3/18/92 Modified: Fanuc 0T MS L233.82.4 For: Superior Screw Products Modification made per Geoffrey Gens @ Superior Screw. Changed all occurances of Tool#('17') to Tool#('11'). Changed all occurances of Tool#('7') to Tool#('1'). Geoffrey said that they are now using these index positions for transfer to the Pick-Off Spindle. Added 'M80' to check to see if the part was cut-off prior to the 'G30H0.00' and 'G28H0.0M36', which tells the sub-spindle to go home. Moved the 'M35' to before the 'M211'. Moved the 'G96' SpinOn GetSpinOn to after the 'M252'. Moved the 'G99' to after the CoolOn. KM} {4/13/92 Modified: Fanuc 0T MS L233.82.5 For: Superior Screw Products Updated to Version 4.0 per Fanuc 0T/3T Miyano L008.82.1 Format. Commented out the 'M80' at the beginning and at the end of the prog. They only need this for the Part-Off Operation. Changed the value of the B-Axis Home Position ( CalcBAxis Subroutine Variable Num#('5') ) from '11.406' to'11.386'. KM} {4/22/92 Modified: Fanuc 0T MS L233.82.6 For: Superior Screw Products Modification made per Geoffrey Gens @ Superior Screw. Added RestoreScale Sub per 4-Axis Post Processor. Added Move to XCP at NewTool IF LAST Drilling? = TRUE, and end of Prog IF Drilling? = TRUE. Tool sometimes jumps back towards part without this. DWB} {4/27/92 Modified: Fanuc 0T MS L233.82.7 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products and sample printout. Changed FORMAT#7 to FORMAT#20. FORMAT for 'B' Axis FormulaReport Sub caused RapidF# to output bad stuff. Changed IF LAST NOT ConstantSurfaceFeed? to IF LAST ConstantSurfaceFeed? in CheckOffset sub. Added FORMAT for SPX# and SPZ# for Canned RoughContour Cycle, and deleted second axis move. Created DoBarFeed Sub to handle that at FirstOperation and NewTool. Replaced Canned Threading Cycles with L001 type. Changed FORMAT for ToolAngle from '####^####;0.' to '####.####;0.' in Form. DWB} {5/11/92 Modified: Fanuc 0T MS L233.82.7.1 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Changed the value of the B-Axis Home Position ( CalcBAxis Subroutine Variable Num#('5') ) from '11.386' to'11.416'. DWB} {5/13/92 Modified: Fanuc 0T MS L233.82.7.2 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Changed FORMAT for Address A Threading Tole Nose Angle from ####.####;0. to #0 DWB} {7/20/92 Modified: Fanuc 0T MS L233.82.7.3 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Customer requested '/' { Block Delete } in front of all comments because control pauses at each comment during running of job. Added SetLineStrtChr('/') and SetLineStrtChr('') at all comment output. Customer requested suppression of blocks that contain only G00 { Rapid }. Deleted Rapid command at Approach sub { 3 places }. Added Flags(5) and (6) to output Rapid when needed. Added CheckXRapid, CheckZRapid, CheckXZRapid, LoadXCPC, LoadZCPC, LoadOpClr, LoadCycSt and LoadOpExitClr sub to accomplish this. Deleted CheckRapid call at NewTool and SameTool as this is now handled in new subs. Corrected bug at IF AutoFinish? for manual output. Missing END command. Customer requested support for Hex Aligner. M19M219 are codes that align the Main and Sub Spindles so that hex-shaped stock can be transfered between them. Geoffrey said that they need this about 50% of the time, and that we use the Coolant Checkbox in the General Info dialog. Added Flag(7) at NewTool. DWB} {10/14/92 Modified: Fanuc 0T MS L233.82.7.4 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Updated to most recent version of Numbers Lathe L001.82. Corrected error causing Tool to Rapid past spindle centerline. DWB} {3/12/93 Modified: Fanuc 0T MS L233.82.7.5 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Updated to most recent version of Numbers Lathe L001.82 again. Corrected additional error causing Tool to Rapid past spindle centerline. NOTE: LoadFeat command does not round to four decimal places. Example: LoadFeat Num#('0') Num#('.51868') causes MoveXC to output X.5186. Nothing should have been output because current position was X.5187. The customer was performing a StraightConnect. He does this to break up contour for variable FeedRates. See Operation#8 of sample program B-215SS. DWB} {7/17/93 Modified: Fanuc 0T MS L233.82.7.6 For: Superior Screw Products Modifications made per conversations with Geoffrey Gens @ Superior Screw Products. Updated to most recent version of Numbers Lathe L001.82 again. Corrected rounding error noted on 3/12/93. Problem was resolved when I added FORMAT(Recall#,8) '###.#######;0'. Loading a value 7 places will cause a 6 place decimal to round correctly. In the past I was loading a 4 place decimal. .55555 loaded as .5555. Loading this as .5555555 will output as .5556. Deleted Report and DoReport subs and calls to same. Deleted Flag(1), approach Flag. Using Var(9) to store 1=OD, 2=ID and 3=Face. Decremented Flags(2-9) by one. DWB} {12/7/95, L233.82.7.7, Updated for Catalyst v2.20 per Fanuc 10T MS [-] L001.85.02 Format, DWB} {Prog Numeric Format Definitions *******************************************} #1 = '#.00' #2 = '###.####;0.' #3 = '#######0' #4 = '###^##0' #5 = '#.######;0.' #6 = '00' #7 = '#' #8 = '###.#######;0' #9 = '±#bbbb.bbbb#' { For 'B' Axis FormulaReport Sub } FORMAT(FileFeet#,1) FORMAT(FileMeters#,1) FORMAT(MUL#,2) { Non-Canned Threading AutoFinish } FORMAT(InFeedAngle#,2) FORMAT(FirstMoveEPZ#,2) FORMAT(Program#,3) {.72} FORMAT(Operation#,3) {.72} FORMAT(Tool#,3) {.72} FORMAT(Dwell#,4) {.72} FORMAT(FeedIPR#,5) FORMAT(SUB#,6) FORMAT(RapidF#,7) FORMAT(Recall#,8) {Added Subroutines *********************************************************} FormulaReport: FORMAT(ZStockMax#,9) FORMAT(ZStockMin#,9) FORMAT(CalcZSurf#,9) FORMAT(ZDepth#,9) FORMAT(Recall#,9) SetStatusOff ' ' EOL ' Z Stock Maximum = ' ZStockMax# EOL ' Z Stock Minimum = ' ZStockMin# EOL ' Length of Stock = ' Recall# Num#('11') EOL ' Z Surface = ' CalcZSurf# EOL ' Stock to Z0 = ' Recall# Num#('12') EOL ' Length of Part = ' Recall# Num#('13') EOL ' Z Depth = ' ZDepth# EOL ' Grab Dimension = ' Recall# Num#('14') EOL ' B Axis Home Position = ' Recall# Num#('15') EOL ' Distance to Face of Stock = ' Recall# Num#('16') EOL ' Distance to Face of Part = ' Recall# Num#('17') EOL ' Distance to Grab Dimension = ' Recall# Num#('18') EOL ' ' EOL SetStatusOn FORMAT(Recall#,8) RETURN GetTT: SetStatusOff StockOff Save# Num#('2') SUB# SetTTOff CycleStartX# SetTTOk CycleStartX# Save# Num#('1') SUB# SetTTOff CycleStartZ# SetTTOk CycleStartZ# IF Flag?('8') { Sub Spindle Mode } Save# Num#('1') MUL# Recall# Num#('1') Num#('-1') END SetStatusOn RETURN GetExit: SetStatusOff IF ApproachFace? Save# Num#('7') ClearancePlane3# { ZEOpCP } Save# Num#('9') Num#('3') ELSE IF Flag?('8') { Sub Spindle Mode } Save# Num#('7') MUL# ClearancePlane3# Num#('-2') { XEOpCD PosSideLathe NegateZ } ELSE Save# Num#('7') MUL# ClearancePlane3# Num#('2') { XEOpCD PosSideLathe } END Save# Num#('8') SUB# Recall# Num#('7') Recall# Num#('2') { XsAreRadiiF NewTool } IF ApproachOD? Save# Num#('9') Num#('1') ELSE { ApproachID } Save# Num#('9') Num#('2') END END SetStatusOn RETURN GetX: Save# Num#('6') DIV# Recall# Num#('4') Num#('2') { PosSideLathe } RETURN GetZ: Save# Num#('5') Recall# Num#('3') IF Flag?('8') { Sub Spindle Mode } Save# Num#('5') MUL# Recall# Num#('5') Num#('-1') END RETURN GetXTT: Save# Num#('6') DIV# ADD# Recall# Num#('4') Recall# Num#('2') Num#('2') { XsAreRadiiF PosSideLathe } RETURN GetZTT: IF Flag?('8') { Sub Spindle Mode } Save# Num#('5') SUB# Recall# Num#('3') Recall# Num#('1') Save# Num#('5') MUL# Recall# Num#('5') Num#('-1') ELSE Save# Num#('5') ADD# Recall# Num#('3') Recall# Num#('1') END RETURN DoLoad: Save# Num#('5') DIV# Recall# Num#('5') Recall# Num#('10') { ZScale } Save# Num#('6') DIV# Recall# Num#('6') Recall# Num#('10') { XScale } SetTTOff LoadFeat Recall# Num#('5') Recall# Num#('6') SetTTOk RETURN LoadX: GetX DoLoad RETURN LoadZ: GetZ DoLoad RETURN LoadXZ: GetX GetZ DoLoad RETURN LoadXTT: GetXTT DoLoad RETURN LoadZTT: GetZTT DoLoad RETURN LoadXTTZ: GetXTT GetZ DoLoad RETURN LoadXZTT: GetX GetZTT DoLoad RETURN LoadXTTZTT: GetXTT GetZTT DoLoad RETURN {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 DoSubSpindleOpComments: IF UseComments? SetLineStrtChr('/') SetScale('1') IF OperationIDComment? '( OPERATION ' Operation# ': Sub Spindle )' EOL END IF OperationComment? '( ' OperationComment$ ' )' EOL END IF ToolTypeComment? '( TOOL ' Tool# ': Collet Size = )' EOL END IF ToolComment? '( ' ToolComment$ ' )' EOL END RestoreScale SetLineStrtChr('') END RETURN DoOpComments: IF UseComments? SetLineStrtChr('/') SetScale('1') IF OperationIDComment? '( OPERATION ' Operation# ': ' OperationType$ ' )' EOL END IF OperationComment? '( ' OperationComment$ ' )' EOL END IF WorkGroupComment? '( ' WorkGroupComment$ ' )' EOL END IF ToolTypeComment? '( TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ' )' EOL END IF ToolComment? '( ' ToolComment$ ' )' EOL END RestoreScale SetLineStrtChr('') END RETURN PSInit: {reset flags from last Op, .70} OptCyc1F { For Reporting only } RETURN PSStuff: RETURN DoPostScript: PSInit EachPS SeqLabC PostScript EOL {literals} PSStuff {commands} NextPS RETURN DoEndOpPS: PSInit EachEOPS SeqLabC EndOpPS EOL {literals} PSStuff {commands} NextPS RETURN StockOnNoCan: IF NOT CannedCycle? StockOn {need stock for SP positioning, if not a canned cycle} END RETURN GetXCP: SetStatusOff Save# Num#('4') XStockMax# SetStatusOn RETURN GetZCP: SetStatusOff Save# Num#('3') ZStockMax# SetStatusOn RETURN GetTOEXCP: SetStatusOff Save# Num#('4') ThisOpEntryXCP# SetStatusOn {GetXCP} { Gibbs Only } RETURN GetTOEZCP: SetStatusOff Save# Num#('3') ThisOpEntryZCP# SetStatusOn {GetZCP} { Gibbs Only } RETURN GetLOEXCP: SetStatusOff Save# Num#('4') LAST OpExitXCP# SetStatusOn {GetXCP} { Gibbs Only } RETURN GetLOEZCP: SetStatusOff Save# Num#('3') LAST OpExitZCP# SetStatusOn {GetZCP} { Gibbs Only } RETURN GetOEXCP: SetStatusOff Save# Num#('4') OpExitXCP# SetStatusOn {GetXCP} { Gibbs Only } RETURN GetOEZCP: SetStatusOff Save# Num#('3') OpExitZCP# SetStatusOn {GetZCP} { Gibbs Only } RETURN GetXOpCD: SetStatusOff Save# Num#('4') XOpCD# SetStatusOn RETURN GetZOpCP: SetStatusOff Save# Num#('3') ZOpCP# SetStatusOn RETURN GetXSP: SetStatusOff StockOnNoCan Save# Num#('4') CycleStartX# StockOff SetStatusOn RETURN GetZSP: SetStatusOff StockOnNoCan Save# Num#('3') CycleStartZ# StockOff SetStatusOn RETURN GetNewToolXOpECD: Save# Num#('4') Recall# Num#('8') RETURN GetSameToolXOpECD: Save# Num#('4') Recall# Num#('7') RETURN GetSameToolZOpECP: Save# Num#('3') Recall# Num#('7') RETURN GetRapid: IF Flag?('1') SetFlagF('1') IF Flag?('2') IF Threading? Rapid END ELSE IF LAST Threading? Rapid END END SetStatusRapid ELSE RapidC END RETURN XRapidC: IF XMove? GetRapid END RETURN ZRapidC: IF ZMove? GetRapid END RETURN XZRapidC: IF XMove? OR ZMove? GetRapid END RETURN FeedNoCan: IF NOT CannedCycle? FeedC END RETURN FeedRateNoCan: IF NOT CannedCycle? FeedRateC END RETURN ApproachSP: IF ApproachFace? GetXSP LoadXTT SeqLabC StockOff XRapidC MoveXC EOL GetZOpCP LoadZTT SeqLabC ZRapidC MoveZC EOL IF NotEqual? CycleStartZ# ZOpCP# GetZSP LoadZTT SeqLabC StockOff FeedNoCan MoveZC FeedRateNoCan EOL END StockOnNoCan ELSE { ODApproach/IDApproach } GetZSP LoadZTT SeqLabC StockOff ZRapidC MoveZC EOL GetXOpCD LoadXTT SeqLabC XRapidC MoveXC EOL IF NotEqual? CycleStartX# XOpCD# GetXSP LoadXTT SeqLabC StockOff FeedNoCan MoveXC FeedRateNoCan EOL END StockOnNoCan END RETURN AppMove: GetTOEZCP LoadXTTZTT StockOff XZRapidC MoveX MoveZ CoolOn RETURN Approach: { NOT FOR TAILSTOCK, .82 } RapidF# { RapidF# Forces FeedRate } IF ApproachOD? SeqLabC GetTOEXCP AppMove EOL ELSE IF ApproachID? SeqLabC GetXOpCD AppMove EOL ELSE {ApproachFace} SeqLabC StockOnNoCan GetXSP AppMove EOL END END ApproachSP RETURN GetToolNum: { Sub Spindle Tools } IF ToolOver?('10') AND NOT ToolOver?('20') 'T' SUB# Tool# Num#('10') ELSE OpToolID END RETURN GetSpinOn: IF Flag?('8') { Sub Spindle Mode } IF CWSpindle? 'M204' ELSE 'M203' END ELSE SpinOn END RETURN GetInverseSpinOn: IF Flag?('8') { Sub Spindle Mode } IF CWSpindle? 'M203' ELSE 'M204' END ELSE InverseSpinOn END RETURN GetSpinOff: IF Flag?('8') { Sub Spindle Mode } 'M205' ELSE SpinOff END RETURN CheckOffset: GetExit DoEndOpPS IF LAST ProgStop? SeqLabC 'M00' EOL ELSE IF CoolOff? AND LAST NOT CoolOff? SeqLabC CoolOff EOL END END IF NewToolOffset? SeqLabC GetToolNum LatheOffset EOL END CSSOff IF ConstantSurfaceFeed? IF LAST ConstantSurfaceFeed? IF NotEqual? MaxRPM# LAST MaxRPM# SeqLabC Preset MaxRPM EOL END IF LAST ProgStop? CSSOn 'G96' Speed ELSE IF NotEqual? SpeedRPM# LAST SpeedRPM# CSSOn 'G96' Speed END END ELSE SeqLabC Preset MaxRPM EOL CSSOn 'G96' Speed END ELSE IF LAST ConstantSurfaceFeed? 'G97' Speed ELSE IF LAST ProgStop? 'G97' Speed ELSE IF NotEqual? SpeedRPM# LAST SpeedRPM# 'G97' Speed END END END END IF LAST ProgStop? SeqLabC {SpeedC} GetSpinOn EOL SeqLabC CoolOn EOL ELSE SeqLabC {SpeedC} EOL IF NOT CoolOff? AND LAST CoolOff? SeqLabC CoolOn EOL END END DoPostScript RETURN FormatArc: IF ArcCW? CWArcC ELSE CCWArcC END MoveXC MoveZC IF ArcIJFormat? ArcIJC ELSE ArcRC END RETURN CkCRC: { 4.2 } IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets } IF LastFeat? CRCOffC { Exit Length Feature } ELSE CRCOnC { Entry Length Feature } END END RETURN ToolPath: EACHFeat GetToolTip IF LastFeat? IF Drilling? IF Tap? SeqLabC GetSpinOff EOL SeqLabC 'G04P2000' EOL SeqLabC Speed GetInverseSpinOn EOL ELSE IF Dwell? SeqLabC 'G04P' Dwell# EOL END END ELSE IF CannedCycle? SeqLab END END END IF PointFeat? SeqLabC MoveSXYC EOL ELSE IF RapidFeat? SeqLabC RapidC MoveXC MoveZC EOL ELSE IF LineFeat? IF XMove? OR ZMove? SeqLabC CkCRC FeedC MoveXC MoveZC FeedRateC EOL END ELSE IF ArcFeat? EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop } SeqLabC FormatArc FeedRateC EOL NEXTQuadrant ELSE IF ThreadFeat? SeqLabC 'G32' MoveXC MoveZC ThrdLead EOL IF LastFeat? SetFlag('1') { GetRapid } ELSE Rapid END END END END END END IF LastFeat? Save# Num#('4') EPX# Save# Num#('3') EPZ# IF CannedCycle? GetXSP GetZSP END END NEXTFeat RETURN DoBarFeed: SetFlag('3') { BarFeed } SeqLabC Rapid GetToolNum LatheOffset EOL GetXSP GetTOEZCP LoadXTTZTT SeqLabC StockOff MoveX MoveZ EOL ApproachSP EachFeat IF NEXT LastFeat? SeqLabC MoveZC EOL END NextFeat SeqLabC 'M11' EOL { Chuck Unclamp } SeqLabC 'G98' Feed StockOff ZOpECPC FeedRate EOL { Feed Per Minute } SeqLabC 'M10' EOL { Chuck Clamp } SeqLabC 'G99' EOL { Feed Per Revolution } SetStatusOff Save# Num#('4') SPX# Save# Num#('3') Recall# Num#('7') SetStatusOn RETURN SubSpindleTest: IF Equal? Tool# Num#('11') IF Equal? LAST Tool# Num#('1') IF Equal? NEXT Tool# Num#('1') SetFlag('4') { Don't Go Home - SubSpindle } GetLOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC IF Flag?('3') AND LAST NOT CoolOff? { BarFeed } CoolOff END EOL GetLOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL DoEndOpPS IF LAST ProgStop? SeqLabC 'M00' EOL END END END END RETURN CalcBAxis: Save# Num#('11') SUB# ZStockMax# ZStockMin# { Length of Stock } Save# Num#('12') SUB# CalcZSurf# ZStockMax# { Stock to Z0 } Save# Num#('13') ADD# Recall# Num#('11') Recall# Num#('12') { Length of Part } Save# Num#('14') SUB# ZDepth# CalcZSurf# { Grab Dimension } Save# Num#('15') NumSc#('11.416') { B Axis Home Position } Save# Num#('16') SUB# Recall# Num#('11') Recall# Num#('15') { Distance to Face of Stock } Save# Num#('17') SUB# Recall# Num#('13') Recall# Num#('15') { Distance to Face of Part } Save# Num#('18') ADD# Recall# Num#('14') Recall# Num#('17') { Distance to Grab Dimension } RETURN StartSubSpindleTransfer: SetFlag('5') { Sub Spindle Transfer } DoSubSpindleOpComments DoPostScript IF NOT CoolOff? SetFlag('6') { Hex Aligner } END CalcBAxis IF OptCyc1? FormulaReport END RETURN EndSubSpindleTransfer: SetFlagF('5') { Sub Spindle Transfer } SetFlag('7') { Sub Spindle Operation } DoEndOpPS SeqLab SpinOff EOL SeqLabC CoolOff EOL RETURN StartSubSpindleOperation: IF Flag?('4') { SubSpindleTest } SetFlagF('4') ELSE IF ConstantSurfaceFeed? SeqLabC Preset MaxRPM EOL END SeqLabC 'G90' Rapid GetToolNum LatheOffset EOL { Outer/Internal Diameter Cutting Cycle } GetTOEXCP GetTOEZCP LoadXTTZTT SeqLabC Rapid StockOff MoveX MoveZ EOL END GetZSP LoadZTT SeqLabC StockOff MoveZC EOL IF Flag?('6') { Hex Aligner } SetFlagF('6') SeqLabC 'M19M219' EOL END SeqLabC 'M35' EOL { Synchronous Operation On } SeqLabC 'M211' EOL { Sub Chuck Unclamp } FORMAT(Recall#,2) SeqLabC Rapid 'B' Recall# Num#('16') EOL { Rapid to Face of Part } SeqLabC 'M252' EOL { Sub Spindle Air Blow 2 On } SeqLabC 'G98' Feed 'B' Recall# Num#('18') SETLASTOP FeedRate EOL { Feed Per Minute to Grab Dimension } FORMAT(Recall#,8) IF ConstantSurfaceFeed? CSSOn 'G96' ELSE CSSOff 'G97' END SetFlag('8') SeqLabC Speed SpinOn GetInverseSpinOn EOL { Feed Per Revolution } SetFlagF('8') SeqLabC 'M210' EOL { Sub Chuck Clamp } SeqLabC 'M257' EOL { Sub Spindle Air Blow 2 Off } SeqLabC CoolOn EOL SeqLabC 'G99' EOL ApproachSP RETURN EndSubSpindleOperation: IF Flag?('2') { LastOp } SeqLabC 'G30H0.00' EOL { Send Sub Spindle to 2nd Zero } SeqLabC GetSpinOff EOL SeqLabC CoolOff EOL SeqLabC 'M73' EOL { Parts Catcher Out } SeqLabC 'M252' EOL { Sub Spindle Air Blow 2 On } SeqLabC 'M211' EOL { Sub Chuck Unclamp } SeqLabC 'M257' EOL { Sub Spindle Air Blow 2 Off } SeqLabC 'M74' EOL { Parts Catcher In } ELSE SeqLabC 'M80' EOL SeqLabC 'G28H0.0M36' EOL { Synchronous Operation Off } GetLOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL DoEndOpPS SetFlag('8') { Sub Spindle Mode } SeqLabC SpinOff GetSpinOff EOL IF LAST NOT CoolOff? SeqLabC CoolOff EOL END END SetFlagF('7') { Sub Spindle Operation } RETURN {Start of executable Prog **************************************************} {setup and initializations} InitProg SetAbs PosSideLathe StandardXZArcs SetMaxRPM('6000') SetMaxFeed('500') Save# Num#('1') Num#('0') Save# Num#('2') Num#('0') Save# Num#('3') Num#('0') Save# Num#('4') Num#('0') Save# Num#('5') Num#('0') Save# Num#('6') Num#('0') Save# Num#('7') Num#('0') Save# Num#('8') Num#('0') Save# Num#('9') Num#('0') Save# Num#('10') Num#('1') IF Metric? Save# Num#('10') Num#('.03937007874') END SetFlagF('1') { GetRapid } SetFlagF('2') { LastOp } SetFlagF('3') { BarFeed } SetFlagF('4') { Sub Spindle Test } SetFlagF('5') { Sub Spindle Transfer } SetFlagF('6') { Hex Aligner } SetFlagF('7') { Sub Spindle Operation } SetFlagF('8') { Sub Spindle Mode } RestoreScale 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: must be all capital letters when typed in.' 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 EachOp {Start of post processing *********************} GetLCycle GetTT IF FirstOperation? EOR EOL ':' Program# IF UseComments? AND ProgramNameComment? '( ' ProgramName$ ' )' END EOL IF UseComments? SetLineStrtChr('/') IF ProgramComment? '( ' ProgramComment$ ' )' EOL END IF FormatNameComment? '( FORMAT: ' FormatName$ ' )' EOL END IF TimeComment? '( ' Date$ ' AT ' Time$ ' )' EOL END IF MovesComment? '( OUTPUT IN ABSOLUTE INCHES )' EOL END SetLineStrtChr('') END RestoreScale OpenSub StockOff {.71.2} SetHome DoOpComments DoPostScript Plane GetExit SetLineStrtChr('/') SeqLab 'M00' EOL SetLineStrtChr('') SeqLabC 'G30H0.00' EOL { Send Sub Spindle to 2nd Zero } IF Drilling? { Bar Feeder } DoBarFeed ELSE IF ConstantSurfaceFeed? SeqLabC Preset MaxRPM EOL CSSOn 'G96' ELSE CSSOff 'G97' END SeqLabC Speed GetSpinOn EOL SeqLabC Rapid GetToolNum LatheOffset EOL Approach END ELSE IF NewTool? {Finish off last Operation} IF Flag?('5') { Sub Spindle Transfer } EndSubSpindleTransfer ELSE StockOff {.62} SubSpindleTest IF NOT Flag?('4') { Go Home - NOT SubSpindle } IF LAST ApproachOD? GetLOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC EOL ELSE IF LAST ApproachID? GetNewToolXOpECD LoadXTTZTT SeqLabC XRapidC MoveXC EOL END END IF Flag?('7') AND Equal? LAST Tool# Num#('1') { Sub Spindle Operation } EndSubSpindleOperation NegateZ ReverseXZArcs ELSE GetLOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL IF LAST Drilling? { 4/22/92 } GetLOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC EOL END DoEndOpPS END SeqLabC RapidC 'G28U0.0W0.0' EOL IF LAST ProgStop? SeqLabC 'M00' EOL ELSE SeqLabC ProgStop EOL END END IF Flag?('3') { LAST BarFeed } SetFlagF('3') END END {Start new Operation} GetExit IF Equal? Tool# Num#('11') StartSubSpindleTransfer ELSE DoOpComments DoPostScript SeqLab IF Flag?('7') AND Equal? Tool# Num#('1') { Sub Spindle Operation } StartSubSpindleOperation ELSE IF Drilling? AND Equal? Tool# FIRST Tool# { Bar Feeder } SeqLabC SpinOff EOL DoBarFeed ELSE IF ConstantSurfaceFeed? SeqLabC Preset MaxRPM EOL CSSOn 'G96' ELSE CSSOff 'G97' END SeqLabC Speed GetSpinOn EOL SeqLabC Rapid GetToolNum LatheOffset EOL Approach END END END ELSE IF SameTool? {.62} {Start new Operation} StockOff DoOpComments IF LAST StraightConnect? CheckOffset GetXSP GetZSP LoadXTTZTT SeqLabC StockOff XZRapidC MoveXC MoveZC EOL StockOnNoCan ELSE IF ApproachOD? IF LAST ApproachOD? GetSameToolXOpECD LoadXZTT SeqLabC XRapidC MoveXC EOL ELSE {around} IF LAST ApproachID? GetSameToolXOpECD LoadXTTZ SeqLabC XRapidC MoveXC EOL END GetLOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL GetLOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC EOL END ELSE IF ApproachID? IF LAST ApproachID? GetSameToolXOpECD LoadXZTT SeqLabC XRapidC MoveXC EOL ELSE IF LAST ApproachOD? {around} GetLOEXCP LoadXTTZ SeqLabC XRapidC MoveXC EOL END GetLOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL GetXOpCD LoadXTTZTT SeqLabC XRapidC MoveXC EOL END ELSE {ApproachFace} IF LAST ApproachFace? GetSameToolZOpECP LoadXTTZ SeqLabC ZRapidC MoveZC EOL ELSE IF LAST ApproachOD? {around} GetLOEXCP LoadXTTZ SeqLabC XRapidC MoveXC EOL ELSE {LAST ApproachID} GetSameToolXOpECD LoadXTTZ SeqLabC XRapidC MoveXC EOL END GetLOEZCP LoadXZTT SeqLabC ZRapidC MoveZC EOL END END END CheckOffset ApproachSP END END END END {common point for all operations} IF NOT Flag?('3') { Bar Feeder } IF NOT Flag?('5') { Sub Spindle Transfer } IF CannedCycle? StockOff IF Roughing? IF RoughSimple? StockOn SetPass1 SeqLabC LCycle IF ApproachFace? 'Z' FirstMoveEPZ# XatFinZ ELSE XatFinZ FinZ END XTapAtZ FeedRate EOL SimpleRough ELSE TagInc SetPass2 IF RoughContour? SeqLabC LCycle 'Pł' Tag# 'Q˛' Tag# XStkLeft ZStkLeft CutDepth FeedRate EOL '>' Tag# EOL SeqLab StepMove IF ApproachFace? ZSP ELSE XSP END EOL ELSE IF RoughPatternShift? SeqLabC LCycle 'Pł' Tag# 'Q˛' Tag# XStkLeft ZStkLeft XminusU ZminusW NumCuts FeedRate EOL '>' Tag# EOL SeqLab Rapid StrtPos EOL END END ToolPath '<' Tag# EOL IF AutoFinish? SeqLabC 'G70' 'Pł' Tag# 'Q˛' Tag# EOL END SetPass1 TrackXNO# CycleStartX# TrackZNO# CycleStartZ# END ELSE IF Threading? IF Chamfer? SeqLabC 'M23' EOL END SeqLabC LCycle XatFinZ FinZ XTapAtZ CutMethod ThrdHeight CutDepth ThrdLead ToolAngle EOL IF AutoFinish? SeqLabC 'G92' XatFinZ FinZ XTapAtZ ThrdLead EOL ELSE SetFlag('1') { GetRapid } END IF Chamfer? SeqLabC 'M24' EOL END ELSE IF Drilling? IF Tap? SeqLabC LCycle ZDepth 'F' FeedIPR# EOL SeqLabC GetSpinOff EOL SeqLabC 'G04P2000' EOL SeqLabC Speed GetInverseSpinOn EOL SeqLabC ZSP EOL ELSE IF PeckChipBreaker? SeqLabC LCycle ZDepth RLevel Dwell Peck Retract FeedRate EOL IF AutoFinish? SeqLabC Feed ZDepth EOL IF Dwell? SeqLabC 'G04P' Dwell# EOL END SeqLabC Rapid ZSP EOL SetFlag('1') { GetRapid } END END END END END END ELSE StockOn SetPass1 ToolPath IF AutoFinish? { .82.1c } StockOff IF Turning? IF ApproachFace? GetSameToolZOpECP LoadXTTZ SeqLabC ZRapidC MoveZC EOL ELSE GetSameToolXOpECD LoadXZTT SeqLabC XRapidC MoveXC EOL END ApproachSP SetStatusOff Save# Num#('4') CycleStartX# { GetXSP without StockOnNoCan } Save# Num#('3') CycleStartZ# { GetZSP without StockOnNoCan } SetStatusOn LoadXTTZTT StockOff SeqLabC XZRapidC MoveXC MoveZC EOL ToolPath ELSE IF Roughing? AND NOT RoughSimple? SetPass2 SetStatusOff Save# Num#('4') CycleStartX# { GetXSP without StockOnNoCan } Save# Num#('3') CycleStartZ# { GetZSP without StockOnNoCan } SetStatusOn LoadXTTZTT StockOff SeqLabC XZRapidC MoveXC MoveZC EOL ToolPath SetPass1 ELSE IF Threading? SeqLabC 'X' MUL# Num#('2') ADD# FinishXRadius# Taper# EOL SeqLabC 'G32' IF Taper? XatFinZ END FinZ ThrdLead EOL SeqLabC Rapid XSP EOL SeqLabC ZSP EOL END END END END END IF Drilling? AND Tap? SeqLabC GetSpinOff EOL SeqLabC 'G04P2000' EOL SeqLabC Speed GetSpinOn EOL END END { Sub Spindle } END { Bar Feeder } NextOp {loops back to EachOP until last Operation} {End of program ************************************************************} {finish last operation} StockOff SetFlag('2') { LastOp } CRCOffC IF ApproachOD? GetOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC EOL ELSE IF ApproachID? GetNewToolXOpECD LoadXTTZTT SeqLabC XRapidC MoveXC EOL END END GetOEZCP LoadXTTZTT SeqLabC ZRapidC MoveZC EOL IF Drilling? { 4/22/92 } GetOEXCP LoadXTTZTT SeqLabC XRapidC MoveXC EOL END DoEndOpPS SeqLabC RapidC 'G28U0.0W0.0' EOL IF Flag?('8') { Sub Spindle Operation } EndSubSpindleOperation ELSE SeqLabC GetSpinOff EOL END SeqLabC 'M89' EOL { Work/Total Counter } SeqLabC 'M99' EOL { End of Sub-Program } Post EOR EOL Close Retag IF UseComments? SetLineStrtChr('/') 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 SetLineStrtChr('') Close END

Wyszukiwarka

Podobne podstrony:
Fanuc 0T MS [SP] L840 85
Fanuc 0T MS [HA] L383 85 1
Fanuc 0T MS [RL] L805 85 1
Fanuc 10T MS [ ] L004 85
Fanuc 0T [FA ] L485 85
Fanuc 0T Ikegai L160 85
Fanuc 0T [FA ] L486 85
Fanuc 0T [NP] L774 85 1
Fanuc 0T MS L579 82m
Fanuc 0T [LS] L563 85
Fanuc 6T MS [ f] L006 85
Fanuc 0T [SM] L797 85 1
Fanuc 6T MS [A&D ] L243 85
Fanuc 15T MS ( ) L166 85

więcej podobnych podstron