Cin Acr 850SX [D&H] CY84 15


{Prog Comments ****}

{
10/21/94 [cwh]
M689.82

Updated to new post prog format.

11/29/94 [ws]
Cin Acr A2100 M689.82.02 ( from M689.82.01 )

Modified so 'W' value posted on all drill lines based on "W = zretract - top surface"
Modified drilling 'R' value to be top surface via CalcZSurf#

11/30/94 [ws]
Cin Acr A2100 M689.82.03 ( from M689.82.02 )

Modified G80 line to include a 'R' value where R = zretract.

1/3/95 [ws]
Cin Acr A2100 M689.82.04 ( from M689.82.03 )

Modified so 'Z' value for drilling is calculated as "Z = Tip Depth - Top Surface"
Modified so when using Post Script command for coolant change coolant reset back to the original

2/15/95 [ws]
Cin Acr A2100 M689.82.05 ( from M689.82.04 )

Modified so output H word is not on a line by itself. (affects how MP NC code is output)
}

{
Format: Cin Acr 850SX Sabre C689.82.06
5/23/95
Upgraded to C Style Adv Mill post
Added functions to make all rotations incremental in a CW direction
Added functions to handle clamps if rotary motion
TH}

{ 8/29/95 - Updated to .10 format - TH}

{9/15/95 - Updated to include rigid tap changes made to M style post. - TH}

{
Format: Cin Acr 850SX Sabre C689.10.02
10/24/95
Added MSG, to DoCSWFOComment
TH}

{1/17/96, Updated .10 to .11 version, MPK}
{3/22/96,
Initial: Cin Acr 850SX Sabre C689.11
Created: Cin Acr 850SX Sabre CXXX.11
Put AbsOrInc at beginning of FormatArc sub on its own line (850SX control gave an error for
helixes otherwise, added M60 before EOP at program end. MPK}
{3/25/96,
Initial: Cin Acr 850SX Sabre C966.11
Created: Cin Acr 850SX Sabre C966.12
Undid previous move of AbsOrInc on FormatArc sub.
Tested ZOnlyRepAutoCycle, incremented # to .12, removed all RestoreAbsOrInc, added RestoreAbsOrInc
before Return in ToolPath. Changed position of DoAbsOrInc as per Fanuc 6M M001.12, MPK}
{4/22/96,
Initial: Cin Acr 850SX [D&H] C966.12
Created: Cin Acr 850SX [D&H] C966.12.1
Added a move to home before first tool call, added M26 (Z full up) before all moves to home, corrected OpenMP
sub by adding two lines to output SP, spindle speed, and coolant on for equally spaced multiple parts, removed move to
home at end of program, removed M52 at end of program, MPK}
{5/20/96.
Initial: Cin Acr 850SX [D&H] C966.12.1
Created: Cin Acr 850SX [D&H] C966.12.2
Eliminated tagging from post, now uses Program# instead. Changed remaining SubCall and EndSub commands to
literals of the CMI commmands. Post formerly did not do multiple parts, One Tool all Parts, full up; added support for
this by adding M26 and StrtPos at the end of G92 Mulitple parts subs in the case of equally spaced offsets and M26
with StrtPos after the WFO call for work fixture offsets. IMPORTANT: Multiple parts only works with
workfixture offsets if WFOCS? is true. MPK}
{7/3/96,
Added NotSameToolWFO to FirstOp3b, deleted call to NotSameToolWFO in NoMPs, in NotSameToolWFO
changed change 'H' NewWFO# to CSWFO when IF CahngeCS? is false, put DoCSWFOComment after CSWFO
call in NotSameToolWFO, deleted sequence label before CSWFO in NotSameToolWFO when IF CSWFO is true, MPK}

{7/16/96,
Initial: Cin Acr 850SX [D&H] C966.12.3
Created: Cin Acr 850SX [D&H] C966.12.4
Added ResetCool To DoCool sub and added AND NOT CoolOff? to IF ThruSpin? boolean, MPK}

{2/10/97,
Initial: Cin Acr 850SX [D&H] C966.12.4
Created: Cin Acr 850SX [D&H] C966.12.5
Formatted FeedTapIPR# with format #4, MPK}

{4/21/97
Initial: Cin Acr 850SX [D&H] C966.12.5
Created: Cin Acr 850SX [D&H] C966.15
ForUser: D&H
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: Changed to NoSubs output per Fanuc 6M NoSubs C877.15
Jim Radcliffe}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0'
#5 = '#######0'
#6 = '##.##;0'
#7 = '#;'
#8 = '+####.####;0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(CalcZSurf#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(CS#,5)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,7)
FORMAT(HelixPitch#,8)

{Command Subroutines ****}

AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

IncValueC:
IF AbsValue?
IncValue
END
RETURN

AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN

DoCoolOn:
ResetCool
IF ThruSpin? AND NOT CoolOff?
'M27'
ELSE
CoolOn
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

CSWFO:
'H' ADD# ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1') Num#('0')
RETURN

WFOStuff:
IF WFOCS?
IF FirstOperation? OR NewTool? OR ChangeCS?
CSWFO
END
ClearCSOffset
ELSE
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
'H' ADD# PartNum# Num#('0')
ELSE
IF FirstPart?
'H1'
END
END
ELSE
'H1'
END
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'(MSG, CYCLE START )' EOL
END
RETURN

DoCSComment:
IF AAxisAvail? OR BAxisAvail?
'(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL
END
RETURN

DoCSWFOComment:
IF AAxisAvail? OR BAxisAvail?
'(MSG, ' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# ' )' EOL
END
RETURN

CSComments:
IF FirstOperation? OR NewTool? OR ChangeCS?
DoCSComment
IF WFOCS?
DoCSWFOComment
END
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
'(MSG, PART ' Tag# ' )' EOL
END
IF OperationIDComment?
'(MSG, OPERATION ' Operation# ': ' OperationType$ ' )' 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
CSComments
RETURN

CSAngleA:
IF AAxisAvail?
'A'
IF LessThan? SUB# Recall# Num#('4') CSOffsetA# NUM#('0')
ADD# NUM#('360') SUB# Recall# Num#('4') CSOffsetA#
ELSE
SUB# Recall# Num#('4') CSOffsetA#
END
Save# Num#('4') CSOffsetA#
END
RETURN

CSAngleAC:
IF Flag?('4')
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B'
IF LessThan? SUB# Recall# Num#('5') CSOffsetB# NUM#('0')
ADD# NUM#('360') SUB# Recall# Num#('5') CSOffsetB#
ELSE
SUB# Recall# Num#('5') CSOffsetB#
END
Save# Num#('5') CSOffsetB#
END
RETURN

CSAngleBC:
IF Flag?('5')
CSAngleB
END
RETURN

ChkABMove:
IF NotEqual? Recall# Num#('4') CSOffsetA#
SetFlag('4')
SetFlag('6')
IncValueC
ELSE
IF NotEqual? Recall# Num#('5') CSOffsetB#
SetFlag('5')
SetFlag('6')
IncValueC
END
END
RETURN

ChkClamp:
IF Flag?('6')
SetFlagF('4')
SetFlagF('5')
SetFlagF('6')
'M10'
END
RETURN

PSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
ResetCool
MasterOpF
CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL
PSStuff
NextPS
RETURN

ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN

ExitFeed:
IF FIFO?
FeedEntC
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 'K' HelixPitch#
ELSE
MoveX MoveY ArcIJ
END
ELSE
{ ??? what about incr subs here ??? }
IF XZPlane?
IF YMove?
MoveX MoveY MoveZ ArcIJ 'J' HelixPitch#
ELSE
MoveX MoveZ ArcIJ
END
ELSE { YZPlane }
IF XMove?
MoveX MoveY MoveZ ArcIJ 'I' HelixPitch#
ELSE
MoveY MoveZ ArcIJ
END
END
{ ??? }
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
{CRCOffsetC}
END
RETURN

StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqLabC ckCRC RapidC MoveXYZC ckCRCNum EOL
END
RETURN

StdLine: {enables CRC on first call, .70}
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLabC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLabC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
END
RETURN

StdArc:
ckMove
IF Flag?('9')
SetFlagF('9')
StdLine
ELSE
EACHQuadrant
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
RETURN

ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

EntryMove:
IF FeedEntry?
SeqLabC FeedC ZInC FeedEntC EOL
ELSE
SeqLabC RapidC ZInC EOL
END
RETURN

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqLabC IncValueC EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqLabC FeedC StrtPosC EOL
ELSE
SeqLabC RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqLabC ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
SeqLabC AbsOrIncC ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqLabC
IF FIFO?
Rapid
END
MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF SPXMove? OR SPYMove? OR SPZMove?
SeqLabC MoveSXYZC
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
EOL
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN

ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetFlagF('1') {done flag}
SetFlagF('4') {AChange?}
SetFlagF('5') {BChange?}
SetFlagF('6') {AorBChange?}
SetFlagF('9') {arc handling}
Save# Num#('1') Num#('0') {tools 1st op}
Save# Num#('2') Num#('0') {tools last op}
Save# Num#('3') Num#('0') {ncCAMs last op}
Save# Num#('4') Num#('0') {CSAngleA position}
Save# Num#('5') Num#('0') {CSAngleB 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: may be capital and/or lower case letters. Separate commands with a space.' EOL
END
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('16')
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to Non-WFO style output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('16') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to Non-WFO style output. )' EOL
END
END
END
EachOp
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
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?
'(MSG, OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
END
NextOp
RETURN

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp? OR ChangeCS?
SeqLabC 'M26' EOL
END
DoOpComments
ELSE
DoOpComments
DoPostScript
':?' Plane 'G70' AbsOrInc Rapid EOL
IF ToolChangeAtHome?
SeqLabC 'M26' Home EOL
END
SeqLabC OpToolID ToolChng EOL
END
SeqLabC WFOStuff EOL
CheckPass
SeqLabC ChkABMove CSAngleAC CSAngleBC ChkClamp EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqLabC AbsOrIncC Rapid StrtPos SpeedC EOL
ELSE
SeqLabC AbsOrIncC Rapid StrtPos ZCP1 Speed SpinOn EOL
SeqLabC DoCoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
SeqLabC 'M26' EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC AbsOrIncC Rapid Home EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqLabC 'M26' EOL
END
DoOpComments
ELSE
DoOpComments
DoPostScript
':?' Plane 'G70' AbsOrInc Rapid EOL
SeqLabC OpToolID ToolChng EOL
END
SeqLabC WFOStuff EOL
CheckPass
SeqLabC ChkABMove CSAngleAC CSAngleBC ChkClamp EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqLabC AbsOrIncC Rapid StrtPos SpeedC EOL
ELSE
SeqLabC AbsOrIncC Rapid StrtPos ZCP1 Speed SpinOn EOL
SeqLabC DoCoolOn EOL
END
ELSE
IF SameTool?

{Finish off last Operation}

IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
SeqLabC 'M26' EOL
END
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
END

{Start new Operation}

DoOpComments
DoPostScript
SeqLabC WFOStuff EOL
CheckPass
SeqLabC ChkABMove CSAngleAC CSAngleBC ChkClamp EOL
SeqLabC PlaneC AbsOrIncC Rapid StrtPos
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
ZCP1
END
SpeedC
IF LAST ProgStop?
SpinOn
END
EOL
IF LAST ProgStop?
SeqLabC DoCoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC DoCoolOn EOL
END
END
END
END
END

{ Common Point for All Operations }

ResetCRCNum {call here to reset for each new operation only, call in tool path to reset for each repeat in an operation}
RapidF# {forces the output of a conditional feedrate for each operation}

IF Milling?
SeqLabC ZCP2C EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL
IF NOT FeedConnect?
SeqLabC ZCP2C EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
SeqLabC CRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
NEXTRep
END
END
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
SeqLabC CRCOffC ExitType ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC PlaneC
IF FIFO? AND Dwell? { Bore/Ream with Dwell }
'G89'
ELSE
Cycle
IF Tap?
'G95' { switch to Feed per Revolution units }
END
END
StrtPos
'Z' Sub# Add# ClearancePlane2# Zdepth# CalcZSurf# { Z = tip depth - Top Surface}
'R' CalcZSurf#
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
Peck
IF Peck?
FeedEnt
IF PeckChipBreaker?
'J0'
ELSE
'J1'
END
ELSE
IF RigidTap?
'F' FeedTapIPR#('1') Speed SpinOn 'J1'
ELSE
IF Tap?
'F' FeedTapIPR#('1')
ELSE
FeedEnt
END
END
END
EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC DrillOff
IF RigidTap?
'J0' EOL
SeqLabC 'G94' 'F1.'
ELSE
IF RetractToCP1?
'R' ClearancePlane1#
ELSE
'R' ClearancePlane2#
END
IF Tap?
EOL
SeqLabC 'G94' 'F1.'
END
END
EOL
IF Repeats?
NEXTRep
END
SeqLabC Rapid ZCP3C EOL
END
END
RETURN

FinishLastOp:
SeqLabC 'M26' EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
SeqLabC AbsOrIncC Rapid FirstHome EOL
END
SeqLabC ChkABMove CSAngleAC CSAngleBC ChkClamp EOL
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
ELSE
SeqLabC 'M60' EOL
SeqLabC EOP EOL
END
RETURN

DoToolsOps:
EachOp
IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2')
{Tools1stOp ² op ² ToolsLastOp}
DoOp
END
NextOp
RETURN

NextTools1stOp:
SetNextToolOp Operation#
RETURN

GetToolsOps:
EachOp
IF Equal? Operation# Recall# Num#('1') {if op = Tools1stOp}
IF GreaterThan? NextTools1stOp Recall# Num#('1') {if NextTools1stOp is greater Tools1stOp}
Save# Num#('2') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1}
ELSE {else}
Save# Num#('2') Recall# Num#('3') {ToolsLastOp becomes ncCAMsLastOp}
END
END
NextOp
RETURN

DoTool:
IF NOT Flag?('1')
GetToolsOps
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
DoToolsOps
IncWFO
NextWFO
ELSE
EachPart
TagInc
DoToolsOps
NextPart
END
IF LessThan? Recall# Num#('2') Recall# Num#('3') {if ToolsLastOp < ncCAMsLastOp}
Save# Num#('1') ADD# Recall# Num#('2') Num#('1') {Tools1stOp becomes NextTools1stOp}
ELSE {else}
SetFlag('1') {set DoneFlag}
END
TagInit
END
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoOp
NextOp
FinishLastOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
END
ELSE
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('1') Operation# {ncCAMs1stOp becomes Tools1stOp}
END
IF LastOp?
Save# Num#('3') Operation# {save ncCAMsLastOp}
END
NextOp
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
FinishLastOp
END
END
ELSE
EachOp
DoOp
NextOp
FinishLastOp
END
CloseSub
Post2
IF UseComments?
SetScale('1')
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


Wyszukiwarka

Podobne podstrony:
Cin Acr 850SX Sabre PM689 17 3
Cin Acr 850SX [WI] M700 87m
Cin Acr 850SX [WI] M700 87
Cin Acr 850SX Lancer PM688 17 3
Cin Acr 850SX [AP] MW67 12m
Cin Acr 850SX [WI] M598 89
Cin Acr 850SX Sab HMT M856 10 1
Cin Acr 850SX [LBS] MU11 87
Cin Acr 850SX [D&H] C966 12 5

więcej podobnych podstron