{Change Comments ***********************************************************}
{12/6/91
Copied & modified: CNC 8800 Retro-Tek M045.81
For: Gibbs & Associates
Machine: Retro-Tek
Control: CNC 88
Changes made per manual supplied by Thor Tool Corporation.
Changed FORMAT of Dwell# from '####^###0' to '####.##;0.'.
Added FORMAT #8 '+##.####;0.' for ArcZRads# for Helical/Spiral Contouring.
Added ClearancePlane2# to FORMAT #7 for Canned Drilling Cycles Retract Plane Value.
This control does not support CutterRadiusCompensation.
Deleted 'G40', 'G41' or 'G42' from Form.
Deleted all occurances of CRCOnC, CRCOffC and CRCOffsetC in Prog.
Created CheckHelix Sub to output Helical/Spiral Contouring.
Added NoIJKSigns at setup and initializations.
Changed 'G85' to 'G84' for Canned Boring Cycle in Form.
Added 'K' ClearancePlane2# for Retract Plane Value on Canned Drill Cycle Line.
DWB}
{2/9/96, Updated .81 version to .84, MPK}
{3/22/96, Tested ZOnlyRepAutCycle, Incremented number to .87, MPK}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '########;0'
#6 = '####.##;0.'
#7 = '##.####;0.'
#8 = '+##.####;0.'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Tag#,5)
FORMAT(Dwell#,6) {.72}
FORMAT(ClearancePlane2#,7)
FORMAT(OriginUnshiftPX#,7)
FORMAT(OriginUnshiftPY#,7)
FORMAT(OriginUnshiftPZ#,7)
FORMAT(OriginUnshiftRX#,7)
FORMAT(OriginUnshiftRY#,7)
FORMAT(OriginUnshiftRZ#,7)
FORMAT(PartShiftX#,7)
FORMAT(PartShiftY#,7)
FORMAT(PartShiftZ#,7)
FORMAT(RepeatX#,7)
FORMAT(RepeatY#,7)
FORMAT(RepeatZ#,7)
FORMAT(ArcZRads#,8)
{Prog Subroutines **********************************************************}
DoSubComment:
IF UseComments? AND SubComment?
NewProg
'! 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
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
END
RETURN
PSInit: {reset flags}
RotateF
RETURN
PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN
DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
' ' EOL
DoSubComment
'>' Tag# EOL
SeqLab
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:
SeqLabC 'DÅ‚' Tag# 'Q²' Tag# RepLab RepCycs EOL
StartSub
RETURN
FinishSub1: {part 1}
SeqLabC
IF NOT FeedConnect?
IF Flag?('1') { Flag(1) set at ZonlyRep }
SeqLab {This is needed for '<' Tag# to work correctly}
END
IF AutoCycle?
ZCP3C
ELSE
IF FIFO? {.81}
FeedC ZCP3C FeedRateC
ELSE
RapidC ZCP3C
END
END
IF Flag?('1') AND EmptyLine? { Flag(1) set at ZonlyRep }
' ' {This is needed for '<' Tag# to work correctly}
END
END
EOL
RETURN
FinishSubG92: {part 2}
SeqLab
IF AbsoluteMoves?
IncValue
END
IF NotEqual? RepeatX# Num#('0')
'U' RepeatX#
END
IF NotEqual? RepeatY# Num#('0')
'V' RepeatY#
END
IF NotEqual? RepeatZ# Num#('0')
'W' RepeatZ#
END
IF AbsoluteMoves?
AbsOrInc
END
EOL
'<' Tag# EOL
TagDown
CloseSub
SeqLabC
IF NotEqual? RepeatX# Num#('0')
'U0.'
END
IF NotEqual? RepeatY# Num#('0')
'V0.'
END
IF NotEqual? RepeatZ# Num#('0')
'W0.'
END
EOL
RETURN
OpenMP:
TagUp TagInc
SeqLabC 'DÅ‚' Tag# 'Q²' Tag# RepLab Parts EOL
StartSub
RETURN
CloseMP:
SeqLab
IF AbsoluteMoves?
IncValue
END
IF NotEqual? PartShiftX# Num#('0')
'U' PartShiftX#
END
IF NotEqual? PartShiftY# Num#('0')
'V' PartShiftY#
END
IF NotEqual? PartShiftZ# Num#('0')
'W' PartShiftZ#
END
IF AbsoluteMoves?
AbsOrInc
END
EOL
'<' Tag# EOL
TagDown
CloseSub
SeqLabC
IF NotEqual? PartShiftX# Num#('0')
'U0.'
END
IF NotEqual? PartShiftY# Num#('0')
'V0.'
END
IF NotEqual? PartShiftZ# Num#('0')
'W0.'
END
EOL
RETURN
CheckHelix:
IF ZshiftOnly? AND NOT AutoCycle? { SkipZ set in ZRepOnly, ZMove always = TRUE }
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
ELSE
IF XYPlane? AND ZMove?
MoveXYZC ArcIJC 'K' ArcZRads#
ELSE
IF XZPlane? AND YMove?
MoveXYZC ArcIC 'J' ArcZRads# ArcJC
ELSE
IF YZPlane? AND XMove?
MoveXYZC 'I' ArcZRads# ArcIJC
ELSE { NOT Helical/Spiral Feature }
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
END
END
END
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
CheckHelix
RETURN
StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqLabC FeedC MoveXYZC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC FeedC MoveXYZC FeedRateC EOL
END
END
RETURN
ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC 'DÅ‚' Tag# 'Q²' Tag# 'L1' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC MoveSXYZC EOL {.80.01}
END
ELSE
IF LastFeat? AND Flag?('1') AND FeedConnect? { Flag(1) set at ZonlyRep }
SeqLab {This is needed for '<' Tag# to work correctly}
END
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN
WFOStuff:
{Note: This processor does not handle work fixture offsets}
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLab IncValue EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
SeqLab AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC}
ELSE
IF FIFO? {.81}
FeedC ZCP2 FeedRateC
ELSE
RapidC ZCP2
END
END
EOL
'<' Tag# 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?
TagUp TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
TagDown
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
SeqLabC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagUp TagInc
Save# Num#('1') Num#('0') {This is needed for '<' Tag# to work correctly}
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Feed IncValue StrtPosC EOL
SeqLabC AbsOrInc
ELSE
SeqLabC Feed
END
ELSE
SeqLabC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLabC AbsOrInc ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLabC Rapid ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
IF NOT FeedConnect? {This is needed for '<' Tag# to work correctly}
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
IF Equal? Recall# Num#('1') Repeats#
SeqLab
END
END
SeqLabC 'DÅ‚' Tag# 'Q²' Tag# 'L1' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqLab Feed ZCP2 FeedRate EOL {.69}
ELSE
SeqLab Rapid ZCP2 EOL {.69}
END
END {.69}
TagDown
'<' Tag# EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqLabC 'DÅ‚' Tag# 'Q²' Tag# 'L1' EOL
NextCycle
StartSub
SkipZ
SetFlag('1') {This is needed for '<' Tag# to work correctly}
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
SetFlagF('1')
'<' Tag# EOL
TagDown
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
NoIJKSigns
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50')
SetMaxRPM('3750')
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: may be capital and/or lower case letters. Separate commands with a space.' 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
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
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
IF PartsComment?
'! PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
'! FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Plane 'G80' EOL
SeqLabC OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
DoPostScript
SeqLabC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrInc Rapid Home SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLab Plane 'G80' EOL
SeqLabC OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
DoPostScript
SeqLabC Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC AbsOrInc Rapid StrtPos EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
SeqLabC SpinOff EOL
SeqLabC 'M0' EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC SpinOn EOL
SeqLabC OfstOn EOL
SeqLabC CoolOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
SeqLabC IncValue OfstOff EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
SeqLabC OfstOn EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC AbsOrInc Rapid StrtPos SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC ZCP2C EOL
IF Repeats?
TagUp TagInc
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
ELSE {no sep subs desired}
G92Sub
END
END {end Auto Cycle IF}
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqLabC FeedC ZCP3C FeedRateC EOL
ELSE
SeqLabC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
TagUp TagInc
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC Cycle StrtPos RLevel ZDepth 'K' ClearancePlane2# Peck FeedEnt EOL { K = Retract }
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC 'G80' EOL
IF Repeats?
FinishSubG92
END
SeqLabC RapidC ZCP3C EOL
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
SeqLabC IncValue OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC AbsOrInc Rapid FirstHome SpinOff EOL
ELSE
SeqLabC SpinOff EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC EOP EOL
CloseSub
Post2 {organize Subs into one program}
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:
CNC 88 Retro Tek [TTD] M470 87CNC 8800 Retro Tek M045 8987 88 by darog83Fanuc 10M MVJr[G43r] M192 87Tosnuc 600M BMC 40 M440 87więcej podobnych podstron