Acr A2100 [PPM] L678 85


{Change Comments ***********************************************************}
{
2/13/96 [ws]
Acr A2100-Generic L421.85.01 ( from - Acr A2100-Generic L421.85.00 )
removed GearRange (M42) from colon block.
removed newgear? logic from function CheckOffset

2/15/96 [ws]
Acr A2100-Generic L421.85.02 ( from - Acr A2100-Generic L421.85.01 )
(L421.85.02a ) - 3/18/96
fixed canned section so if pref canned selected from the dlog non-canned out will be used for all but drilling.
fixed so no G0 and G33 on same line.
removed last tool change.
removed spindle from colon block and moved it to the toolchange line.
(L421.85.02b ) - 3/18/96
moved G92 block before the Tool Change Block and removed all other calls to SetMaxSS.
removed newgear? logic from function CheckOffset.
adds "G83" parts catcher code to the end of program section if Cutoff.
(L421.85.02c ) - 3/19/96
forces rapid code before going to tool change position.
initialized cutoff Flag('1') to False.
fixed so G83 only output when Cutoff is used.
(L421.85.02 - 3/19/96 ) - release version

2/21/96 [ws]
Acr A2100-Generic L421.85.03 ( from - Acr A2100-Generic L421.85.02 )
(L421.85.03a ) - 3/21/96
added IValue function to Thread line.
(L421.85.03b ) - 3/21/96
changed IValue function so it outputs a radius IValue.
(L421.85.03c ) - 3/22/96
changed format #2 to output 6 decimal places.
changed form to output 6 decimal places.

3/29/96 [ws]
Acr A2100-Generic L421.85.04 ( from - Acr A2100-Generic L421.85.03 )
(L421.85.04a ) - 3/29/96
modified StartSpeed to use CycleStartXRadius# instead of CycleStartXDia#
(L421.85.04b ) - 3/29/96
removed Rvalue from the colon block and the logic that went with it.
moved StartSpeed, feedrate, and SpinOn after the tool change code.

8/19/96 [ws]
Acr A2100-Generic L421.85.05 ( from - Acr A2100-Generic L421.85.04 )
(L421.85.05a ) - 8/19/96
added OD,ID, and FACE pullout move code from New Tool to Same Tool in EachOp/NextOp Loop.

11/07/96 [ws]
Acr A2100-Generic L421.85.06 ( from - Acr A2100-Generic L421.85.05 )
(L421.85.06a ) -11/07/96
added GOTO Line w/ Block Delete which will skip sametool tool changes. (Users choice)
moved "Coolant On" from the tool change line before the 1st feed move.
(L421.85.06b ) -11/08/96
removed GOTO Line w/ Block Delete which will skip sametool tool changes. (Users choice)
added ToolChangeBlock w/ new implementation for skipping same tool tool changes.
(L421.85.06c ) -11/27/96
added Block Delete on Z move following OD/ID Xd pulloff move for same tool change operation.
changed ColonBlockBTC so that SameTool case has Block Delete.
changed ColonBlock so that D-word is on G96 line and added sametool logic for next line.
(L421.85.06d ) -12/04/96
modified so same tool block deletes only occur for OD-OD, ID-ID, or Face-Face operations.
changed so StartSpeed block in ColonBlock sub now contains the M82 parts catcher advance code
added block delete Flag('2')

02/06/97 [ws]
Acr A2100-Generic L421.85.07 ( from - Acr A2100-Generic L421.85.06 )
changed TapFeed so that Rigid Tap would have a Tap% of 100.
modified so code following block delete in EachOP Main Loop is always output.
modified the Tap Feed for Rigid Tap so metric will be 1/Tap Feed value.

03/12/97 [ws]
Acr A2100-Generic L421.85.08 ( from - Acr A2100-Generic L421.85.07 )
(L421.85.08a ) - 03/12/96
fixed Threading so 'G0' is output on next line if it is the last thread feature.

06/02/97 [ws]
Acr A2100-Generic L421.85.09 ( from - Acr A2100-Generic L421.85.08 )
(L421.85.09a ) -06/02/97
fixed Threading Double 'G0' Problem and Missing 'G0' Problem from L421.85.08
removed previous change made to L421.85.08 since it caused the double "G0" problem.
removed LAST modifier for TheadFeat? on End Of Program Rapid Condition Block.

07/11/97 [ws]
Acr A2100-Generic L421.85.10 ( from - Acr A2100-Generic L421.85.09 )
(L421.85.09a ) -06/02/97
moved the D-word in ColonBlock from block w/ startspeed to next block with an XZ move.
}

{12/12/97,
Initial : Acr A2100 Generic L421.85.10
Created: Acr A2100 [PPM] L678.85
Customer: Pioneer Precision Machine

Changes to "Prog":

1. Added ckCRC to ToolPath sub-routine.
2. Removed SetTTOff from ckCRC sub-routine.
JHE}


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

#1 = '0.00'
#2 = '###.0#####;0'
#3 = '#######0'
#4 = '##.#0'
#5 = '+#.0###;0'
#6 = '0000'
#7 = '#'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ADD#,2)
FORMAT(SUB#,2)
FORMAT(MUL#,2)
FORMAT(DIV#,2)
FORMAT(ABS#,2)
FORMAT(Num#,2)
FORMAT(HomeX#,2)
FORMAT(HomeX#,2)
FORMAT(HomeZ#,2)
FORMAT(FirstHomeX#,2)
FORMAT(FirstHomeZ#,2)
FORMAT(StartPosX#,2)
FORMAT(ThisOpEntryXCP#,2)
FORMAT(ThisOpEntryZCP#,2)
FORMAT(ArcI#,2)
FORMAT(ArcJ#,2)
FORMAT(CalcZSurf#,2)
FORMAT(TrackZNO#,2)
FORMAT(FeedIPR#,2)
FORMAT(ClearancePlane1#,2)
FORMAT(CycleStartXDia#,2)
FORMAT(Operation#,3) {.72}
FORMAT(Tool#,3) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(XCutDepth#,5)
FORMAT(ZCutDepth#,5)
FORMAT(CycleStartXRadius#,5)
FORMAT(Program#,3) {.72 }
FORMAT(RapidF#,7)

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

{***** A2100 specific Subroutines *****}

SetMaxSS:
IF ConstantSurfaceFeed?
SeqLabC Preset MaxRPM EOL
ELSE
SeqLabC Preset ' S50000' EOL {see SetMaxRPM}
END
RETURN

StartSpeed:
IF ConstantSurfaceFeed?
CSSOn ' G96' Speed
ELSE
CSSOff ' G97' Speed
END
RETURN

GetSpinOn:
IF Not Flag?('1') { if not Colon Block for Last Tool Change }
IF CWSpindle?
' M3'
ELSE
' M4'
END
ELSE
' M5' {Spindle Stop}
END
RETURN

CMI_Wvalue:
IF AutoClearance?
IF ApproachFace?
IF NotEqual? SUB# ThisOpEntryZCP# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ThisOpEntryZCP# CalcZSurf# Num#('0')
' W' SUB# ThisOpEntryZCP# CalcZSurf#
END
END
ELSE
IF NotEqual? SUB# ThisOpEntryXCP# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ThisOpEntryXCP# CalcZSurf# Num#('0')
' W' SUB# ThisOpEntryXCP# CalcZSurf#
END
END
END
ELSE
IF NotEqual? SUB# ClearancePlane3# CalcZSurf# Num#('0')
IF GreaterThan? SUB# ClearancePlane3# CalcZSurf# Num#('0')
' W' SUB# ClearancePlane3# CalcZSurf#
END
END
END
RETURN

CMIOpComments:
IF FIFO? AND Dwell?
'Bore/Ream w/ Dwell'
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, Rough, Thread }
END
END
END
END
END
END
RETURN

ActualColonBlock:
IF Metric?
':?' Rapid ' G61' ' G62' AbsOrInc ' G95' ' G71' EOL
ELSE
':?' Rapid ' G61' ' G62' AbsOrInc ' G95' ' G70' EOL
END
RETURN

ColonBlockBTC: {Before Tool Change}
IF FirstOperation?
ActualColonBlock
IF ToolChangeAtHome? OR AutoClearance?
{Don't Output a move to the clearance plane}
ELSE
SeqLabC Rapid ' X' ThisOpEntryXCP# ' Z' ThisOpEntryZCP# EOL
END
ELSE
IF Flag?('2')
IF AutoClearance?
SeqLabC ' //1' Rapid ' X' LAST ThisOpEntryXCP# ' Z' LAST ThisOpEntryZCP# EOL
ELSE
SeqLabC ' //1' Rapid ' X' ThisOpEntryXCP# ' Z' ThisOpEntryZCP# EOL
END
ELSE
IF AutoClearance?
SeqLabC Rapid ' X' LAST ThisOpEntryXCP# ' Z' LAST ThisOpEntryZCP# EOL
ELSE
SeqLabC Rapid ' X' ThisOpEntryXCP# ' Z' ThisOpEntryZCP# EOL
END
END

IF Last CutOff? AND Not Flag?('1') AND Not Last Threading?
SeqLabC ' M83' EOL {retracts the parts catcher}
ELSE
IF CutOff? AND Flag?('1')
SeqLabC ' M83' EOL {retracts the parts catcher}
END
END
ActualColonBlock
END

RETURN

ToolChangeBlock:
IF SameTool?
IF ToolChangeAtHome?
IF LTEqual? HomeX# Num#('0') AND LTEqual? HomeZ# Num#('0')
SeqLabC ' //1' OpToolID ' M6.1'
ELSE
SeqLabC ' //1 G98.1 X' HomeX# ' Z' HomeZ# EOL
SeqLabC ' //1' OpToolID ToolChng
END
ELSE
IF AutoClearance?
SeqLabC ' //1' OpToolID ' M6.1'
ELSE
SeqLabC ' //1' OpToolID ToolChng
END
END
' ;BLOCK DELETE OMITS TOOL CHANGE' EOL
ELSE
IF ToolChangeAtHome?
IF LTEqual? HomeX# Num#('0') AND LTEqual? HomeZ# Num#('0')
SeqLabC OpToolID ' M6.1' EOL
ELSE
SeqLabC ' G98.1 X' HomeX# ' Z' HomeZ# EOL
SeqLabC OpToolID ToolChng EOL
END
ELSE
IF AutoClearance?
SeqLabC OpToolID ' M6.1' EOL
ELSE
SeqLabC OpToolID ToolChng EOL
END
END
END
RETURN

ColonBlock:
ColonBlockBTC
SetMaxSS
ToolChangeBlock

IF Cutoff? AND RoughContour? {M82 advances the parts catcher}
SeqLabC StartSpeed Feedrate GetSpinOn ' M82' EOL
ELSE
SeqLabC StartSpeed Feedrate GetSpinOn EOL
END

IF SameTool?
SeqLabC ' //1' Rapid ' X' ThisOpEntryXCP# ' Z' ThisOpEntryZCP# ' D' ToolOffset# EOL
ELSE
SeqLabC Rapid ' X' ThisOpEntryXCP# ' Z' ThisOpEntryZCP# ' D' ToolOffset# EOL
END

TrackXNO# ThisOpEntryXCP#
TrackZNO# ThisOpEntryZCP#
RETURN

LastToolChange:
SetFlag('1')
ColonBlockBTC
IF ToolChangeAtHome?
IF LTEqual? HomeX# Num#('0') AND LTEqual? HomeZ# Num#('0')
SeqLabC UnTool ' M6.1' EOL
ELSE
SeqLabC ' G98.1 X' HomeX# ' Z' HomeZ# EOL
SeqLabC UnTool ToolChng EOL
END
ELSE
IF AutoClearance?
SeqLabC UnTool ' M6.1' EOL
ELSE
SeqLabC UnTool ToolChng 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
ColonBlock

IF UseComments?

'(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
END
OpenSub
{RestoreScale}
RETURN

{***** End A2100 specific 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?
'(MSG, OPERATION ' Operation# ': ' CMIOpComments ' )' EOL
END
IF OperationComment?
'(MSG, ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'(MSG, ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolSize$ ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' 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

ODApproachSP:
{ IF CannedCycle? AND Threading?
{back off 2 threads from start point}
SeqLabC StockOnNoCan ' Z' ADD# CycleStartZ# MUL# NUM#('2') DIV# NUM#('1') Thread# EOL
ELSE
}
SeqLabC StockOnNoCan ZSPC EOL
SeqLabC StockOff XOpCDC CoolOn EOL
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC FeedNoCan XSPC FeedRateNoCan EOL
END
RETURN

IDApproachSP:
{ IF CannedCycle? AND Threading?
{back off 2 threads from start point}
SeqLabC StockOnNoCan ' Z' ADD# CycleStartZ# MUL# NUM#('2') DIV# NUM#('1') Thread# EOL
ELSE
}
SeqLabC StockOnNoCan ZSPC CoolOn EOL
SeqLabC StockOff XOpCDC EOL { for SameTool ApproachID }
StockOnNoCan
IF NotEqual? CycleStartX# XOpCD#
SeqLabC FeedNoCan XSPC FeedRateNoCan EOL
END
RETURN

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

AppMove:
StockOff ThisOpEntryZCPC
RETURN

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

CheckOffset:
IF LAST ProgStop?
SeqLabC ' M0' EOL
ColonBlock
DoPostScript
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
{tool offsets not used in this processor}
END
{ IF ConstantSurfaceFeed?
IF LAST ConstantSurfaceFeed?
IF NotEqual? MaxRPM# LAST MaxRPM#
SetMaxSS
END
ELSE
SetMaxSS
{set in main after StrtPos}
END
END
}
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
DoPostScript
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveX MoveZ
IF ArcIJFormat?
{ArcIJ}
' I' MUL# ArcJ# NUM#('2') ' K' ArcI#
ELSE
ArcR
END
RETURN

CkCRC: { 4.2 }
IF XMove? OR ZMove? { Approach Length Feature and Multiple Pockets }
CRCOnC
IF CutterRadiusCompensation?
{SetTTOff} {Removed this line - JHE}
END
END
IF LastFeat? AND EmptyLine? { Exit Length Feature }
CRCOffC
IF CutterRadiusCompensation?
SetTTOk
END
END
RETURN

IValue:
Save# Num#('30') Abs# Sub# SPX# EPX#
Save# Num#('31') Abs# Sub# SPZ# EPZ#
' I' DIV# MUL# DIV# Num#('1') Thread# DIV# Recall# Num#('30') Recall# Num#('31') Num#('2') { (Zlead * slope of line) /2}
RETURN

ToolPath:
EACHFeat
GetToolTip
IF LastFeat? AND Drilling?
IF Dwell?
SeqLabC ' G4 F' Dwell# EOL
END
END
IF PointFeat?
SeqLabC MoveSXYC EOL
ELSE
IF RapidFeat?
SeqLabC RapidC MoveXC MoveZC EOL
ELSE
IF LineFeat?
SeqLabC CkCRC FeedC MoveXC MoveZC FeedRateC EOL {Added CkCRC - JHE}
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 ' G33' MoveXC MoveZC IValue ThrdLead EOL
IF NEXT RapidFeat?
Rapid
END
END
END
END
END
END
NEXTFeat
RETURN

CheckRapid:
CRCOffC
IF LAST CannedCycle? OR LAST Peck? OR LAST Tap? OR LAST RigidTap? OR LAST ThreadFeat?
Rapid
ELSE
RapidC
END
RETURN

GoNewHome:
IF ToolOver?('10') AND LAST NOT ToolOver?('10') {lower to upper turret index}
' X' NewHomeX# ' Z' ADD# Num#('20.0') NewHomeZ#
ELSE
IF NOT ToolOver?('10') AND LAST ToolOver?('10') {upper to lower turret index}
' X' ADD# Num#('13.0.') NewHomeX# ' Z' NewHomeZ#
ELSE {index on same turret}
NewHome
END
END
RETURN

GoFirstHome:
IF FIRST ToolOver?('10') AND NOT ToolOver?('10') {lower to upper turret index}
' X' FirstHomeX# ' Z' ADD# Num#('20.0') FirstHomeZ#
ELSE
IF NOT FIRST ToolOver?('10') AND ToolOver?('10') {upper to lower turret index}
' X' ADD# Num#('13.0.') FirstHomeX# ' Z' FirstHomeZ#
ELSE {index on same turret}
FirstHome
END
END
RETURN

NonCannedCycle:
StockOn
SetPass1
ToolPath
IF AutoFinish? { .82.1c }
StockOff
IF Turning?
SetPass1
RapidC
IF ApproachFace?
SeqLabC ZOpECPC EOL
FaceApproachSP
ELSE
SeqLabC XOpECDC EOL
IF ApproachOD?
ODApproachSP
ELSE {ApproachID}
IDApproachSP
END
END
SeqLabC StockOff StrtPosC EOL
ToolPath
ELSE
IF Roughing? AND NOT RoughSimple?
SetPass2
SeqLabC RapidC XSPC ZSPC EOL
SeqLabC StockOff StrtPosC EOL
ToolPath
ELSE
IF Threading?
SetPass1
SeqLabC ' X' ADD# FinishXRadius# Taper# EOL
SeqLabC ' G33'
IF Taper?
XatFinZ
END
FinZ ThrdLead EOL
SeqLabC Rapid XSP EOL
SeqLabC ZSP EOL
END
END
END
END
RETURN

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

{setup and initializations}
InitProg
SetAbs
PosSideLathe
StandardXZArcs
{XsAreRadii}
SetMaxRPM('50000')
SetMaxFeed('500')
SetFlagF('1') {Sets Cutoff Flag to False}
SetFlagF('2') {Sets BlockDelete Flag to False}
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 *********************}
SetFlagF('2')
GetLCycle
IF FirstOperation?
InitOp
StockOff {.71.2}
DoOpComments
DoPostScript
{SetMaxSS}
Approach
ELSE
IF NewTool?

{Finish off last Operation}

StockOff {.62}
{CheckRapid}
IF LAST ApproachOD?
SeqLabC Rapid LAST OpExitXCPC CoolOff EOL
SeqLabC LAST OpExitZCPC EOL
ELSE
IF LAST ApproachID?
SeqLabC Rapid LAST XOpECDC CoolOff EOL
SeqLabC LAST OpExitZCPC EOL
ELSE
SeqLabC Rapid LAST OpExitZCPC CoolOff EOL
END
END
DoEndOpPS

{Start new Operation}

IF LAST ProgStop?
SeqLabC ' M0' EOL
ELSE
SeqLabC ProgStop EOL
END
ColonBlock
DoOpComments
DoPostScript
{SetMaxSS}
Approach
ELSE
IF SameTool? {.62}
IF ( LAST ApproachOD? AND ApproachOD? )
SetFlag('2')
END
IF ( LAST ApproachID? AND ApproachID? )
SetFlag('2')
END
IF ( LAST ApproachFace? AND ApproachFace? )
SetFlag('2')
END

IF LAST ApproachOD?
SeqLabC Rapid LAST OpExitXCPC CoolOff EOL
ELSE
IF LAST ApproachID?
SeqLabC Rapid LAST XOpECDC CoolOff EOL
ELSE
SeqLabC Rapid LAST OpExitZCPC CoolOff EOL
END
END

IF LAST ApproachOD? OR LAST ApproachID?
IF Flag?('2')
SeqLabC ' //1' LAST OpExitZCP EOL
ELSE
SeqLabC LAST OpExitZCPC EOL
END
END

DoEndOpPS

{Start new Operation}

StockOff
ColonBlock
DoOpComments
{SetMaxSS}
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 LAST OpExitZCPC EOL
SeqLabC LAST OpExitXCPC EOL
END
CheckOffset
ODApproachSP
ELSE
IF ApproachID?
IF LAST ApproachID?
SeqLabC LAST XOpECDC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
END
SeqLabC LAST OpExitZCPC EOL
SeqLabC XOpCDC EOL
END
CheckOffset
IDApproachSP
ELSE {ApproachFace}
IF LAST ApproachFace?
SeqLabC LAST ZOpECPC EOL
ELSE
IF LAST ApproachOD? {around}
SeqLabC LAST OpExitXCPC EOL
ELSE {LAST ApproachID}
SeqLabC LAST XOpECDC EOL
END
SeqLabC LAST OpExitZCPC EOL
END
CheckOffset
FaceApproachSP
END
END
END
END
END
END {common point for all operations}
IF PreferCan? OR Peck? OR Tap?
StockOff
IF Drilling?
SeqLabC
IF FIFO? AND Dwell? { Bore/Ream with Dwell }
' G89'
ELSE
IF RigidTap?
' G84.1'
ELSE
LCycle
END
END
' Z' Sub# Zdepth# CalcZSurf# { Z = tip depth - "Z" Surface}
IF AbsValue?
' R' CalcZSurf#
ELSE
SetAbs
' R' CalcZSurf#
SetInc
END

{' Z' Zdepth# ' R'ThisOpEntryZCP#}
CMI_Wvalue
IF Peck?
IF NotEqual? Peck# Num#('0')
' K' ABS# Peck#
END
END

IF Metric?
IF RigidTap? { F value}
' F' DIV# NUM#('1') FeedTapIPR#('1')
ELSE
IF Tap? { F value}
' F' FeedIPR#
ELSE
FeedEnt
END
END
ELSE
IF RigidTap? { F value}
' F' FeedTapIPR#('1')
ELSE
IF Tap? { F value}
' F' FeedIPR#
ELSE
FeedEnt
END
END
END
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
END
EOL
TrackZNo# SUB# ClearancePlane3# CalcZSurf# {W value}
IF AutoFinish?
SeqLabC Feed ZDepth EOL
SeqLabC RLevel EOL
END
ELSE
NonCannedCycle
END
ELSE
NonCannedCycle
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
StockOff
CRCOffC
IF CannedCycle? OR LAST Peck? OR LAST Tap? OR LAST RigidTap? OR ThreadFeat?
Rapid
ELSE
RapidC
END

IF ApproachOD?
SeqLabC OpExitXCPC ' M5' EOL
SeqLabC OpExitZCPC EOL
ELSE
IF ApproachID?
SeqLabC XOpECDC ' M5' EOL
SeqLabC OpExitZCPC EOL
ELSE
SeqLabC OpExitZCPC ' M5' EOL
END
END
DoEndOpPS
IF CutOff?
SeqLabC ' M83' EOL {retracts the parts catcher}
END
{LastToolChange}
SeqLabC EOP EOL
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
Post
ASCII('00') EOL
Close
Retag


Wyszukiwarka

Podobne podstrony:
Acr A2100 Generic L421 85 12
Acr A2100 [GCS] L517 85 1
Acr A2100 [LMT] L716 85 1
Acr A2100 [KOM] L684 85
Acr A2100 [MHR] L833 85
Acr A2100 CC [SM] L734 85
Acr A2100 [VG] MT97 16 3m
Acr A2100 [ALA] CX48 15 1
Cin Acr 850 SX L315 85
Cin Acr A2100 Sabre M751 12 1
Acr A2100 [VCA] MX31 89
Acr A2100 [DC] MQ56 12 1
Acr A2100 [RPM] NMT09 12
Cin Acr A2100 [TVR] M875 82 6

więcej podobnych podstron