{Change Comments ***********************************************************}
{9/20/91
Copied & modified: Fanuc 10T MS [-] L001.82
For: Machine Specialties
Machine: Azuma Swiss Slant
Control: Fanuc 0T
Machine has two spindles, the Main Spindle and the Sub Spindle.
Each Spindle is controlled by seperate CNC-Controls.
Cannot mix Main Spindle and Sub Spindle in the same Program.
Machine also has three Turrets, the Front Turret, Rear Turret and Sub Spindle Turret.
The Front and Rear Turrets machine on the Main Spindle in StandardXZArc Mode.
The Rear Turret, Tools 1 to 6, is activated with a G69, Mirror Off Code.
The Front Turret, Tools 11 to 16, is activated with a G68, Mirror On Code.
The Sub Spindle Turret machines on the Sub Spindle in ReverseXZArc/NegateZ Mode.
The Sub Spindle Turret, Tools 21 to 26, IS NOT activated with G68/G69, Mirror On/Off Codes.
Added logic to test for both Spindles Programmed together at FirstOperation and NewTool.
Added logic to set Post Processor in StandardXZArc or ReverseXZArc/NegateZ Modes at setup and
initializations.
CWArc = G03, CCWArc = G02 in MachSpec.
Moved OpToolID LatheOffset CoolOn to FirstOperation and NewTool.
Added Preset 'Z0C0' and Rapid 'X3.5' at FirstOperation.
Added ASCII(13) at FirstOperation and NewTool.
Turning ConstantSurfaceFeed on at Home.
Deleted CalcRPM1 at FirstOperation and NewTool, always using Speed.
Deleted CalcRPM2 at NewTool.
Deleted ConstantSurfaceFeed logic at CommonPoint.
Deleted CalcEPRPM# at end of Program, and FORMAT for same.
Changed Home, NewHome and FirstHome Commands to 'X3.5' index position.
There is no index position for the Z-Axis.
Deleted LOfstOff '00' at NewTool.
Deleted OpToolID '00' at end of Prog.
Deleted UnTool '00' at end of Prog.
Only SimpleRough CannedCycle is supported.
Changed all SeqLab/SeqLabC to Seq/SeqC in Prog, and N? to N in MachSpec.
Deleted Unconditional SeqLab at ToolPath.
Deleted Retag at end of Prog.
Tool Geometry Offsets are stored in the ToolOffset.
JR}
{4/10/92
Updated: Fanuc 0T Azuma MSI L245.82
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 0T/3T Miyano L008.82.1 Format.
KM}
{7/15/92
Modified: Fanuc 0T Azuma MSI L245.82.1
For: Machine Specialties
Changes made per Joseph Landry and Bob Shumaker at Machine Specialties.
Updated to Version 4.1 per Fanuc 10T MS [-] L001.82 Format.
Corrected MAJOR BUG in IF CannedCycle!
IF CannedCycle was forced to END, immediately following RoughSimple Operation.
This caused all ToolPath output for all Operations to be by-passed.
Added SetTurret sub, called from FirstOperation and NewTool.
Checks to see that Spindles are not programmed together, logic moved from FirstOperation and
NewTool.
Checks to see that Tool# is within the above listed range, 1-6, 11-16 or 21-26.
Checks to see if G68/G69, Mirror On/Off Codes are needed.
Added GetLatheOffset sub to control offsets values for the Sub Spindle Turret.
Added SUB# Tool# Num#20 for Sub Spindle Tool Offset, and FORMAT for SUB#.
Added literal M50, limit switch override command, for the Sub Spindle Turret at GetLatheOffset.
Deleted AppMove sub.
Modified Approach sub to bypass Move to XCP and/or ZCP when coming from ToolChng Position.
Changed all literal G4P2000 forced Dwells to G4U2.
Moved NegateZ before logic at setup and initializations, Z-minus always feeds into part.
Corrected bug that caused two Carriage Returns at NewTool.
Added code for RoughContour, RoughPatternShift, Threading, Tap and PeckChipBreaker CannedCycles.
Changed all Seq/SeqC to SeqLab/SeqLabC in Prog, and N to N? in MachSpec.
Added Retag at end of Prog.
Added logic to suppress Rapid for Canned PeckChipBreaking Cycle with AutoFinish at CheckRapid and
end of Prog.
Modified Canned Tapping Cycle.
Changed FeedIPR# to ADD# at FORMATs and changed FORMAT from #.######;0. to #.####;0.
Changed FeedIPR# to FeedRate at Tap CannedCycle.
Added ADD# FeedIPR# Num#(.0005) for Tap CannedCycle Retracting.
Added 'R' Retract# for Canned PeckChipBreaking Cycle and FORMAT for same.
Added CutOff Cycle code at end of Prog.
Customer requested modification of FeedRates and Speeds for Side Milling/Drilling and support for
Side Tapping Cycle.
I informed them that this is normally handled with our ncMAT system, and that support is difficult
without knowing such issues like when live tooling occurs and programmable spindle angle
positions. With this information, it could be done. However, any coordinate output would require
massive changes and would neccessitate an investment in ncMAT.
NOTE: Prog contains CheckPreTool sub which is not called anywhere.
DWB}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.####;0.'
#3 = '#######0'
#4 = '###^##0'
#5 = '#.####;0.'
#6 = '00'
#7 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(FirstMoveEPZ#,2)
FORMAT(Retract#,2)
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(ADD#,5) { Canned Tapping Retract FeedRate }
FORMAT(SUB#,6) { Sub Spindle Tool Offset }
FORMAT(RapidF#,7)
{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
CheckPreTool: { This is not called from anywhere, what is it for??? }
IF NOT ToolOver?('17')
IF ToolOver?('7')
PreToolUnder('7') LatheOffset
ELSE
PreToolOver('7') LatheOffset
END
END
RETURN
BadSpindle:
' ' EOL
'( NOTE: DO NOT mix Main Spindle and Sub Spindle in the same Program! )' EOL
' ' EOL
RETURN
BadTool1:
' ' EOL
'( NOTE: This Operation uses Tool# ' Tool# '! )' EOL
'( The '
RETURN
BadTool2:
' Turret only contains Tools '
RETURN
BadTool3:
' )' EOL
' ' EOL
RETURN
SetTurret:
IF GTEqual? Tool# Num#('21') { Sub Spindle }
IF NewTool? AND NOT FirstOperation?
IF LessThan? LAST Tool# Num#('21') { LAST Main Spindle }
BadSpindle
END
END
IF GreaterThan? Tool# Num#('26')
BadTool1
'Sub Spindle'
BadTool2
'21 - 26'
BadTool3
END
ELSE { Main Spindle }
IF NewTool? AND NOT FirstOperation?
IF GTEqual? LAST Tool# Num#('21') { LAST Sub Spindle }
BadSpindle
END
END
IF GTEqual? Tool# Num#('11') { Front Turret }
IF GreaterThan? Tool# Num#('16')
BadTool1
'Front'
BadTool2
'11 - 16'
BadTool3
END
SeqLabC 'G68' EOL { Mirror On }
ELSE { Rear Turret }
IF GreaterThan? Tool# Num#('6')
BadTool1
'Rear'
BadTool2
'1 - 6'
BadTool3
END
SeqLabC 'G69' EOL { Mirror Off }
END
END
RETURN
GetLatheOffset:
IF GTEqual? Tool# Num#('21') { Sub Spindle Turret }
SUB# Tool# Num#('20') 'M50' { Limit Switch Override }
ELSE
LatheOffset
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# ': ' ToolSize$ ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN
PSInit: {reset flags from last Op, .70}
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
ODApproachSP:
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC Feed XSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
IDApproachSP:
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL { for SameTool ApproachID }
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC Feed XSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
FaceApproachSP:
SeqLabC StockOnNoCan XSPC EOL { for SameTool ApproachFace }
SeqLabC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqLabC Feed ZSPC FeedRate EOL
ELSE
RapidF# { No Output - Forces FeedRate in ToolPath }
END
RETURN
Approach: { NOT FOR TAILSTOCK, .82 }
IF ApproachOD?
SeqLabC Rapid XOpCDC StockOnNoCan ZSP EOL
ODApproachSP
ELSE
IF ApproachID?
SeqLabC Rapid XOpCD StockOnNoCan ZSP EOL
IDApproachSP
ELSE {ApproachFace}
SeqLabC Rapid StockOnNoCan XSP StockOff ZOpCP EOL
FaceApproachSP
END
END
RETURN
CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
SeqLabC LOfstOff '00' EOL
SeqLabC OpToolID GetLatheOffset EOL
END
IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
ELSE
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96' Speed
END
ELSE
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' Speed
END
END
IF LAST ProgStop?
SeqLabC SpeedC SpinOn 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
ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4U2' EOL
SeqLabC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G4P' 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?
SeqLabC FeedC MoveXC MoveZC FeedRateC EOL
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
Rapid
END
END
END
END
END
NEXTFeat
RETURN
CheckRapid:
IF LAST CannedCycle?
IF LAST Drilling? AND LAST PeckChipBreaker? AND LAST AutoFinish?
ELSE
Rapid
END
ELSE
RapidC
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
SetAbs
PosSideLathe
NegateZ
IF GTEqual? Tool# Num#('21') { Sub Spindle }
ReverseXZArcs
ELSE { Main Rear Turret }
StandardXZArcs
END
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: 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
IF FirstOperation?
EOR EOL
ProgID1
IF UseComments? AND ProgramNameComment?
'( ' ProgramName$ ' )'
END
EOL
IF UseComments?
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
END
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
SeqLabC Preset 'Z0C0' EOL
SeqLabC Rapid 'X3.5' CoolOn EOL
SeqLabC ' ' EOL
DoOpComments
DoPostScript
Plane
SetTurret
SeqLab OpToolID GetLatheOffset EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
SeqLabC Speed SpinOn EOL
Approach
ELSE
IF NewTool?
{Finish off last Operation}
StockOff {.62}
CheckRapid
IF LAST ApproachOD?
SeqLabC XCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
END
SeqLabC ZCPC EOL
DoEndOpPS
SeqLabC 'X3.5' EOL
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLabC ' ' EOL
DoOpComments
DoPostScript
SetTurret
SeqLab OpToolID GetLatheOffset EOL
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
CSSOn 'G96'
ELSE
CSSOff 'G97'
END
SeqLabC Speed SpinOn EOL
Approach
ELSE
IF SameTool? {.62}
{Start new Operation}
StockOff
DoOpComments
IF LAST StraightConnect?
CheckOffset
CheckRapid
SeqLabC StockOnNoCan XSPC ZSPC EOL
ELSE
CheckRapid
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
END
SeqLabC ZCPC EOL
SeqLabC XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC EOL
END
SeqLabC ZCPC EOL
SeqLabC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC XCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC EOL
END
SeqLabC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed? AND NOT SameTool?
SeqLabC CSSOn 'G96' Speed EOL
END
IF CannedCycle?
StockOff
IF Roughing?
IF RoughSimple?
StockOn
SetPass1
IF ApproachFace?
SeqLabC LCycle 'Z' FirstMoveEPZ# XatFinZ XTapAtZ FeedRate EOL
ELSE
SeqLabC LCycle XatFinZ FinZ XTapAtZ FeedRate EOL
END
SimpleRough
ELSE
TagInc
IF RoughContour?
SetPass2
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft CutDepth FeedRate EOL
'>' Tag# EOL
IF ApproachFace?
SeqLab StepMove ZCSP EOL
SeqLabC XCSP EOL
ELSE
SeqLab StepMove XCSP EOL
SeqLabC ZCSP EOL
END
ToolPath
'<' Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
ELSE
IF RoughPatternShift?
SetPass2
SeqLabC LCycle XminusU ZminusW NumCuts EOL
SeqLabC LCycle 'PÅ‚' Tag# 'Q²' Tag# XStkLeft ZStkLeft FeedRate EOL
'>' Tag# EOL
SeqLab Rapid StrtPos EOL
ToolPath
'<' Tag# EOL
IF AutoFinish?
SeqLabC 'G70' 'PÅ‚' Tag# 'Q²' Tag# EOL
END
END
END
END
ELSE
IF Threading?
IF Chamfer?
SeqLabC 'M26' EOL
END
SeqLabC LCycle 'P' { Parameter }
IF AutoFinish? { Repetitive count in finishing ( 1 to 99 ) }
'01'
ELSE
'00'
END
'12' { Chamfer Amount }
IF ConstantVolumeCut? AND NOT SingleEdgeCut? { Tool Angle }
'00'
ELSE
'60'
END
'Q100' { Minimum Cutting Depth }
'R200' { Finishing Allowance }
EOL
SeqLabC LCycle XatFinZ FinZ XTapAtZ ThrdHeight CutDepth ThrdLead EOL
IF AutoFinish?
SeqLabC 'G92' XatFinZ FinZ
IF Taper?
XTapAtZ
END
ThrdLead EOL
END
IF Chamfer?
SeqLabC 'M27' EOL
END
ELSE
IF Drilling?
IF Tap?
SeqLabC FeedC ZDepth FeedRate 'M28' OpToolID GetLatheOffset EOL
SeqLabC ZSP 'F' ADD# FeedIPR# Num#('.0005') InverseSpinOn EOL
SeqLabC 'G4U2M29' EOL
SeqLabC Speed SpinOn EOL
ELSE
IF PeckChipBreaker?
SeqLabC LCycle 'R' Retract# EOL
SeqLabC LCycle XCSP ZDepth Peck RLevel FeedRate EOL
SeqLabC DrillOff EOL
IF AutoFinish?
SeqLabC Feed ZDepth EOL
IF Dwell?
SeqLabC 'G4P' Dwell# EOL
END
SeqLabC Rapid ZSP EOL
END
END
END
END
END
END
ELSE
StockOn
SetPass1
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving? AND NOT RoughSimple?
StockOff
IF Turning?
SetPass1
ELSE
SetPass2
END
SeqLabC RapidC StrtPos EOL
ToolPath
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4U2' EOL
SeqLabC Speed SpinOn EOL
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
StockOff
IF CannedCycle?
IF Drilling? AND PeckChipBreaker? AND AutoFinish?
ELSE
Rapid
END
ELSE
RapidC
END
IF ApproachOD?
SeqLabC XCPC EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC EOL
END
END
SeqLabC ZCPC EOL
DoEndOpPS
SeqLabC CoolOff EOL
SeqLabC 'X3.5' SpinOff EOL
IF ProgStop?
SeqLabC 'M0' EOL
END
{ CutOff Routine }
SeqLabC 'M56' EOL {}
SeqLabC 'G99' EOL {}
SeqLabC 'G69' EOL {}
SeqLabC 'T0606' EOL {}
SeqLabC 'G0X1.75Z-.05' EOL {}
SeqLabC 'G50S2000' EOL {}
SeqLabC 'M1' EOL {}
SeqLabC 'S500M3' EOL {}
SeqLabC 'M57' EOL {}
SeqLabC 'M98P8500' EOL {}
SeqLabC 'M57' EOL {}
SeqLabC 'M1' EOL {}
SeqLabC 'M99' EOL {}
SeqLabC EOP EOL
Post
EOR EOL
Close
Retag
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:
Fanuc 0T Yam CK1A L336 82 1Fanuc 0T Ikegai [TSS] L348 82 3Fanuc 0T Miyano [TPM] L329 82 3Fanuc 0T Okuma [VT] L255 82Fanuc 0T MS ( G30) L212 82 1Fanuc 0T MS SL25A L239 82 5Fanuc 0T (Anzon1) L077 82 1mFanuc 0T SL 25 [CS] L323 82 1Fanuc 0T Miy BND 34 L313 82 2Fanuc 0T Miyano [A&B] L247 82 6Fanuc 0T Nakamora L248 82Fanuc 0T [RWMT] L369 82 2Fanuc 0T 3T Miy [SP] L242 82 2Fanuc 0T (Anzon1) L077 82 1Fanuc 0T Wasino L182 82 2więcej podobnych podstron