Fadal [INS] D452 14 3


{
MILL=F
LATHE=T
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=F
SUBS=F
MILLTURN_POLAR-SEG=F
MILLTURN_Y-AXIS=F
METRIC=F
}

{Change Comments ***********************************************************}

{Changed max RPM from 10000 to 15000 JR 6/5/89}

{8/17/89
Copied & modified; Fadal [CRC at CP2] M111.57, for Cinima Products.
Added SepSub stuff.
Jim Radcliffe}

{9/29/89
Modified: Fadal (w/SepSub) M189.61
For: Gibbs & Associates
Change subroutine #'s to begin with 'L100', and increment by 100.
change "NewProg" to "TagInc"
change "SubIDF" to "'L' Tag# '00'"
Change subroutine calls to 'L1nn' where nn is Repeats for 'L100'.
change "CallLab" to "'L' Tag#"
Add PostScript.
Jim Radcliffe}

{1/5/90
Updated: Fadal (w/SepSub) M189.63, to .69 format.
Jim Radcliffe}

{3/23/90, changed G to E in WFOStuff sub, 15000 max RPM, JR}

{5/9/90, Updated to Version 3.2 per Fanuc 6M M001.72 Format, DWB}

{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}

{8/24/90
Copied & modified: Fadal (w/SepSub) M189.73
For: Gibbs & Associates
Machine: Unknown
Control: Fadal
Updated to Version 3.2 per Fanuc 6M M001.76.1 Format.
Corrected AutoCycle SP and EP Status Record errors.
DWB}

{9/24/90,
Changed Coolant On from 'M7' to 'M8' in the Commands 3 Dialog of the Form as requested by Pete.
DWB}

{08/22/91
Updated: Fadal (w/M8) M175.76.2
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
Per Request: (Inspirnetics)
Moved the literal 'E0' line before ProgStop and ToolChange.
Changed FeedRateC to FeedRate in Milling sub.
Kim Michelman}

{8/30/91
Modified: Fadal [INS] M452.80
For: Inspirnetics
Changed 'F50.' to RapidF
Changed FeedRate to FeedRateC in Milling sub.
Jim Radcliffe}

{4/29/93
Modified: Fadal [INS] M452.81
For: Inspirnetics
Updated to .81.2 format
Changed from a CRCatCP2 format to turn CRCOn after ZIn per M003.
Deleted CRCOffsetC, wasnt being used.
Changed to unconditional IJ format in arcs to get same output.
Jim Radcliffe}

{* 11/3/93 [cwh]
Modeified: Fadal [INS] M452.81.2
To: Fadal [INS] M452.81.3
For: Gibbs and Associates

Modified the form so that it could be used with the 32MP and 32MPOL
versions of Catalyst ( Virtual ).
*}

{1/17/96, Updated .85 to .86 version, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}

{1/22/97
Initial: Fadal [INS] D452.12
Created: Fadal [INS] D452.14
ForUser: Inspirnetics
Develop: ComPost2 MSL 68K, Virtual Gibbs 3.23
Comment: Modified per marked up readout from Randy.
Updated to .14 format per:
Fanuc 6M (NW) D001.14
Fadal Format 1 (NW) D610.12
CNCVIS1 M610.89
Deleted CRCOffsetC, wasnt being used. ( Some how this got put back in !? )
Added missing prog formatter for SUB#.
Deleted prog formatter for RapidF#, it was not being used!
Changed SeqLabC to SeqLab 5 places.
Change G28 to OfstOff wich outputs Z0H0.
Moved WFOStuff to StrtPos Line.
Jim Radcliffe}

{16May97
Original: Fadal [INS] D452.14
Created: Fadal [INS] D452.14.1
For: Inspirnetics
Changes made per: Randy
Moved 'X0Y0Z0E0H0' from EndOp3 to EndOp2 before ToolChng.
Added an EachOp NextOp loop to ProgStart to check if the same tool is used for each operation.
Modified End2 to output Untool and ToolChng only if more than one tool is used.
Charles Winston}

{7/24/98,
Initial : Fadal [INS] D452.14.1
Created: Fadal [INS] D452.14.2
Customer: Inspirnetics, Randy - 909/941-2004

Changes to "Form":

1. Under Movement, changed Rapid Feed Rate to 0

Changes to "Prog":

1. Added RapidF# to NewTool to reset the feedrate status register. Also added
Format #8 and FORMAT for RapidF#.
2. Under EntryMove sub, added a check for SameTool? and added C to FeedEnt.
3. Under ZonlyRep sub, added a check for FirstCycle? and
if equal ContourFeed2# to FeedEntry#added. Also added C to FeedEnt.
JHE}

{1Feb99
Original: Fadal [INS] D452.14.3
Created: Fadal [INS] D452.14.2
For: Inspirnetics
Changes made per: Randy
Develop: Catalyst 5.03/ComPost2 1.7b15
Added Post Header Comment at the top of Prog.
Added Formatting for ArcR# in Prog Numeric Format Definitions.
Changed ArcRC to 'R0' ArcR# in FormatArc
Charles Winston}

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

#1 = '#.00'
#2 = '####.###;0.'
#3 = '*####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####.###;0.'
#7 = '00'
#8 = '#' {Added for RapidF - JHE}

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SUB#,2)
FORMAT(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(ArcR#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(Recall#,7)
FORMAT(CSSubID#,7)
FORMAT(CallMasterNum#,7)
FORMAT(RapidF#,8) {Added - JHE}

{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

MPESWFO: { MultipleParts EquallySpaced }
'E' ADD# PartNum# SUB# NewWFO# Num#('1')
RETURN

WFO:
'E' ADD# PartNum# Num#('0')
RETURN

WFONum:
'E' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
ELSE
IF Flag?('2')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO
ELSE
MPESWFO
END
ELSE
WFONum
END
END
END
END
SetFlagF('2')
RETURN

DoSubComment:
IF UseComments? AND SubComment?
SeqLab '* SUB NUMBER: ' Program# EOL
END
RETURN

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

OffsetComments:
IF ChangeCS?
DoCSComment
ELSE
IF NOT SameTool?
DoCSComment
END
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLab '* OPERATION ' Operation# ': ' OperationType$ EOL
END
IF OperationComment?
SeqLab '* ' OperationComment$ EOL
END
IF WorkGroupComment?
SeqLab '* ' WorkGroupComment$ EOL
END
IF ToolTypeComment?
SeqLab '* TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL
END
IF ToolComment?
SeqLab '* ' ToolComment$ EOL
END
RestoreScale
END
OffsetComments
RETURN

CSAngleA:
IF AAxisAvail?
'A'
IF FirstOperation?
IF LessThan? CSOffsetA# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetA# LAST CSOffsetA#
'-'
END
END
Save# Num#('1') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('1') SUB# Recall# Num#('1') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('1') Num#('360')
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B'
IF FirstOperation?
IF LessThan? CSOffsetB# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetB# LAST CSOffsetB#
'-'
END
END
Save# Num#('1') TRUNC# DIV# CSOffsetB# Num#('360')
IF LessThan? CSOffsetB# Num#('0')
Save# Num#('1') SUB# Recall# Num#('1') Num#('1')
END
SUB# CSOffsetB# MUL# Recall# Num#('1') Num#('360')
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLab 'A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLab 'A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLab 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLab 'B' FifthDegree# EOL
FifthCCWF
END
RETURN

DoPostScript:
PSInit
EachPS
SeqLab PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
IF SameTool? {Added this check - JHE}
SeqLab Feed ZIn FeedEntC EOL {Added C to FeedEnt - JHE}
ELSE
SeqLab Feed ZIn FeedEnt EOL
END
ELSE
SeqLab RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
SeqLab SubIDF EOL
DoSubComment
RETURN

SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqLab '* WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
RETURN

StdSub:
Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops }
EachRep
Save# Num#('10') ADD# Recall# Num#('10') Num#('1')
IF GreaterThan? Recall# Num#('10') Num#('99')
SeqLab CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextRep
SeqLab CallLab Recall# Num#('10') EOL
StartSub
RETURN

FinishSub1: {part 1}
SeqLab CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
SeqLab Preset ShiftR EOL
SeqLab EndSub EOL
CloseSub
SeqLab Preset UnshiftR EOL
RETURN

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
SeqLab Rapid StrtPos SetWFO EOL
SeqLab CallLab OnePart EOL
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
SeqLab Rapid StrtPos SetWFO EOL
SeqLab CallLab OnePart EOL
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops }
EachPart
Save# Num#('10') ADD# Recall# Num#('10') Num#('1')
IF GreaterThan? Recall# Num#('10') Num#('99')
SeqLab CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextPart
SeqLab CallLab Recall# Num#('10') EOL
IF ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLab EndSub EOL
CloseSub
ELSE
SeqLab Preset ShiftP EOL
SeqLab EndSub EOL
CloseSub
SeqLab Preset UnshiftP EOL
END
RETURN

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqLab AbsValue EOL
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJ
ELSE
'R0' ArcR#
END
RETURN

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

ckCRCNum:
IF LastFeat?
ELSE
IF Equal? SPZ# EPZ#
{This processor does not use CRCOffsetC}
END
END
RETURN

ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLab MoveSXYC EOL
SeqLab CallLab RepOnce EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLab DoDrillAbsOrInc MoveSXYZC EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLab DoAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLab DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab DoAbsOrInc ckCRC FormatArc ArcFeedC ckCRCNum EOL
DecelMove2
END
SeqLab DoAbsOrInc ckCRC FormatArc DecelFeed ckCRCNum EOL
ELSE
SeqLab DoAbsOrInc ckCRC FormatArc ArcFeedC ckCRCNum EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLab IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
SeqLab AbsOrInc CRCOffC EOL {.69 removed RapidC}
ELSE
IF FIFO? {.81}
SeqLab AbsOrInc CRCOffC FeedC ZCP2 FeedEntC EOL
ELSE
SeqLab AbsOrInc CRCOffC RapidC CRCOffC ZCP2 EOL
END
END
SeqLab EndSub 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?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
SeqLab AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLab Feed IncValue StrtPosC EOL
SeqLab AbsOrInc
ELSE
SeqLab Feed
END
ELSE
SeqLab Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLab Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLab AbsOrInc ZCP2PlusInc EOL
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLab Rapid ZCP2PlusInc EOL
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLab CallLab RepOnce EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLab Feed ZCP2 FeedEnt EOL
ELSE
SeqLab Rapid ZCP2 EOL
END
END
SeqLab EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLab Connect StrtPos EOL
END
IF FeedConnect?
IF FirstCycle? {Added this check - JHE}
SeqLab FeedC ZInPlusInc FeedEnt EOL
ELSE
IF Equal? ContourFeed2# FeedEntry# {Added this check - JHE}
SeqLab FeedC ZInPlusInc FeedEntC EOL {Added C to FeedEnt - JHE}
ELSE
SeqLab FeedC ZInPlusInc FeedEnt EOL
END
END
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLab RapidC ZCP2PlusIncC EOL
END
IF FirstCycle? {Added this check - JHE}
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
IF Equal? ContourFeed2# FeedEntry# {Added this check - JHE}
SeqLab Feed ZInPlusInc FeedEntC EOL {Added C to FeedEnt - JHE}
ELSE
SeqLab Feed ZInPlusInc FeedEnt EOL
END
END
ELSE
SeqLab RapidC ZInPlusInc EOL
END
END
SeqLab CallLab RepOnce EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLab EndSub EOL
CloseSub
RETURN

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

SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN

OpGuts:
IF Milling?
SeqLab ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
SetFlag('1') { Milling ZShiftOnly SepSubs }
ZonlyRep
SetFlagF('1')
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?
SeqLab ZCP3C EOL
ELSE
IF FIFO?
SeqLab FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqLab RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLab AbsOrInc Rapid StrtPos EOL
END
SeqLab DrillCP EOL
GetCycle
SeqLab
IF Tap? AND OptCyc1?
'G84.1'
ELSE
Cycle
END
StrtPos ZDepth RLevel Dwell Peck Retract
IF Tap?
FadalTapF FadalTapQ
ELSE
FeedEnt
END
EOL
IF CallMasterOp?
SeqLab CallLabB CallMasterNum# RepOnce EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLab CallLab RepOnce EOL
StartSub
ToolPath
SeqLab EndSub EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLab 'G80' EOL
SeqLab RapidC ZCP3C EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('15000')
SetMaxFeed('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlag('3') { True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP }
SetFlag('4') { True = toggle between incrementing/decrementing WFO's }
Save# Num#('1') Num#('0') { CSAngleA and CSAngleB }
Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the ncPost multiple part 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
END
EachOp
IF FirstOperation?
Save# Num#('20') Tool#
Save# Num#('21') Num#('0')
END
IF NOT Equal? Recall# Num#('20') Tool# { Checks to see if the same tool is used for each op }
Save# Num#('21') Num#('1')
END
NextOp
RETURN

InitOp:
EOR EOL
SeqLab 'O' Program#
IF UseComments? AND ProgramNameComment?
'*' ProgramName$
END
EOL
SetProgNum('0')
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramComment?
SeqLab '* ' ProgramComment$ EOL
END
IF FormatNameComment?
SeqLab '* FORMAT: ' FormatName$ EOL
END
IF TimeComment?
SeqLab '* ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
SeqLab '* OUTPUT IN ' MoveType$ ' INCHES' EOL
END
IF PartsComment?
SeqLab '* PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqLab '* FIRST TOOL IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
DoOpComments
DoPostScript
RETURN

FirstOp2:
SeqLab Speed SpinOn EOL
CheckPass
SeqLab AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
RETURN

FirstOp3:
SeqLab OfstOn EOL
SeqLab CoolOn EOL
RETURN

NewToolOp1:
SeqLab CoolOff SpinOff EOL
SeqLab OfstOff EOL
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLab Rapid Home EOL
END
IF LAST ProgStop?
SeqLab 'M0' EOL
ELSE
SeqLab ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
RapidF# {Added, no output, reset feedrate - JHE}
SeqLab OpToolID EOL
SeqLab ToolChng EOL
DoOpComments
DoPostScript
RETURN

NewToolOp4:
SeqLab Speed SpinOn EOL
CheckPass
SeqLab AbsOrInc Plane Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
RETURN

NewToolOp5:
SeqLab OfstOn EOL
SeqLab CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLab CoolOff SpinOff EOL
SeqLab OfstOff EOL
SeqLab 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLab CoolOff EOL
END
IF NewToolOffset? OR ChangeCS?
SeqLab OfstOff EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqLab Speed SpinOn EOL
SeqLab AbsOrInc PlaneC Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
SeqLab OfstOn EOL
SeqLab CoolOn EOL
ELSE
SeqLab AbsOrInc PlaneC Rapid StrtPos CSAngleA CSAngleB SpeedC WFOStuff EOL
IF NewToolOffset? OR ChangeCS?
SeqLab OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLab CoolOn EOL
END
END
RETURN

End1:
SeqLab CoolOff SpinOff EOL
SeqLab OfstOff EOL
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqLab Rapid FirstHome EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqLab
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
SeqLab Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF LAST ProgStop?
SeqLab 'M0' EOL
ELSE
SeqLab ProgStop EOL
END
SeqLab 'X0Y0Z0E0H0' EOL
IF NOT Equal? Recall# Num#('21') Num#('0')
SeqLab UnTool EOL
SeqLab ToolChng EOL
END
RETURN

End3:
SeqLab EOP EOL
EndSubs
CloseSub
Post2 {organize Subs into one program}
EOR EOL
'BYE' EOL
Close
ReSeq
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
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
OpenMP
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5
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
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
FirstOp1
OpenMP
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
OpenMP
NewToolOp4
NewToolOp5
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}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2')
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
OpenMP
FirstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5
OpenMP
NewToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseMP {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('2') { WFOStuff }
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
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:
Fadal [INS] PM452 17 6
Fadal Format 1 [MD] CV25 14 1
T 14
Rzym 5 w 12,14 CZY WIERZYSZ EWOLUCJI
ustawa o umowach miedzynarodowych 14 00
990425 14
foto (14)
Fadal Format 2 (AC) B807 12
DGP 14 rachunkowosc i audyt

więcej podobnych podstron