GE 1050T W&S 242 [HP] L401 85


{Change Comments ***********************************************************}

{10/11/88
Created: Generic GE 1050
For: Varec
Machine: Manarch TC-1 Lathe
Control: GE 1050T
No Canned Cycles supported.
Lathe has 2 Turrets.
Upper Turret: Tools 1 - 8, PosSideLathe, StandardXZArcs, SpinForward = M03, Offsets T0100 - T0800.
Lower Turret: Tools 1 - 8 ( 21 - 28 in ncCam Tool List ), NegSideLathe, ReverseXZArcs,
SpinForward = M04, Offsets T1000 - T8000.
JR}

{11/7/88
Deleted XsAreRadii, Lathe Xs are Diameter.
Deleted NegSideLathe and ReverseXZArcs for Lower Turret.
Both are PosSideLathe, StandardXZArcs and SpinForward = M03
JR}

{5/10/90, Updated: GE 1050T Monarch L074.56 to .69.4 format, JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}

{12/12/91
Modified: GE 1050T Monarch L074.70
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 10T MS [-] L001.82 Format.
Rapid is not used, RapidF and FeedRate instruct the control.
DWB}

{5/6/93
Copied & modified: GE 1050T Monarch L074.82
For: Braden Eng / Twigg Aerospace Components
Control: GE1050T
Machine: W&S 242 VFR Vertical Turret Lathe
5 station turret, each can hold 2 tools that can work on either + or - X axis.
Modified GetToolNum for this special handling of tool number and axis output.
Modified ToolTypeComment to reflect actual turret and tool
Added 'M17' tool change command.
Changed G01, G02, G03 to G21, G22, G23
Changed to output decimal point format without leading or trailing zeros.
Added XsAreRadii to initializations to output radius values for X.
Modified GearRange to output M50(low) & M51(High) with change over at 80 RPM.
Updated to .82ż format.
Jim Radcliffe}

{10/27/93
Modified: GE 1050T W&S 242 VFR L284.82
For: Braden Eng / Twigg Aerospace Components
Deleted XsAreRadii to get Diameter output.
Jim Radcliffe}

{11/18/93
Modified: GE 1050T W&S 242 VFR L284.82.1
For: Braden Eng / Twigg Aerospace Components
Added XsAreRadii to get Radius output, the only diameter value is the Home line.
Modified the Home lines to get a diameter value.
Changed 'G4X1.' to 'G04X2.'
Added leading zeros to G, M & N codes.
Deleted SpinOff from end of program.
Deleted G95 from very beginning of operation, read further for implementation.
Deleted M58, it is not used on this machine.
Modified GearRange to change over at 150 RPM.
Output M80 to set Rapid, M81 to set Feed. Modal.
Output G94 (IPM) for Rapid, G95 (IPR) for Feed. Modal.
Jim Radcliffe}

{8/13/95
Initial: GE 1050T W&S 242 VFR L284.82.2
Created: GE 1050T W&S 242 VFR L284.85
ForUser: CNCCS / Twigg
Control: GE 1050T
Machine: Gray W&S
Develop: ComPost 4.21.32, Virtual v.2.20
Comment: Modified Processor per marked up readout from Dalton Harwell.
Changed default format N, SeqLabuence numbers, to show 4 digits.
Changed default format S, spindle speed, to show 4 digits.
Deleted T code from Home lines.
Deleted GetLastToolNum sub as it is now no longer used.
Updated to .85 format per Fanuc 10T MS [-] L001.85.01
Jim Radcliffe}

{12/15/95
Copied: GE 1050T W&S 242 VFR L284.85
Created: GE 1050T W&S 242 [HP] L401.85
For: Hydromatic Pumps
Machine:
Control:
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.08/Catalyst v2.28.08/Compost 4.21.34/1.0a
Changes made per Paul McGathey of Hydromatic Pumps.
Changed Sequence Label from N to N? in Compost Strings 2 Dialog.
Changed Seq/SeqC to SeqLab/SeqLabC throughout Prog.
Added SetLineStrtChr(O) for forced SeqLab at FirstOperation and NewTool.
Changed CheckG94 sub and calls to G94 sub and calls.
Changed CheckG95 sub and calls to G95 sub and calls.
Changed CheckM80 sub and calls to M80 sub and calls.
Changed CheckM81 sub and calls to M81 sub and calls.
Changed GetToolNum sub to Tool.
Outputs 'T' Recall# Num#(2).
Changed all calls to GetToolNum sub to call Tool sub.
Added GetTool sub.
Contains modified logic from original GetToolNum sub.
Changed to support one 5 Station Turret with X+/X- Tooling.
Does not set PosSideLathe/NegSideLathe.
This is taken care of in GetPosNeg sub.
Changed from outputting Formula for Tool# to storing it to Variable.
Added Var(1) to store Num(0) for PosSideLathe and Num(1) for NegSideLathe.
Added Var(2) to store Formula for Tool#.
Added condtion to output warning comment when Tool# exceeds 10.
Added GetPosNeg sub.
Contains modified logic from original GetToolNum sub.
Sets PosSideLathe/NegSideLathe correctly.
Sets StandardXZArcs/ReverseXZArcs correctly.
Added PosSideLathe prior to Home block at FirstOperation, NewTool and end of Prog.
Added Index sub.
Contains logic to calculate shortest indexing distance of Turret.
CWIndex = M17, CCWIndex = M18.
Changed literal 'M17' to call Index sub at FirstOperation and NewTool.
Added condition to output SpinOff when Spindle Direction changes at NewTool.
Deleted Rapid Line G21 from Compost Commands 2 Dialog.
Added non-outputting Rapid command at G95 and G94 subs.
Causes FeedC Command to output G21 following output of G95 or G94 codes which cancel G21.
Some Approach and Exit moves are output G21F200.M80 on line by itself prior to axis move.
This was approved by the customer.
DWB}

{Prog Numeric Format Definitions *******************************************}

#1 = '#.00'
#2 = '##.####;0'
#3 = '#######0'
#4 = '###0'
#5 = '##.#;0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CycleStartX#,2)
FORMAT(ADD#,2)
FORMAT(MUL#,2) { Non-Canned Threading AutoFinish }
FORMAT(Dwell#,2) {.72}
FORMAT(Program#,3) {.72}
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Recall#,3)
FORMAT(CalcEPRPM#,4)
FORMAT(RapidF#,5)

{Special Subroutines *******************************************************}

GetPosNeg:
PosSideLathe
StandardXZArcs
IF NOT ToolOver?('10')
IF ToolOver?('5')
NegSideLathe
ReverseXZArcs
END
END
RETURN

GetTool:
IF FirstOperation?
Save# Num#('3') Tool#
ELSE
IF NewTool?
Save# Num#('3') Recall# Num#('2') { LAST Tool }
END
END
Save# Num#('1') Num#('0') { PosSideLathe }
Save# Num#('2') Tool#

IF ToolOver?('10')
'( WARNING - Tool selected exceeds range!!! )' EOL
ELSE
IF ToolOver?('5')
Save# Num#('1') Num#('1') { NegSideLathe }
Save# Num#('2') SUB# Tool# Num#('5')
END
END
RETURN

Tool:
'T' Recall# Num#('2')
RETURN

Index:
Save# Num#('3') SUB# Recall# Num#('2') Recall# Num#('3') { Turret Index }
IF LTEqual? Recall# Num#('3') Num#('-5')
'M18' { CCWIndex }
ELSE
IF LTEqual? Recall# Num#('3') Num#('-3')
'M17' { CWIndex }
ELSE
IF LTEqual? Recall# Num#('3') Num#('-1')
'M18' { CCWIndex }
ELSE
IF LTEqual? Recall# Num#('3') Num#('2')
'M17' { CWIndex }
ELSE
'M18' { CCWIndex }
END
END
END
END
RETURN

G94: { Called before Rapid blocks }
IF Flag?('1')
{ We are already in G94 Rapid }
ELSE
SeqLabC 'G94' EOL { Set to IPM for Rapid moves }
SetFlag('1')
Rapid { No Output }
END
RETURN

G95: { Called before Feed blocks }
IF Flag?('1')
SeqLabC 'G95' EOL { Set to IPR for Feed moves }
SetFlagF('1')
Rapid { No Output }
ELSE
{ We are already in G95 Feed }
END
RETURN

M80: { Called on Rapid blocks }
IF Flag?('2')
{ We are already in M80 Rapid }
ELSE
IF NOT EmptyLine?
'M80' { Set for Rapid moves }
SetFlag('2')
END
END
RETURN

M81: { Called on Feed blocks }
IF Flag?('2')
IF NOT EmptyLine?
'M81' { Set for Feed moves }
SetFlagF('2')
END
ELSE
{ We are already in M81 Feed }
END
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

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 ' Recall# Num#('2')
IF Equal? Recall# Num#('1') Num#('0') { PosSideLathe }
' X+ '
ELSE { NegSideLathe }
' X- '
END
': ' 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

FeedNoCan:
IF NOT CannedCycle?
FeedC
END
RETURN

FeedRateNoCan:
IF NOT CannedCycle?
FeedRateC
END
RETURN

ApproachSP:
IF ApproachFace?
SeqLabC StockOnNoCan XSPC EOL
SeqLabC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
G95
SeqLabC FeedNoCan ZSPC FeedRateNoCan M81 EOL
END
ELSE { ODApproach/IDApproach }
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
G95
SeqLabC FeedNoCan XSPC FeedRateNoCan M81 EOL
END
END
RETURN

AppMove:
StockOff ThisOpEntryZCP RapidF M80
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
SetFlagF('1')
G94
Feed
IF ApproachOD?
SeqLabC ThisOpEntryXCP AppMove EOL
SeqLabC CoolOn EOL
ELSE
IF ApproachID?
SeqLabC XOpCD AppMove EOL
SeqLabC CoolOn EOL
ELSE {ApproachFace}
SeqLabC StockOnNoCan XSP AppMove EOL
SeqLabC CoolOn EOL
END
END
ApproachSP
RETURN

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
IF NewToolOffset?
IF NewGear?
SeqLabC Tool '00' SpinOff EOL
SeqLabC Tool LatheOffset GearRange EOL
ELSE
SeqLabC Tool '00' EOL
SeqLabC Tool LatheOffset EOL
END
ELSE
IF NewGear?
SeqLabC SpinOff EOL
SeqLabC GearRange EOL
END
END
IF ConstantSurfaceFeed?
SeqLabC {skip untill we are at the start position}
ELSE
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' Speed
ELSE
SeqLabC SpeedC
END
END
IF LAST ProgStop?
SpinOn EOL
SeqLabC CoolOn EOL
ELSE
IF NewGear?
SpinOn EOL
ELSE
EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
DoPostScript
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXC MoveZC ArcIJC
RETURN

GetRapidFC:
IF NOT EmptyLine?
RapidFC
END
RETURN

ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqLabC SpinOff EOL
SeqLabC 'G4X2.' EOL
SeqLabC Speed InverseSpinOn EOL
ELSE
IF Dwell?
SeqLabC 'G04X' Dwell# EOL
END
END
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
G94
SeqLabC FeedC MoveXC MoveZC GetRapidFC M80 EOL
ELSE
G95
IF LineFeat?
SeqLabC FeedC MoveXC MoveZC FeedRateC M81 EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
SeqLabC FormatArc FeedRateC M81 EOL
NEXTQuadrant
ELSE
IF ThreadFeat?
SeqLabC 'G33' MoveXC MoveZC ThrdLead M81 EOL
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid:
IF LAST CannedCycle?
SetFlagF('1')
END
G94
RETURN

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
PosSideLathe
XsAreRadii
StandardXZArcs
NoIJKSigns
SetMaxRPM('486')
SetMaxFeed('500') {?}
SetFlagF('1') { used for G94/G95, Flag? true is we are in G94 Rapid }
SetFlagF('2') { used for M80/M81, Flag? true is we are in M80 Rapid }
Save# Num#('1') Num#('0') { 0 = PosSideLathe/1 = NegSideLathe }
Save# Num#('2') Num#('0') { Current Tool# }
Save# Num#('3') Num#('0') { Previous Tool# and Turret Index }
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
'$' Program# EOL
IF UseComments?
IF ProgramNameComment?
'( PROGRAM: ' 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
END
RestoreScale
OpenSub
StockOff {.71.2}
GetTool
SetHome
Plane { No Output }
SetLineStrtChr('O')
SeqLab 'G70' EOL
SetLineStrtChr('')
SeqLabC AbsOrInc EOL
DoOpComments
DoPostScript
SeqLabC 'G04X2.' Tool LatheOffset Index EOL
SeqLabC GearRange EOL
PosSideLathe
SeqLabC Preset Home MaxRPM EOL
GetPosNeg
SeqLabC CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn EOL
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
CheckRapid
FeedC
IF LAST ApproachOD?
SeqLabC LAST OpExitXCPC GetRapidFC M80 EOL
ELSE
IF LAST ApproachID?
SeqLabC LAST XOpECDC GetRapidFC M80 EOL
END
END
SeqLabC LAST OpExitZCPC GetRapidFC M80 EOL
DoEndOpPS
IF LAST ConstantSurfaceFeed?
SeqLabC CSSOff 'G97' CalcRPM2 EOL
END
PosSideLathe
SeqLabC FeedC NewHome GetRapidFC M80 EOL
IF CWSpindle? AND LAST NOT CWSpindle?
SeqLabC SpinOff EOL
ELSE
IF NOT CWSpindle? AND LAST CWSpindle?
SeqLabC SpinOff EOL
ELSE
IF NewGear?
SeqLabC SpinOff EOL
END
END
END
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

GetTool
SetLineStrtChr('O')
SeqLab 'G70' EOL
SetLineStrtChr('')
SeqLabC AbsOrInc EOL
DoOpComments
DoPostScript
SeqLabC 'G04X2.' Tool LatheOffset Index EOL
SeqLabC GearRange EOL
PosSideLathe
SeqLabC Preset Home MaxRPM EOL
GetPosNeg
SeqLabC CSSOff 'G97'
IF ConstantSurfaceFeed?
CalcRPM1
ELSE
Speed
END
SpinOn EOL
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
DoOpComments
IF LAST StraightConnect?
CheckOffset
CheckRapid
SeqLabC FeedC StockOnNoCan XSPC ZSPC GetRapidFC M80 EOL
ELSE
CheckRapid
FeedC
IF ApproachOD?
IF LAST ApproachOD?
SeqLabC LAST XOpECDC GetRapidFC M80 EOL
ELSE {around}
IF LAST ApproachID?
SeqLabC LAST XOpECDC GetRapidFC M80 EOL
END
SeqLabC LAST OpExitZCPC GetRapidFC M80 EOL
SeqLabC LAST OpExitXCPC GetRapidFC M80 EOL
END
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC GetRapidFC M80 EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC GetRapidFC M80 EOL
END
SeqLabC LAST OpExitZCPC GetRapidFC M80 EOL
SeqLabC XOpCDC GetRapidFC M80 EOL
END
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC GetRapidFC M80 EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC GetRapidFC M80 EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC GetRapidFC EOL
END
SeqLabC LAST OpExitZCPC GetRapidFC M80 EOL
END
END
END
CheckOffset
ApproachSP
END
END
END
END {common point for all operations}
IF ConstantSurfaceFeed?
IF SameTool?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SeqLabC Preset MaxRPM EOL
END
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SeqLabC CSSOn 'G96R' CycleStartX# Speed EOL
END
ELSE
SeqLabC Preset MaxRPM EOL
SeqLabC CSSOn 'G96R' CycleStartX# Speed EOL
END
ELSE
SeqLabC CSSOn 'G96R' CycleStartX# Speed EOL
END
END
StockOn
SetPass1
ToolPath
IF AutoFinish?
StockOff
IF Turning?
G94
IF ApproachFace?
SeqLabC FeedC ZOpECPC GetRapidFC M80 EOL
ELSE
SeqLabC FeedC XOpECDC GetRapidFC M80 EOL
END
ApproachSP
G95
SeqLabC StockOff StrtPosC FeedRateC M81 EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
G94
SeqLabC FeedC XSPC ZSPC GetRapidFC M80 EOL
G95
SeqLabC FeedC StockOff StrtPosC FeedRateC M81 EOL
ToolPath
SetPass1
ELSE
IF Threading?
G94
SeqLabC FeedC 'X' ADD# FinishXRadius# Taper# GetRapidFC M80 EOL
G95
SeqLabC 'G33'
IF Taper?
XatFinZ
END
FinZ ThrdLead M81 EOL
G94
SeqLabC FeedC XSP GetRapidFC M80 EOL
SeqLabC FeedC ZSP GetRapidFC M80 EOL
END
END
END
END
IF Drilling? AND Tap?
SeqLabC SpinOff EOL
SeqLabC 'G04X2.' EOL
SeqLabC Speed SpinOn EOL
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
StockOff
G94
FeedC
IF ApproachOD?
SeqLabC OpExitXCPC GetRapidFC M80 EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC GetRapidFC M80 EOL
END
END
SeqLabC OpExitZCPC GetRapidFC M80 EOL
DoEndOpPS
SeqLabC CoolOff EOL
IF ConstantSurfaceFeed?
SeqLabC CSSOff 'G97S' CalcEPRPM# EOL
END
PosSideLathe
SeqLabC FeedC FirstHome GetRapidFC M80 EOL
IF ProgStop?
SeqLabC 'M00' EOL
END
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