{Prog Comments ****}
{ 10/10/95 Changed version number to .10 TH}
{ 10/12/95 Upgraded to C Style Adv Mill post TH}
{
Format: Acr A2100-Generic C750.10.1
10/24/95
Added MSG, to DoCSWFOComment
TH}
{2/12/96, Updated .10 number to .11, no changes necessary, MPK}
{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}
{8/22/96
Modified: Acr A2100-Generic C750.12
Created: Acr A2100-Generic C750.12.1
For: Gibbs & Associates/CAI
Versions: Catalyst v3.05.03C/Compost 4.21.37/v1.0b1
Changes made per Kai K. Eriksen of Computer Aided Integration
Changed SetMaxFeed from 500 to 5000 at ProgStart.
DWB}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '###.###;0'
#3 = '*###.###;0'
#4 = '####.####;0'
#5 = '#######0'
#6 = '##.##;0'
#7 = '0000'
#8 = '+####.####;0'
#9 = '####0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CP1LessCP2#,4)
FORMAT(ABS#,4)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(MUL#,4)
FORMAT(DIV#,4)
FORMAT(CalcZSurf#,4)
FORMAT(FluteLen#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(ClearancePlane3#,4)
FORMAT(Retract#,4)
FORMAT(Peck#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(Repeats#,5)
FORMAT(Tag#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Recall#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Program#,7)
FORMAT(HelixPitch#,8)
FORMAT(Program#,9)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
{Prog Subroutines ****}
{***** CMI specific Subroutines *****}
ToolCRCOfst:
IF CutterRadiusCompensation?
'D' ToolOffset# 'O' CRCOffset#
ELSE
'D' ToolOffset#
END
RETURN
CMIPreTool:
IF NOT LastTool?
'T' NextTool# { PreTool }
ELSE
'T' Recall# Num#('1') { Last Tool Change PreTool to first tool}
END
RETURN
CMI_Wvalue:
IF Backbore?
'W0'
ELSE
IF RetractToCP1?
IF NotEqual? SUB# ClearancePlane1# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane1# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane1# CalcZSurf#
END
END
ELSE
IF NotEqual? SUB# ClearancePlane2# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane2# CalcZSurf# Num#('0')
'W' SUB# ClearancePlane2# CalcZSurf#
END
END
END
END
RETURN
PitchOfHelix:
SetStatusOff
Save# Num#('7') ABS# SUB# EPZ# SPZ# { Delta Z }
'K' MUL# Recall# Num#('7') DIV# Num#('360.0') ArcAngle# { Delta Z * ( 360 / Arc Angle) }
SetStatusOn
RETURN
CMIOpComments:
IF FIFO? AND Dwell?
'Bore/Ream w/ Dwell'
ELSE
IF FIRIFIRO?
'Web Drill'
ELSE
IF BackBore?
'BackBore'
ELSE
IF FIStopOffWallRO?
'Dead Spindle Retract'
ELSE
IF RigidTap?
'Rigid Tap'
ELSE
IF Tap?
'Tap'
ELSE
IF FIRO? AND Dwell?
'Drill w/ Dwell'
ELSE
IF FIFO?
'Bore/Ream'
ELSE
IF Peck?
IF PeckFullRetract?
IF GreaterThan? Peck# Num#('0')
'FixPeck, FullOut' {J13}
ELSE
'VarPeck, FullOut' {J3}
END
ELSE {Chip Break}
IF GreaterThan? Peck# Num#('0')
IF GTEqual? Retract# Num#('0')
'FixPeck, ChipBreak' {J11}
ELSE
'FixPeck, ChipClear' {J12}
END
ELSE
IF GTEqual? Retract# Num#('0')
'VarPeck, ChipBreak' {J1}
ELSE
'VarPeck, ChipClear' {J2}
END
END
END
ELSE
OperationType$ { Drill, Contour, Pocket, Thread Mill }
END
END
END
END
END
END
END
END
END
RETURN
{***** End A2100 specific Subroutines *****}
RestoreScale: {not used - references to this sub is commented out}
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
'(MSG, "SUB NUMBER: ' Tag# '" )' EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'(MSG, OPERATION ' Operation# ': ' CMIOpComments ' )' EOL
END
IF OperationComment?
'(MSG, ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'(MSG, ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' ToolComment$ ' )' EOL
END
{RestoreScale}
END
RETURN
CSWFO:
FORMAT(ADD#,5)
'H' ADD# CS# SUB# NewWFO# Num#('1')
FORMAT(ADD#,4)
RETURN
CalcCSWFO: {(iPart-1)*NumOfCS#)}
FORMAT(ADD#,5)
'H' ADD# MUL# NumOfCS# SUB# PartNum# Num#('1') ADD# CS# SUB# NewWFO# Num#('1')
FORMAT(ADD#,4)
RETURN
CSAngleA:
IF WFOCS?
'A' CSOffsetA#
END
RETURN
CSAngleAC:
IF AChange?
CSAngleA
END
RETURN
CSAngleB:
IF WFOCS?
'B' CSOffsetB#
END
RETURN
CSAngleBC:
IF BChange?
CSAngleB
END
RETURN
DoCSWFOComment:
'(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL
'(MSG, ' CalcCSWFO '= X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
RETURN
DoCoolOn:
IF ThruSpin?
'M27'
ELSE
IF Pulse?
'M28'
ELSE
IF Mist?
'M29'
ELSE
IF HiPressure?
'M07'
ELSE
IF FloodThruSpin?
'M8M27'
ELSE {Flood}
CoolOn {M8}
END
END
END
END
END
RETURN
PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F { ??? }
{ResetCool}
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
DoLastEndOpPS:
PSInit
NEXT 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
'(DFS,L' Tag# ')' EOL
DoSubComment
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'(MSG, "WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT" )' EOL
' ' EOL
END
END
RETURN
StdSub: {not used in Virtual, only used in non SepSub Repeats}
SeqLabC 'G10=[T2]V0' EOL {sets temporary register #2 to 0}
SeqLabC 'Q' Tag# '1' EOL {branch label 1}
SeqLabC '(CLS,L' Tag# ')' EOL {call subroutine}
SeqLabC 'G10=[T2]V[T2]+1' EOL {increment register #2 by 1}
SeqLabC 'G11E[T2]=' Repeats# 'L' Tag# '2' EOL {if register #2 is equal to number of repeats then jump to branch label 2}
SeqLabC 'G11L-' Tag# '1' EOL {jump backwards to branch label 1}
SeqLabC 'Q' Tag# '2' EOL {branch label 2}
StartSub
RETURN
FinishSub1: {part 1}
SeqLabC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN
FinishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN
OpenMP:
IF WFOCS?
'(Advanced Mill Multiple parts, Long Hand not supported in this post)' EOL
ELSE
{TagInc}
IF WorkFixtureOffsets?
ELSE
'(Non-WFO Multiple parts, Long Hand not supported in this post)' EOL
END
END
RETURN
CloseMP:
IF WFOCS?
'(Advanced Mill Multiple parts, Long Hand not supported in this post)' EOL
ELSE
IF WorkFixtureOffsets?
ELSE
'(Non-WFO Multiple parts, Long Hand not supported in this post)' EOL
END
END
RETURN
SubCSMP:
IF WFOCS? AND ChangeCS?
SeqLabC EndSub EOL
CloseSub
NewProg
StartSub
SaveCSProg
END
RETURN
SetZRepInc: {rep change 10}
IF Flag?('1') AND ZMove? AND AbsoluteMoves?
IncValue
SetFlag('2')
END
RETURN
RestoreAbsOrInc: {rep change 11}
IF Flag?('2') AND NOT ZMove?
AbsValue
SetFlagF('2')
END
RETURN
ckHMove:
SetStatusOff
SetFlagF('9')
IF YZPlane?
IF NotEqual? SUB# SPY# ArcI# SUB# ArcI# EPY#
SetFlag('9')
END
ELSE
IF NotEqual? SUB# SPX# ArcI# SUB# ArcI# EPX#
SetFlag('9')
END
END
SetStatusOn
RETURN
ckVMove:
SetStatusOff
SetFlagF('9')
IF XYPlane?
IF NotEqual? SUB# SPY# ArcJ# SUB# ArcJ# EPY#
SetFlag('9')
END
ELSE
IF NotEqual? SUB# SPZ# ArcJ# SUB# ArcJ# EPZ#
SetFlag('9')
END
END
SetStatusOn
RETURN
ckMove:
IF NOT FullArc?
IF XYPlane? AND NOT ZMove?
IF NOT XMove?
ckVMove
ELSE
IF NOT YMove?
ckHMove
END
END
ELSE
IF XZPlane? AND NOT YMove?
IF NOT XMove?
ckVMove
ELSE
IF NOT ZMove?
ckHMove
END
END
ELSE
IF YZPlane? AND NOT XMove?
IF NOT YMove?
ckVMove
ELSE
IF NOT ZMove?
ckHMove
END
END
END
END
END
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
IF ZMove?
MoveX MoveY MoveZ ArcIJ PitchOfHelix
ELSE
MoveX MoveY ArcIJ
END
ELSE
IF XZPlane?
MoveX MoveZ ArcIJ
ELSE { YZPlane }
MoveY MoveZ ArcIJ
END
END
RETURN
CkCRC:
IF LastFeat? { Exit Length Feature }
CRCOffC
ELSE
IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets }
CRCOnC
END
END
RETURN
StdLine: {enables CRC on first call}
IF Decelerate?
IF RoomToDecel?
DecelMove1
RestoreAbsOrInc
SetZRepInc
SeqLabC FeedC CkCRC MoveXYC MoveZC FeedRateC EOL { CRCOffsetC }
RestoreAbsOrInc
DecelMove2
END
RestoreAbsOrInc
SetZRepInc
SeqLabC FeedC CkCRC MoveXYC MoveZC DecelFeed EOL { CRCOffsetC }
ELSE
IF XMove? OR YMove? OR ZMove?
RestoreAbsOrInc
SetZRepInc
SeqLabC FeedC CkCRC MoveXYC MoveZC FeedRateC EOL { CRCOffsetC }
END
END
RETURN
ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF Drilling?
IF SPXMove? OR SPYMove? OR SPZMove?
SeqLabC MoveSXYZC
CMI_Wvalue
EOL
END
ELSE
SeqLabC MoveSXYZC EOL
END
ELSE
IF RapidFeat?
IF AutoCycle?
IF LastFeat?
CRCOffC
END
RestoreAbsOrInc
SetZRepInc
SeqLabC RapidC MoveXYC MoveZC EOL
ELSE
IF ZMove? AND NOT XMove? AND NOT YMove?
CRCOffC
END
IF XMove? OR YMove? OR ZMove?
RestoreAbsOrInc
SetZRepInc
SeqLabC RapidC MoveXYC MoveZC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle?
IF LastFeat?
RestoreAbsOrInc
SetZRepInc
SeqLabC CRCOffC FeedC MoveXYC MoveZC FeedRateC EOL {MoveXYC SetZRepInc MoveZC, was MoveXYZC}
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
RestoreAbsOrInc
SetZRepInc
SeqLabC FeedC MoveXYC MoveZC FeedRateC EOL {MoveXYC SetZRepInc MoveZC, was MoveXYZC}
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
ckMove
IF Flag?('9')
SetFlagF('9')
StdLine
ELSE
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
RestoreAbsOrInc
SetZRepInc
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
RestoreAbsOrInc
SetZRepInc
SeqLabC FormatArc DecelFeed EOL
ELSE
RestoreAbsOrInc
SetZRepInc
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
IF LastFeat? AND CutterRadiusCompensation? AND NOT AutoCycle?
CRCOffC
IF NOT EmptyLine?
RestoreAbsOrInc
SetZRepInc
SeqLabC LastFeatExtend EOL { ??? any zmoves ??? }
END
END
END
NEXTFeat
RETURN
AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqLabC IncValue EOL
RETURN
AutoCycCutSub2: {part 2}
SeqC AbsValue
IF FIFO? {.81}
FeedC ZCP2 FeedEntC {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
RapidC ZCP2
END
EOL
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN
AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN
Milling:
EntryMove
ToolPath
RETURN
G92Sub:
SubWarning
StdSub
SeqLabC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
NoRepAutoCycle:
EACHFeat
IF SPXMove? OR SPYMove?
SeqC RapidC MoveSXYC EOL
END
AutoCycCutSub1
Milling
AutoCycCutSub2
NEXTFeat
RETURN
ZonlyRep:
SetFlag('1') {std sep sub Zreps are in effect}
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL {added Connect}
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL {changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {added Rapid, reads better} {changed to RapidC, reads better}
END
END
TrackZNO# FIRST SPZ#
ToolPath
IF NOT FeedConnect?
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO?
SeqLabC FeedC ZCP3C FeedEntC EOL
ELSE
IF AbsoluteMoves?
TrackZNO# ClearancePlane3#
SeqLabC Rapid 'Z' ClearancePlane3# EOL
ELSE
TrackZNO# ZInPlusInc#
SeqLabC RapidC ZCP3C EOL
END
END
END
END
NextCycle
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 2}
UseSeparateSubCalls
SetMaxSeparateSubCalls('500')
SetMaxRPM('10000')
SetMaxFeed('5000')
{Variables initialized to 0}
Save# Num#('1') Num#('0') { Num#('1') variable used for First Tool PreTooling}
Save# Num#('2') Num#('0') { Num#('2') variable used for GOTO operation #}
Save# Num#('3') Num#('0') { Num#('3') variable used for backbore Tool Radius calculation}
Save# Num#('4') Num#('0') { Num#('4') variable used for backbore Shank Radius calculation}
Save# Num#('5') Num#('0') { Num#('5') variable used for backbore Width calculation}
Save# Num#('6') Num#('0') { Num#('6') variable used for backbore U value calculation}
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
END
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('32')
SetWFOCS { use WFO for CS changes }
END
END
ELSE
IF LTEqual? NumOfCS# Num#('32')
SetWFOCS { use WFO for CS changes }
END
END
RETURN
OpGuts:
IF Milling?
SeqLabC ZCP2C EOL
IF AutoCycle? {Thread Mill Only}
NoRepAutoCycle
{SeqLabC ExitMove2 EOL}
ELSE
IF Repeats?
TagInc
IF ZshiftOnly?
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
ZonlyRep {rep change 1}
ELSE {no sep subs desired}
G92Sub
END
ELSE {not Z only}
G92Sub
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO?
SeqLabC FeedC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
TagInc
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
END
EOL
{SeqLabC DrillCP EOL}
GetCycle
IF FIFO? AND Dwell? { Bore/Ream with Dwell }
SeqLabC PlaneC 'G89'
ELSE
IF FIRIFIRO?
SeqLabC PlaneC 'G88'
ELSE
IF BackBore?
SeqLabC PlaneC 'G87'
ELSE
IF FIStopOffWallRO?
SeqLabC PlaneC 'G86'
ELSE
IF RigidTap?
SeqLabC PlaneC 'G84.1'
ELSE
SeqLabC PlaneC Cycle
END
END
END
END
END
StrtPos
IF Backbore?
'Z' ADD# Zdepth# ClearancePlane2#
ELSE
'Z' Sub# Add# ClearancePlane2# Zdepth# CalcZSurf# { Z = tip depth - Top Surface}
END
IF Backbore?
'R' ClearancePlane2#
ELSE
IF AbsValue?
'R' CalcZSurf#
ELSE
SetAbs
'R' CalcZSurf#
SetInc
END
END
CMI_Wvalue
IF FIStopOffWallRO?
'U' MUL# Num#('-1.0') ABS# Retract# 'V0J0'
END
IF BackBore?
FORMAT(Recall#,4)
Save# Num#('3') DIV# ToolDiameter# Num#('2.0') {Tool Radius}
Save# Num#('4') DIV# ShankDiam# Num#('2.0') {Shank Radius}
Save# Num#('5') ADD# ShankDiam# SUB# Recall# Num#('3') Recall# Num#('4') {Width}
Save# Num#('6') MUL# Num#('-1.0') ABS# SUB# DIV# Recall# Num#('5') Num#('2.0') Recall# Num#('4') {U}
'I' SUB# ClearancePlane2# CalcZSurf# 'K' FluteLen# 'U' Recall# Num#('6') 'V0J0'
FORMAT(Recall#,5)
END
IF FIRIFIRO?
'I' Peck# 'K' Retract#
END
IF Peck?
IF NotEqual? Peck# Num#('0')
'K' ABS# Peck#
END
END
FeedEnt
IF Peck?
IF PeckFullRetract?
IF GreaterThan? Peck# Num#('0')
'J13'
ELSE
'J3'
END
ELSE {Chip Break}
IF GreaterThan? Peck# Num#('0')
IF GTEqual? Retract# Num#('0')
'J11'
ELSE
'J12'
END
ELSE
IF GTEqual? Retract# Num#('0')
'J1'
ELSE
'J2'
END
END
END
ELSE
{
IF Tap? AND OptCyc1?
'J1'
END
}
END
EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC DrillOff
IF RetractToCP1?
IF AbsValue?
'R' ClearancePlane1#
ELSE
SetAbs
'R' ClearancePlane1#
SetInc
END
ELSE
IF AbsValue?
'R' ClearancePlane2#
ELSE
SetAbs
'R' ClearancePlane2#
SetInc
END
END
EOL
IF Repeats?
FinishSubG92
END
SeqLabC Rapid ZCP3C EOL
END
END
SetFlagF('1') {not std sep sub Zreps in effect} {rep change 3}
RETURN
NotSameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
SeqLabC CSWFO EOL
END
ELSE
IF NeedWFO1?
'H' NewWFO#
END
END
RETURN
SameToolWFO:
IF WFOCS?
IF ChangeCS?
DoCSWFOComment
ClearCSOffset
SeqLabC CSWFO EOL
END
END
RETURN
InitOp:
'(PGM, '
IF ProgramComment?
'NAME="' ProgramComment$ '",'
ELSE
'NAME="' PartName$ '",'
END
IF GTEqual? Program# Num#('0')
' ID="' Program# '",'
END
' TYPE="A2100_274" )'
EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF Metric?
':G17G71G90' EOL
ELSE
':G17G70G90' EOL
END
'(MSG, PART: ' PartName$ ' )' EOL
IF ProgramNameComment?
'(MSG, PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'(MSG, ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
IF Metric?
'(MSG, OUTPUT IN ' MoveType$ ' MM )' EOL
ELSE
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
{RestoreScale}
RETURN
ColonBlock:
SetAbs
IF Metric?
':?' Plane 'G71G90' Rapid
ELSE
':?' Plane 'G70G90' Rapid
END
RETURN
CoolantOn:
IF AbsoluteMoves?
SeqLabC DoCoolOn EOL
ELSE
SeqLabC AbsOrInc DoCoolOn EOL
END
RETURN
FirstOp1:
DoOpComments
ColonBlock 'T' Tool# ToolChng EOL { Inch }
Save# Num#('1') Tool# { save first tool number in Num#('1') variable }
RETURN
FirstOp1_MP:
DoOpComments
SeqLabC '[@NUM_OF_PARTS]=' Parts# EOL
':?' EOL
SeqLabC '[@FIXTURE_NUM]=1' EOL
'[OPERATION' Operation# ']' EOL
ColonBlock 'T' Tool# ToolChng EOL { Inch }
Save# Num#('1') Tool# { save first tool number in Num#('1') variable }
Save# Num#('2') Operation# { save Operation number in Num#('2') variable }
RETURN
FirstOp2:
RETURN
FirstOp3:
CheckPass
SeqLabC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
FirstOp3a: {can't XY position before WFO}
CheckPass
SeqLabC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
FirstOp3_MP:
CheckPass
SeqLabC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn 'H[@FIXTURE_NUM]' CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
FirstOp3b:
CheckPass
SeqLabC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
NotSameToolWFO
DoPostScript
CoolantOn
RETURN
NewToolOp1:
RETURN
NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN
NewToolOp3: {Start new Operation}
DoOpComments
ColonBlock
FORMAT(ADD#,7)
'T' Tool# ToolChng EOL
FORMAT(ADD#,4)
RETURN
NewToolOp3_MP: {Start new Operation}
SeqLabC '[@FIXTURE_NUM]=[@FIXTURE_NUM]+1' EOL
SeqLabC '(IF[@FIXTURE_NUM]<=[@NUM_OF_PARTS] GOTO [OPERATION' Recall# Num#('2') '])' EOL
DoOpComments
':?' EOL
SeqLabC '[@FIXTURE_NUM]=1' EOL
'[OPERATION' Operation# ']' EOL
ColonBlock
FORMAT(ADD#,7)
'T' Tool# ToolChng EOL
FORMAT(ADD#,4)
Save# Num#('2') Operation# { save Operation number in Num#('2') variable }
RETURN
NewToolOp4:
RETURN
NewToolOp5:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
NewToolOp5a:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
NewToolOp5b:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
NotSameToolWFO
DoPostScript
CoolantOn
RETURN
NewToolOp5b_MP:
CheckPass
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn 'H[@FIXTURE_NUM]' CMIPreTool EOL
DoPostScript
CoolantOn
RETURN
SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLabC SpinOff EOL
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset? OR ChangeCS?
{ ??? due full up here ??? }
END
END
RETURN
SameToolOp2: {Start new Operation}
DoOpComments
ColonBlock
FORMAT(ADD#,7)
'T' Tool# ToolChng EOL
FORMAT(ADD#,4)
CheckPass
RETURN
SameToolOp3: {Start new Operation}
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn CMIPreTool EOL
NotSameToolWFO
DoPostScript
CoolantOn
RETURN
SameToolOp3_MP: {Start new Operation}
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn 'H[@FIXTURE_NUM]' CMIPreTool EOL
DoPostScript
CoolantOn
{ Old way of handling the SameToolOp3 routine
IF LAST ProgStop?
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst Speed SpinOn EOL
SeqLabC DoCoolOn EOL
ELSE
IF NewToolOffset? OR ChangeCS?
SeqLabC PlaneC Rapid StrtPos ZCP1 CSAngleAC CSAngleBC ToolCRCOfst SpeedC EOL
ELSE
SeqLabC PlaneC Rapid StrtPos CSAngleAC CSAngleBC ToolCRCOfst SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC DoCoolOn EOL
END
END
}
RETURN
End1:
':?' EOL
RETURN
End1_MP: {1TAPfu}
':?' 'M26' EOL
RETURN
End2:
DoLastEndOpPS
IF FIRST ToolChangeAtHome?
SeqLabC AbsOrInc Rapid FirstHome EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN
End3:
SeqLabC 'M26M02' EOL { End of Program }
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
{ EOR EOL }
Close
ReTag
RETURN
End3_MP:
SeqLabC '[@FIXTURE_NUM]=[@FIXTURE_NUM]+1' EOL
IF AllToolsOnePart?
SeqLabC '(IF[@FIXTURE_NUM]<=[@NUM_OF_PARTS] GOTO [Operation1])' EOL
ELSE
SeqLabC '(IF[@FIXTURE_NUM]<=[@NUM_OF_PARTS] GOTO [OPERATION' Recall# Num#('2') '])' EOL
END
SeqLabC 'M26M02' EOL { End of Program }
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
{ EOR EOL }
Close
ReTag
RETURN
MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1_MP
FirstOp2
FirstOp3_MP
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5b_MP
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3_MP
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3_MP
RETURN
MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1_MP
FirstOp2
FirstOp3_MP
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
':?' 'M26' EOL
NewToolOp3_MP
NewToolOp4
NewToolOp5b_MP
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3_MP
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1_MP {End of program}
End2
End3_MP
RETURN
MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1_MP
FirstOp2
FirstOp3_MP
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
':?' EOL
NewToolOp3_MP
NewToolOp4
NewToolOp5b_MP
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3_MP
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3_MP
RETURN
NoMPs: {no multiple parts}
EachOp {Start of post processing}
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3b
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5b
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3
RETURN
{Start of executable Prog, top level ****}
ProgStart {setup and initializations}
IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END
Wyszukiwarka
Podobne podstrony:
Acr A2100 Generic L421 85 12Cin Acr A2100 Sabre M751 12 1Acr A2100 [DC] MQ56 12 1Acr A2100 [RPM] NMT09 12Acr A2100 [BM] MX11 12Acr A2100 [SI] MT76 12Acr A2100 [TT] MT89 12Acr A2100 [AFS] MX59 12Acr A2100 [CPM] MY95 12 6Acr A2100 Sabre 750 BM MV50 12Acr A2100 Sabre [BL] MU64 12Acr A2100 G92 [GGB] NMU71 12 1Cin Acr A2100 C703 12 1mwięcej podobnych podstron