Bendix 892 J&L [BM] L286 82 2m


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

{6/22/93
Copied & modified: Bendix 892 J & L Bar L240.82.1
For: IDESSYS

This Post Processor was created by Michel JEAN FRANCOIS at IDESSYS and during transfer
to ABELSYS, the source code was lost. The Form was decompiled, restored and fully tested
as best as possible. The following comments were reported by Daniel Ball of Gibbs & Associates.

Machine has an End [OD] Turret and a Side [ID] Turret, on one Saddle, 6 tools on each.
End Turret is PosSideLathe output.
Side Turret is NegSideLathe output.
X and Z Axis CheckSum result must both equal zero at end of output.
Changed to Metric.
Changed FORMATs and added many math formulas throughout.
Deleted all support of PostScript OptCyc1 command for Die Head Operation.
Added CheckSpin sub.
Acts like NewGear boolean, will output SpinOff if SpeedRPM#>400 for one Operation and NOT for
the other.
Added IncValue XSP ZSP for Threading Operations at ODApproachSP and IDApproachSP.
Rearranged output, deleted literal 'G01' and added SpinOn at AppMove1 sub.
Deleted all occurances of RapidF command.
Added LookValue sub.
Post stores up to 9 different SpeedRPM# values in seperate variables and issues warning to
operator if more than 9 are programmed.
Uses Variable 10 and 20-28.
Added CheckSValue Sub.
Checks to see if current SpeedRPM# is stored and outputs S01-S09.
If current SpeedRPM# is NOT stored, calls LookValue sub.
Added GetSpindleSpeed sub.
Outputs comment indication Gear and Value.
Deleted all support of IF NewGear? boolean.
Deleted all occurances of Table(1,Speed,1).
Added condition to reverse Arcs for Side Turret at FormatArc sub.
Changed literal 'G02' and 'G03' to CWArcC and CCWArcC at FormatArc sub.
Changed MoveX MoveZ to MoveXC MoveZC at FormatArc sub.
Changed ArcIJ to ArcJ ArcI at FormatArc sub.
Changed ArcR to ArcRC at FormatArc sub.
Deleted special output for Threading at ToolPath RapidFeat and LineFeat.
Deleted Feed at ToolPath ThreadFeat.
Changed MoveZC to MoveZ at ToolPath ThreadFeat.
Deleted GetBarFeed sub.
Deleted NegSideLathe and PosSideLathe at IndexTool sub.
Added GetTool sub.
Outputs literal M-Codes based on Turret.
Added FindPreset sub.
Uses Math to adjust origin based on Turret changes.
Added FindToolChange sub.
Outputs TurretX# and TurretZ# values based on Turret.
Added FindFinishTool sub.
Uses Math to output CheckSum value at end of prog.
Added SetMinRPM('25') at setup and initializations.
Changed SetMaxRPM from ('2000') to ('1200') at setup and initializations.
Changed SetMaxFeed from ('250') to ('12.5') at setup and initializations.
Added NoIJKSigns at setup and initializations.
Deleted 10 EORs at FirstOperation and end of Prog.
Added literal 40 spaces at FirstOperation and twice at end of Prog.
Added EOR Program# EOL at FirstOperation.
Added Warning!!! No Tool in Post 25 and 35 at FirstOperation.
Changed most output at FirstOperation, NewTool, SameTool and end of Prog.
Added suppression of clearance moves for previous Threading Operation at NewTool and end of Prog.
Added special AbsValue clearance moves for Threading Operation following CommonPoint.
DWB}

{6/22/93
Modified: Bendix 892 J&L L240.82.15m
For: Gibbs & Associates/ABELSYS/Brusselle Marine Industries
Changes made per Beno"t DE Hertogh at Abelsys.
Updated to Version 4.1 per Fanuc 10T MS [-] L001.82.1 Format.
Made major clean-up changes for smoothness and to reduce confusion.
Changed name of CheckCoolOn sub to GetCoolOn.
Changed name of GetIndex sub to TurretIndex.
Deleted condition to output Reverse Arcs at FormatArc sub.
This is now handled by StandardXZArcs and ReverseXZArcs.
Changed ArcJ ArcI to ArcIJ at FormatArc sub.
Replaced all Speed output with literal 'S00'.
Deleted CheckSpin sub.
Deleted LookValue sub.
Deleted CheckSValue sub.
Changed name of GetSpindleSpeed sub to SpeedComment.
Changed name of FindFinishTool sub to FindCheckSum.
Deleted ABS# at FindCheckSum sub.
This was messing up the Presetting at the end of the Prog.
Var 1-5 is used for Indexing.
Var 6&7 is used for Presetting Turret Changes.
DWB}

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

#1 = '#.00'
#2 = '0###^###;0:2'
#3 = '#0'
#4 = '00'
#5 = '0000^0'
#6 = '#'
#7 = '0000'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(DIV#,2)
FORMAT(SUB#,2)
FORMAT(ADD#,2)
FORMAT(MUL#,2)
FORMAT(HomeX#,2)
FORMAT(HomeZ#,2)
FORMAT(TurretX#,2)
FORMAT(TurretZ#,2)
FORMAT(ToolOffsetXRadius#,2)
FORMAT(ToolOffsetZ#,2)
FORMAT(FirstMoveEPZ#,2)
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Recall#,4)
FORMAT(Dwell#,4) {.72}
FORMAT(FeedIPR#,5)
FORMAT(RapidF#,6)
FORMAT(Program#,7) {.72}

{Prog Subroutines **********************************************************}

RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is an Metric 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 ' 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
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC 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

ODApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL
StockOnNoCan
IF Threading?
SeqC IncValue Feed XSP ZSP FeedRate EOL
ELSE
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
END
RETURN

IDApproachSP:
SeqC StockOnNoCan ZSPC EOL
SeqC StockOff XOpCDC EOL { for SameTool ApproachID }
StockOnNoCan
IF Threading?
SeqC IncValue Feed XSP ZSP FeedRate EOL
ELSE
IF NotEqual? CycleStartX# XOpCD#
SeqC FeedNoCan XSPC FeedRateNoCan EOL
END
END
RETURN

FaceApproachSP:
SeqC StockOnNoCan XSPC EOL { for SameTool ApproachFace }
SeqC StockOff ZOpCPC EOL
StockOnNoCan
IF NotEqual? CycleStartZ# ZOpCP#
SeqC FeedNoCan ZSPC FeedRateNoCan EOL
END
RETURN

GetCoolOn:
IF NOT CoolOff?
IF ToolOver?('6')
'M06' { End Turret }
ELSE
'M08' { Side Turret }
END
END
RETURN

AppMove:
StockOff ZCP
RETURN

Approach: { NOT FOR TAILSTOCK, .82 }
ToolOfst SpinOn GetCoolOn
Rapid RapidF# { RapidF# Forces FeedRate }
IF ApproachOD?
SeqC StockOff XCP AppMove EOL
ODApproachSP
ELSE
IF ApproachID?
SeqC StockOff XOpCD AppMove EOL
IDApproachSP
ELSE {ApproachFace}
SeqC StockOnNoCan XSP AppMove EOL
FaceApproachSP
END
END
RETURN

SpeedComment:
IF UseComments?
IF LessThan? SpeedRPM# Num#('400')
'( Lower Speed = ' SpeedRPM# ')' EOL
IF LessThan? SpeedRPM# Num#('25')
'( WARNING THE SPEED IS UNDER 25 RPM ) EOL'
END
ELSE
'( Hight Speed = ' SpeedRPM# ')' EOL
END
END
RETURN

CheckOffset:
DoEndOpPS
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
IF NewToolOffset?
SeqC OfstOff EOL
SeqC ToolOfst EOL
END
IF LAST ProgStop?
SpeedComment
Seq 'S00' SpinOn EOL
SeqC GetCoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SpeedComment
Seq 'S00' GetCoolOn EOL
ELSE
SeqC GetCoolOn EOL
END
ELSE
IF NotEqual? SpeedRPM# LAST SpeedRPM#
SpeedComment
Seq 'S00' EOL
END
END
END
DoPostScript
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXC MoveZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcRC
END
RETURN

ToolPath:
EACHFeat
GetToolTip
IF LastFeat?
IF Drilling?
IF Tap?
SeqC SpinOff EOL
SeqC 'G04F01' EOL
SeqC 'S00' InverseSpinOn EOL
ELSE
IF Dwell?
SeqC 'G04F' Dwell# EOL
END
END
END
END
IF PointFeat?
SeqC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqC RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqC FeedC MoveXC MoveZC FeedRateC EOL
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, LAST, FIRST or NEXT modifiers in this loop }
SeqC FormatArc FeedRateC EOL
NEXTQuadrant
ELSE
IF ThreadFeat?
SeqC 'G33' MoveXC MoveZ ThrdLead EOL
Rapid
END
END
END
END
END
NEXTFeat
RETURN

TurretIndex:
IF LTEqual? Recall# Num#('0') Num#('-3')
'M' Recall# Num#('4')
ELSE
IF LTEqual? Recall# Num#('0') Num#('-1')
'M' Recall# Num#('3')
ELSE
IF LTEqual? Recall# Num#('0') Num#('3')
'M' Recall# Num#('4')
ELSE
'M' Recall# Num#('3')
END
END
END
'M' Recall# Num#('5')
'M' Recall# Num#('6')
'M' Recall# Num#('7')
RETURN

IndexTool:
IF ToolOver?('6')
Save# Num#('0') SUB# Recall# Num#('2') Tool#
Save# Num#('2') Tool#
Save# Num#('3') Num#('37')
Save# Num#('4') Num#('38')
Save# Num#('5') ADD# Num#('30') SUB# Tool# Num#('6')
Save# Num#('6') Num#('28')
Save# Num#('7') Num#('25')
ELSE
Save# Num#('0') SUB# Recall# Num#('1') Tool#
Save# Num#('1') Tool#
Save# Num#('3') Num#('27')
Save# Num#('4') Num#('28')
Save# Num#('5') ADD# Num#('20') Tool#
Save# Num#('6') Num#('38')
Save# Num#('7') Num#('35')
END
TurretIndex
RETURN

GetPreset:
SeqC Preset
IF LAST ToolOver?('6') AND NOT ToolOver?('6')
'X' SUB# ADD# ADD# TurretX# ABS# LAST ToolOffsetXRadius# Recall# Num#('8') ABS# ToolOffsetXRadius#
'Z' SUB# SUB# ADD# TurretZ# ABS# LAST ToolOffsetZ# Recall# Num#('9') ABS# ToolOffsetZ#
ELSE
IF LAST NOT ToolOver?('6') AND ToolOver?('6')
'X' SUB# SUB# ADD# TurretX# ABS# LAST ToolOffsetXRadius# Recall# Num#('8') ABS# ToolOffsetXRadius#
'Z' SUB# ADD# ADD# TurretZ# ABS# LAST ToolOffsetZ# Recall# Num#('9') ABS# ToolOffsetZ#
ELSE
'X' SUB# ADD# TurretX# ABS# LAST ToolOffsetXRadius# ABS# ToolOffsetXRadius#
'Z' SUB# ADD# TurretZ# ABS# LAST ToolOffsetZ# ABS# ToolOffsetZ#
END
END
EOL
RETURN

FindCheckSum: { To Restore Turrets to FIRST Origin }
IF ToolOver?('6') AND FIRST NOT ToolOver?('6')
'X' ADD# ADD# Recall# Num#('8') FIRST TurretX# ToolOffsetXRadius#
'Z' ADD# ADD# Recall# Num#('9') FIRST TurretZ# ToolOffsetZ# EOL
ELSE
IF NOT ToolOver?('6') AND FIRST ToolOver?('6')
'X' ADD# SUB# Recall# Num#('8') FIRST TurretX# ToolOffsetXRadius#
'Z' ADD# ADD# Recall# Num#('9') FIRST TurretZ# ToolOffsetZ# EOL
ELSE
'X' ADD# FIRST TurretX# ToolOffsetXRadius#
'Z' ADD# FIRST TurretZ# ToolOffsetZ# EOL
END
END
RETURN

CheckRapid:
IF LAST CannedCycle?
Rapid
ELSE
RapidC
END
RETURN

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

{setup and initializations}
InitProg
XsAreRadii
NoIJKSigns
SetAbs
PosSideLathe
SetMinRpm('25')
SetMaxRPM('1200')
SetMaxFeed('25.4')
Save# Num#('0') Num#('0') { Turret Direction }
Save# Num#('1') Num#('0') { Lower Turret Position }
EachOp { For Correct Turret Indexing at start }
IF FirstOperation? OR NewTool?
IF NOT ToolOver?('6') { End Turret }
Save# Num#('1') Tool#
END
END
NextOp
Save# Num#('2') Num#('12') { Side Turret }
Save# Num#('3') Num#('0') { CCW Turret Index }
Save# Num#('4') Num#('0') { CW Turret Index }
Save# Num#('5') Num#('0') { Turret Tool M-Code }
Save# Num#('6') Num#('0') { Turret Tool M-Code }
Save# Num#('7') Num#('0') { Turret Tool M-Code }
Save# Num#('8') Num#('490') { Change Turret X Axis Preset Position }
Save# Num#('9') Num#('323') { Change Turret Z Axis Preset Position }
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?
' ' EOL
EOR Program# EOL
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 ABSOLUTE MM )' EOL
END
'( WARNING!!! NO TOOL IN POSITION 25 AND 35 )' EOL
END
RestoreScale
OpenSub
StockOff {.71.2}
SetHome
DoOpComments
DoPostScript
IF ToolOver?('6')
NegSideLathe
ReverseXZArcs
ELSE
PosSideLathe
StandardXZArcs
END
Plane
CSSOff
SpeedComment
Seq 'S00' OfstOff IndexTool AbsValue 'G95' Rapid 'X' TurretX# 'Z' TurretZ# EOL
SeqC Preset Home EOL
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
CheckRapid
IF LAST NOT Threading?
IF LAST ApproachOD?
SeqC XCPC EOL
ELSE
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
END
SeqC ZCPC EOL
END
SeqC CoolOff 'X' TurretX# 'Z' TurretZ# EOL
DoEndOpPS

{Start new Operation}

DoOpComments
DoPostScript
SpeedComment
Seq 'S00' OfstOff IndexTool RapidC 'X' TurretX# 'Z' TurretZ# EOL
IF LAST ProgStop?
SeqC 'M00' EOL
ELSE
SeqC ProgStop EOL
END
GetPreset
IF ToolOver?('6')
NegSideLathe
ReverseXZArcs
ELSE
PosSideLathe
StandardXZArcs
END
Approach
ELSE
IF SameTool? {.62}

{Start new Operation}

StockOff
DoOpComments
IF LAST StraightConnect?
CheckOffset
CheckRapid
SeqC StockOnNoCan XSPC ZSPC EOL
ELSE
CheckRapid
IF ApproachOD?
IF LAST ApproachOD?
SeqC LAST XOpECDC EOL
ELSE {around}
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
END
SeqC ZCPC EOL
SeqC XCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC XCPC EOL
END
SeqC ZCPC EOL
SeqC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqC XCPC EOL
ELSE {LAST ApproachID}
SeqC LAST XOpECDC EOL
END
SeqC ZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
StockOn
SetPass1
IF Threading?
ToolPath
StockOff
IF ApproachOD?
SeqC AbsValue XCPC EOL
ELSE
IF ApproachID?
SeqC AbsValue XOpECDC EOL
END
END
SeqC ZCPC EOL
ELSE
ToolPath
IF AutoFinish?
IF NOT Drilling? AND NOT Grooving? AND NOT RoughSimple?
StockOff
IF Turning?
SetPass1
ELSE
SetPass2
END
SeqC FeedC StrtPos EOL
ToolPath
END
END
IF Drilling? AND Tap?
SeqC SpinOff EOL
SeqC 'G04F01' EOL
SeqC 'S00' SpinOn EOL
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
IF CannedCycle?
Rapid
ELSE
RapidC
END
IF ApproachOD?
SeqC XCPC EOL
ELSE
IF ApproachID?
SeqC XOpECDC EOL
END
END
SeqC ZCPC EOL
DoEndOpPS
SeqC CoolOff Rapid FindCheckSum EOL
SeqC OfstOff SpinOff
IF FIRST ToolOver?('6')
Save# Num#('0') SUB# Recall# Num#('2') FIRST Tool#
Save# Num#('2') FIRST Tool#
Save# Num#('3') Num#('37')
Save# Num#('4') Num#('38')
Save# Num#('5') ADD# Num#('30') SUB# FIRST Tool# Num#('6')
Save# Num#('6') Num#('28')
Save# Num#('7') Num#('25')
ELSE
Save# Num#('0') SUB# Recall# Num#('1') FIRST Tool#
Save# Num#('1') FIRST Tool#
Save# Num#('3') Num#('27')
Save# Num#('4') Num#('28')
Save# Num#('5') ADD# Num#('20') FIRST Tool#
Save# Num#('6') Num#('38')
Save# Num#('7') Num#('35')
END
TurretIndex FindCheckSum EOL
IF FIRST ToolOver?('6')
NegSideLathe
ELSE
PosSideLathe
END
SeqC Preset 'X' FIRST TurretX# 'Z' FIRST TurretZ# EOL
SeqC EOP EOL
Post
' ' EOL
' ' EOL
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