{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=T
SUBS=F
MILLTURN_Y-AXIS=F
METRIC=F
}
{5/24/93
created initial NoSubs Processor to .81 format
FIFO stuff not supported
variables: 1 = tools 1st op; 2 = tools last op; 3 = ncCAMs last op
Jim Radcliffe}
{7/29/93, v.81.1, added FIFO handling, JR}
{8/3/93, v.81.2, SameTool WFO, RapidF#, additional FIFO handling, JR}
{9/12/95, v.81.3, FIFO? queries changed to ExitType & ExitFeed calls, WFO MultipleParts, JR}
{5/8/96, v.89, Return to the StrtPos before next iteration of CutAutoCycle Repeats ZshiftOnly, JR}
{6/4/96, v.89.1, minor corrections SeqC, CRCOff & SameTool, JR}
{3/14/97
Initial: Fanuc 6M NoSubs M877.89.1
Created: Fanuc 6M NoSubs D877.15
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.31 PPC
Comment: Created Advanced Mill version of this popular NoSubs processor!
Maintained the .89 prog format to simplify creating.
Do not know if we can use the .15 prog format with NoSubs output!
Cannot use Toggling WFO Multiple Parts!
Jim Radcliffe}
{4/17/97
Initial: Fanuc 6M NoSubs D877.15
Created: Fanuc 6M NoSubs C877.15
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: Creted C style Advanced Mill Processor.
Jim Radcliffe}
{4/17/97
Initial: Form: K & T 800 Gem D17 M186.87
Initial: Prog: Fanuc 6M NoSubs C877.15
Created: K&T Gemini D MM180 Cxxx.15
ForUser: Belfort Instrument
Control: K&T Gemini D
Machine: K&T MM180
Develop: CatalystPPC v3.33C, ComPost2 68K 1.0b11
Comment: New processor per marked up readout and conversation with Ed Gerczak
Jim Radcliffe}
{15Sep97
Original: K&T Gemini D MM180 LH CY81.15
Created: K&T Gemini D MM180 LH CY81.15.1
For: Belfort Instrument
Changes made per: Ed Gerczak
Deleted old version numbers and comments e.g. {.62}, {commands}, {literals}, etc
Added Formats for ArcZRads# & MUL# at Prog Numeric Format Definitions
Reversed Clockwise to Anti-Clockwise direction for B-Axis output
when using a Horizontal 4-Axis MDD with Y+ve selected in the 4th axis setup. (as per customers request)
Added 'ULF' Literal and PartName$ comment to UseComments in ProgStart.
Added line tagging commands and '/' literal to ProgStart
Note: The first and only the first T word must have a Block Skip or this control will alarm out.
Added 'M40' to all G84 Tap Canned Cycs. in DoOp at FirstOperation and NewTool
Deleted CSAngleB from SameTool to prevent indexer output except in FirstOP and NewTool
Added ReTag at End of Prog
Changed EOR to M2 in MachSpec
Charles Winston}
{09/08/98,
Initial: K&T Gemini D MM180 LH CY81.15.1
Created: K&T Gemini D LH [GD] Dxxx.15
For: General Dynamics
Changes to Form:
1) Program Stops - Changed End Program to M30.
2) Spindle & Coolant - Changed Max Spindle speed to 8000.
Changes to Prog:
1) Changed to a 'D' style post.
2) FirstOperation - Deleted Block Delete in front of the first T word.
3) SameTool - Added CSAngleB to SameTool.
4) Commented out CSAngleA. Machine does not use a-axis rotation.
5) ProgStart/DoOp - Changed all TrackZ# Num#('20') to TrackZ# TCZ#. This
is to allow the customer to input Z values through Utility Data.
6) ProgStart - Added SetMaxRPM('8000')
CDH}
{09/15/98,
Initial: K&T Gemini D LH [GD] DU83.15
Created: K&T Gemini D LH [GD] DU83.15.1
For: General Dynamics
Changes to Prog:
1) CSAngleB - Changed to use the formula from CY81 instead of CNCVIS1 B610.15
2) WFOStuff - Will only output H1 instead of 'H1' WfoNum#
3) DoOp/IF Milling - Modified output when doing repeats and NOT FeedConnect.
CDH}
{09/16/98,
Initial: K&T Gemini D LH [GD] DU83.15.1
Created: K&T Gemini D LH [GD] DU83.15.2
For: General Dynamics
Changes to Prog:
1) Comments - Added (MSG, to all comments. Added (NAM, to Program name
comment.
2) Fixed Sequence number being output on a comment line.
3) ProgStart - Deleted all Tag info.
4) WFO - Changed G45 to G48.
CDH}
{13 Oct98
Original: K&T Gemini D LH [GD] DU83.15.2
Created: K&T Gemini D LH [GD] DU83.15.3
For: General Dynamics
Changes made per: Pat Rosemellia
Added Post Header Comment at the top of Prog.
Added default formatting for D and P in MachSpec
Moved M6 before Op comments in FirstOperation and NewTool
Added Rapid CRCOff 'G70G94' before ToolChng in FirstOperation and NewTool
Enabled Tool Length Offset 'P' to be output
Added CRC Numbers to be output on all lines with CRCOn
Added Flag('2') to control CRCOffC
Added tracking for CRCOff to enable 'D0' on all lines where CRCOff is called.
Added Literal 'H0P0D0' at end of Prog
Added Booleans to suppress Pretooling on the Last ToolChange and where only one tool is used.
Charles Winston}
{15 Oct98
Original: K&T Gemini D LH [GD] DU83.15.3
Created: K&T Gemini D [GD] NDU83.15.4
For: General Dynamics
Changes made per: Pat Rosemellia
{*** NOTE ***}
Because the user is specifying the TCZ value, this may not always going to be safe
in NewTool or, in SameTool, where ProgStop OR NewToolOffset OR CSChanges are TRUE.
Virtual calculates the safe Clearance Plane for indexing: This post only outputs the TCZ value.
To ensure the Tool Clears the Part, the post will output TCZ or ZCP3, whichever is the greater,
and will output a warning telling the user the amount he needs to increase the TCZ, to be safe.
Added Formatting for ClearancePlane3# in Prog Numeric Format Definitions
Added OutputTCZ in NewTool, SameTool and End of Prog to ensure TCZ is above ZCP3
Added Num#('5') in ProgStart and OpGuts to track ZCP3
Added ResetCRCNum in ckCRCNum to force the CRCNum to be re-output
Added doCRCOffC Sub to output 'D0' with CRCOff
Moved OffstOn from Drill Stuff to The Common Point for Milling and FirstOperation and NewTool for Drilling
Changed Plane 'G40G70' AbsOrInc 'G80G94' to Plane CRCOff 'G70' DrillOff AbsOrInc 'G94' in FirstOperation
Moved ToolChange above DoOpComments in FirstOperation and NewTool
Charles Winston}
{26 Oct98
Original: K&T Gemini D [GD] NDU83.15.4
Created: K&T Gemini D [GD] NDU83.15.5
For: General Dynamics
Changes made per: Pat Rosemellia
Added a Boolean to suppress the CSComment$ when SubComment is FALSE
Added Num#('9') to store the current CSOffsetB# in CSAngleB
Deleted 'N1' for first Tool and changed to Seq. It was causing Sequence numbers to be out of sync.
Added RapidF to all < WFOStuff CSAngleB > lines in FirstOperation and NewTool
Moved Rapid PlaneC CRCOff 'G70' AbsOrInc 'G94' line after the Operation comments in NewTool.
Added a Boolean to suppress OfstOn with SameTool at the start of the Common Point.
Added code to return the Indexer to the ZERO INDEX position, via the shortest rotation, in FinishLastOP.
Added SpinOff at NewTool in SameTool at ProgStop.
Added Utility Data Instructions at InitProg.
Charles Winston}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,3)
FORMAT(SUB#,2)
FORMAT(MUL#,2)
FORMAT(Recall#,3)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackZ#,4)
FORMAT(TrackZNO#,4)
FORMAT(ArcZRads#,4)
FORMAT(TCZ#,4)
FORMAT(ClearancePlane3#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(RapidF#,5)
{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
WFO:
'G48H' ADD# PartNum# Num#('0')
RETURN
WFONum:
'G48H1'
RETURN
WFOStuff:
IF MultipleParts? AND WorkFixtureOffsets?
WFO
ELSE
IF NewWFO?
WFONum
ELSE
IF NOT SameTool?
IF NeedWFO1?
WFONum
END
END
END
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
'(MSG, CYCLE START )' EOL
END
RETURN
DoCSComment:
IF AAxisAvail? OR BAxisAvail?
IF UseComments? AND SubComment?
'(MSG, CS#' CS# ' - ' CSComment$ ' )' EOL
END
END
RETURN
CSComments:
IF FirstOperation? OR NewTool? OR ChangeCS?
DoCSComment
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'
Save# Num#('4') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('4') SUB# Recall# Num#('4') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('4') Num#('360')
END }
RETURN
CSAngleAC:
IF AChange?
CSAngleA
END
RETURN
CSAngleB:
IF BAxisAvail?
'B'
IF FirstOperation?
IF GreaterThan? CSOffsetB# Num#('0')
'-'
END
ELSE
IF GreaterThan? CSOffsetB# LAST CSOffsetB#
'-'
END
END
IF LessThan? Num#('0') CSOffsetB#
SUB# Num#('360') CSOffsetB#
Save# Num#('9') SUB# Num#('360') CSOffsetB#
ELSE
MUL# CSOffsetB# Num#('-1')
Save# Num#('9') MUL# CSOffsetB# Num#('-1')
END
END
RETURN
CSAngleBC:
IF BChange?
CSAngleB
END
RETURN
AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN
IncValueC:
IF AbsValue?
IncValue
END
RETURN
AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN
PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN
DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN
ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN
ExitFeed:
IF FIFO?
FeedEntC
ELSE
RapidFC
END
RETURN
FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
IF XYPlane?
MoveXY
IF ZMove?
MoveZ ArcIJ 'K' ArcZRads#
ELSE
ArcIJ
END
ELSE
IF XZPlane?
MoveX
IF YMove?
MoveY MoveZ ArcIJ 'J' ArcZRads#
ELSE
MoveZ ArcIJ
END
ELSE { YZPlane }
IF XMove?
MoveX MoveY MoveZ ArcIJ 'I' ArcZRads#
ELSE
MoveY MoveZ ArcIJ
END
END
END
RETURN
doCRCOffC:
CRCOffC
IF NOT EmptyLine?
SetFlag('2')
END
RETURN
ckCRC:
IF LastFeat?
doCRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN
ckCRCNum:
IF Flag?('2')
'D0'
ResetCRCNum
SetFlagF('2')
ELSE
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
END
RETURN
StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC RapidC MoveXYZC RapidFC ckCRCNum EOL
END
RETURN
StdLine: {enables CRC on first call, .70}
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqC ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqC ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
END
RETURN
StdArc:
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
NEXTQuadrant
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?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC RapidC ZInC RapidFC EOL
END
RETURN
CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqC FeedC StrtPosC EOL
ELSE
SeqC RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
SeqC doCRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP2
END
ExitFeed ckCRCNum EOL
NextRep
ELSE
EntryMove
ToolPath2
END
SeqC doCRCOffC AbsOrInc ExitType ZCP2 ExitFeed ckCRCNum EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
SeqC
IF FIFO?
Rapid
END
MoveSXYC
IF FIFO?
RapidF
END
EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF RetractToCP1? AND NOT FirstFeat?
SeqC DrillOff EOL
SeqC Rapid ZCP1 RapidF EOL
SeqC Cycle MoveSXYZC RLevel Peck FeedEnt EOL
ELSE
SeqC MoveSXYZC EOL
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN
DrillStuff:
GetCycle
Cycle StrtPos ZDepth RLevel Peck FeedEnt
TrackZNO# FIRST SPZ# {.81.2}
RETURN
CycleStartPos:
IF Milling?
PlaneC Rapid StrtPos RapidF
ELSE
DrillStuff
END
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
OutputTCZ:
IF LessThan? TCZ# Recall# Num#('5')
SeqC '(MSG, *** WARNING *** )' EOL
SeqC '(MSG, The Tool Change Z value ( ' TCZ# ' ) is below the Exit Clearance Plane by ' Sub# ClearancePlane3# TCZ# ' Inches )' EOL
SeqC '(MSG, Please increase the Tool Change Z value. The Post processor has output Z = ' ClearancePlane3# ' )' EOL
SeqC Rapid 'Z' TrackZ# ClearancePlane3# 'M25' RapidF EOL
ELSE
SeqC Rapid 'Z' TrackZ# TCZ# 'M25' RapidF EOL
END
RETURN
ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('8000')
SetFlagF('1') {done flag}
SetFlagF('2') {CRCOffC Flag}
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 and CSAngleB }
Save# Num#('5') Num#('0') { Used to test TCZ# }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the multiple part work fixture offset option.' 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
' ' EOL
' Using the TCZ() PostScript Command' EOL
' ' EOL
' This post has been set up to allow the operator to enter the Tool Change Z Position.' EOL
' The Command TCZ(x) should be entered in the Operation Data, At Op Start Box.' EOL
' The Value, X, can be any positive or negative number.' EOL
' The Post processor will output a warning if x is below the operation exit clearance plane.' EOL
END
EachOp
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'(NAM, 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
IF ProgramNameComment?
'(MSG, ' PartName$ ' )' EOL
END
END
OpenSub
RestoreScale
SeqC Plane CRCOff 'G70' DrillOff AbsOrInc 'G94' EOL
DoPostScript
SeqC Rapid 'Z' TrackZ# TCZ# 'M25' RapidF EOL
Seq OpToolID EOL
IF ToolChangeAtHome?
SeqC Home 'M25' EOL
END
END
NextOp
RETURN
DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC RapidC
SeqC Rapid 'Z' TrackZ# TCZ# 'M25' RapidF EOL
END
DoOpComments
SeqC WFOStuff CSAngleA CSAngleB RapidF EOL
ELSE
SeqC ToolChng EOL
DoOpComments
SeqC WFOStuff CSAngleA CSAngleB RapidF EOL
IF NOT LastTool?
SeqC PreTool EOL
END
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC CycleStartPos EOL
ELSE
SeqC CycleStartPos Speed SpinOn CoolOn
IF Tap?
'M40'
END
IF Drilling?
OfstOn
END
EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
SeqC CoolOff EOL
OutputTCZ
DoEndOpPS
IF ToolChangeAtHome?
SeqC Home 'M25' EOL
END
SeqC SpinOff EOL
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
END
{Start new Operation}
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC CoolOff EOL
SeqC Rapid 'Z' TrackZ# TCZ# 'M25' RapidF EOL
END
DoOpComments
SeqC WFOStuff CSAngleA CSAngleB RapidF EOL
ELSE
Seq ToolChng EOL
DoOpComments
DoPostScript
SeqC Rapid PlaneC CRCOff 'G70' AbsOrInc 'G94' EOL
SeqC WFOStuff CSAngleA CSAngleB RapidF EOL
IF NOT LastTool?
SeqC PreTool EOL
END
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
SeqC CycleStartPos EOL
ELSE
SeqC CycleStartPos Speed SpinOn CoolOn
IF Tap?
'M40'
END
IF Drilling?
OfstOn
END
EOL
END
ELSE
IF SameTool?
{Finish off last Operation}
IF LAST ProgStop?
SeqC CoolOff EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
END
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
OutputTCZ
END
DoEndOpPS
IF LAST ProgStop?
SeqC SpinOff EOL
SeqC 'M0' EOL
END
{Start new Operation}
DoOpComments
DoPostScript
SeqC WFOStuff CSAngleAC CSAngleBC EOL
CheckPass
SeqC CycleStartPos SpeedC
IF LAST ProgStop?
SpinOn
END
IF LAST ProgStop?
CoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
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}
IF Milling?
SeqC ZCP2C
IF NOT SameTool?
OfstOn
END
EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
IF NOT FeedConnect?
SeqC 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
SeqC doCRCOffC
IF NOT FeedConnect?
ExitType 'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2# ExitFeed ckCRCNum
END
EOL
NEXTRep
END
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
SeqC doCRCOffC ExitType ZCP3C ExitFeed ckCRCNum EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC DrillStuff EOL
END
END
ToolPath
SeqC DrillOff EOL
SeqC Rapid ZCP3 RapidF EOL
IF Repeats?
NEXTRep
END
SeqC RapidC ZCP3C EOL
END
END
Save# Num#('5') ClearancePlane3# { Stores ZCP3 to check it against TCZ# }
RETURN
FinishLastOp:
SeqC CoolOff EOL
OutputTCZ
DoEndOpPS
IF ToolChangeAtHome?
SeqC FirstHome 'M25' EOL
END
SeqC SpinOff EOL
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END
ELSE
SeqC 'H0P0D0'
IF NOT Equal? Recall# Num#('9') Num#('0') { If not at 0 deg, Output the SHORTEST rotation to return to Zero }
'B'
IF LessThan? Abs# Recall# Num#('9') Num#('180')
'-0'
ELSE
'0'
END
END
RapidF EOL
SeqC 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?
'( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
EOR EOL
Close
ReTag
Wyszukiwarka
Podobne podstrony:
G & L 800 15HS [GD] NDT35 15 4G & L Num 8000H [GD] NDT14 15 6K&T Gemini D MM180 LH CY81 15 1K&T Gemini D MM180 LH CY81 15 115 315Program wykładu Fizyka II 14 1515 zabtechnŁódzkiego z311[15] Z1 01 Wykonywanie pomiarów warsztatowychwięcej podobnych podstron