{
MILL=T
LATHE=F
SIMPLE_ROT_POS=T
ROTARY_MILL=T
ADV_MILL=F
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}
{Change Comments ***********************************************************}
{12/17/96
Updated: CNCVIS1 M610.89
Created: CNCVIS1 M610.89.1
For: Arobotek
Versions: Catalyst v3.23C/Compost 4.21.37/v1.0b1
Changes made per Jim Radcliff.
Updated for Catalyst v3.20C per Fanuc 6M M001.89a Format
Added M001.14 source.
Changed FORMAT#2 from ###.###;0. to #####.###;0. at Prog Numeric Format Definitions.
Changed FORMAT#3 from *###.###;0. to *#####.###;0. at Prog Numeric Format Definitions.
Deleted version comments.
Added NOT LastFeat? AND Equal? SPZ# EPZ# condition at ckCRCNum sub.
Moved contents of StdLine back to ToolPath LineFeat.
Modified WorkFixtureOffset logic.
Added Flag(2) for WFOStuff at setup and initializations.
Added SetFlag(2) for EquallySpacedOffsets at OpenMP sub.
Added WFONum sub.
Rewrote logic at WFOStuff sub.
Added EOL to NewWFO MP WFOStuff sub Warning.
Deleted SeqLab and EOL at WFOStuff sub.
Added Flag(2) logic at start of EachOp/NextOp Loop.
Moved WFOStuff after MP-OTAP-FU condition at FirstOperation and NewTool.
Added WFOStuff for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added AbsOrInc Rapid to StrtPos block for MP-OTAP-ECP condition at FirstOperation and NewTool.
Added SeqLab and EOL at WFOStuff calls at GetStartOfSameTool, FirstOperation and NewTool.
Added SetMaxFeed(12700) for Metric VNC files.
Moved Speed SpinOn after MP-OTAP-FU condition at FirstOperation and NewTool.
Added Speed SpinOn for MP-OTAP-ECP condition at FirstOperation and NewTool.
DWB}
{4/11/97
Updated: CNCVIS1 M610.89.1
Created: CNCVIS1 M610.15
For: Gibbs & Associates/Precision Products
Versions: Catalyst v3.33C/ComPost2 MSL 68K
Changes made per Pete Jackson/David Davis of Precision Products
Updated for Catalyst v3.33C per Fanuc 6M M001.15 Format
Added Flag(5) to Suppress Redundant WFO for MultipleParts WorkFixtureOffsets programs.
Only concerns OneToolAllParts ExitClearancePlane situations.
Corrected problem with output of literal 'G8' block at ToolPath.
Deleted IF NOT Rapid? and IF LAST Rapid? Booleans.
IF LAST Rapid? Boolean was causing post to output extra EntryFeedRates during Toolpath.
IF LAST Rapid? Boolean is an incorrect use of a non-ToolPath command.
Developers original intent on 2/16/93 to block on FIRST LineFeat OR ArcFeat following RapidFeat
condition was not working as intended.
When I changed IF LAST Rapid? to IF LAST RapidFeat, the post output more 'G9' blocks and
extra EntryFeedRate problem disappeared.
Left IF FirstFeat? boolean in place.
This caused no difference in occurance of G8 blocks.
DWB}
{5/16/97,
Initial: CNCVIS1 M610.15
Created: CNCVIS1 M610.15.1
Changed FadalTapF to 'F' SpeedRPM#, FadalTapF was erroneously being scaled when posting
metric parts, MPK}
{2/27/98,
Initial: CNCVIS1 M610.15.1
Created: CNCVIS1 M610.15.2
Re-FORMATed SpeedRPM# so that it will output with a decimal.
CDH}
{6/15/98,
Initial : CNCVIS1 M610.15.2
Created: CNCVIS1 M610.15.3
Customer: Gibbs & Associates
Changes to "Prog":
1. Added G20 (inch output) block to be the first block in the main program.
JHE}
{08/17/98,
Initial: CNCVIS1 M610.15.3
Created: CNCVIS1 M610.15.4
Changes to Prog:
1) OpGuts - Corrected bad Tapping output.
** For future reference: All Fadal Format 1 posts need to have an F and Q word in the
cycle definition lines for Compression and Rigid Tapping. The F and S word need
to be identical. The F word needs to have a decimal point. A .2 for high range
is not necessary but often used. **
CDH}
{1/14/99
Updated: CNCVIS1 M610.15.4
Created: CNCVIS1 PM610.17.4
For: Gibbs & Associates
Versions: Virtual 5.04.05/ComPost2 1.7b15
Changes made per Pete Jackson.
Updated for Catalyst v5 per Fanuc 6M PM001.17.3 Format.
DWB}
{1/14/99
Updated: CNCVIS1 PM610.17.4
Created: CNCVIS1 RM610.17.4
For: Gibbs & Associates
Versions: Virtual 5.04.05/ComPost2 1.7b15
Changes made per Pete Jackson.
Updated for Catalyst v5 per Fanuc 6M RM001.17.4 Format.
DWB}
{1/19/99
Copied: CNCVIS1 RM610.17.4
Created: CNCVIS1 RM610.17.5
For: Gibbs & Associates
Versions: Virtual 5.05.04/ComPost2 1.7b15
Added missing EACHFadalSegment/NEXTFadalSegment loop at tpRapidFeat and tpLineFeat.
Added OR Rapid? at toolPath
Changed SetArcSegmentAccuracy to be .0005 for English and .0127 for Metric at progStart.
DWB}
{1/27/99,
Initial : CNCVIS1 RM610.17.5
Created: Fadal Format 1 [BA] RM161.17.5
Customer: Barry Alexander
ComPost2: v1.7b15
Changes to "Prog":
1. Moved wfoStuff to be output before getSpeed.
2. Moved CoolOn to be output in a block by itself.
3. Moved SpinOff to be output in a block by itself.
4. Removed G53Z0.
4. Added G28 block after Home.
5. Removed G53 from Home.
6. Moved ToolChng to be output in a block by itself.
7. Added ToolChng at end.
JHE}
{2/2/99,
Initial: Fadal Format 1 [BA] RM161.17.5
Created: Fadal Format 1 [BA] RM161.17.6
For: Barry Alexander
Changes to Prog:
1) Changed all SeqLab's to SeqLabC, except for tool changes.
2) doEndSub - The command EndSubs outputs a M30 at the end of all sub-programs.
However, it also outputs a line number which cannot be supressed..
This customer does not want any line numbers in his program.
To remedy this, the command Endsubs was removed, and replaced with the doEndsub
sub-routine. This sub-routine will create the last sub-program in the program,
output a literal M30, and then close the sub-routine.
It will only create this sub-program if one sub-program has already been created,
using Flag('4').
CDH}
{2/12/99,
Initial : Fadal Format 1 [BA] RM161.17.6
Created: Fadal Format 1 [FS] RMQ11.17.6
Customer: Frontier Systems, Gene 949/623-2222
ComPost2: v1.7b15
MDD: 3C_VM3 or 3C_VM4
Changes to "Form":
1. Under Spindle & Collant, changed Coolant On Number to 8.
2. Under Program Stops, changed End Program Number to 2.
Changes to "Prog":
1. Moved rotary return to zero from end1 to end2 sub.
2. Changed ckCRC sub and added a call in tpArcFeat.
3. Added Preset block (G92) at tape start. Also added FORMAT for HomeX# and HomeY#.
4. Moved CoolOn to getSpeed sub.
5. Changed CoolOn to doCoolOn and added a sub to output M7 for ThruSpin.
6. Moved CoolOff from newToolOp1 sub to newToolOp2 and from end1 sub to end2.
7. Removed all G28 codes.
8. Added 1 block in end2 sub and always move Home at program end.
9. Added 'E0' to all motion Home.
10. Removed PosApproach output before & after canned cycles.
11. Added M46 to canned cycle block for PosApproach and M47 for regular approach.
12. Removed UseComments from end3 sub.
JHE}
{2/22/99,
Initial : Fadal Format 1 [FS] RMQ11.17.6
Created: Fadal Format 1 [FS] RMQ11.17.7
Customer: Frontier Systems, Gene 949/623-2222
ComPost2: v1.7b15
MDD: 3C_VM3 or 3C_VM4
Changes to "Prog":
1. Added doGainSetting sub to output M92 with 1st cut and M90 with last cut
when PIN(1) is entered.
2. Added SetPalletIn('0') in progStart, firstOp1, newToolOp3, and sameToolOp2 subs.
3. In firstOp1 and end2 sub, changed 'Z1.' to 'Z' TCZ#.
4. Moved DoPostScript before the PreSet block.
5. Added SetTCZ('1') in progStart and added FORMAT to TCZ#.
6. Added PIN(1) and TCZ(n) to PostScript description.
JHE}
{Prog Numeric Format Definitions *******************************}
#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '00'
#7 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(SUB#,2)
FORMAT(UnitAngle#,2)
FORMAT(TrackCNO#,2)
FORMAT(TrackC#,2)
FORMAT(MoveC#,2)
FORMAT(Dwell#,2)
FORMAT(Recall#,4)
FORMAT(ADD#,4)
FORMAT(SpeedRPM#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackX#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(HomeX#,4) {Added - JHE 2/12}
FORMAT(HomeY#,4) {Added - JHE 2/12}
FORMAT(TCZ#,4) {Added - JHE 2/22}
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(TRUNC#,6)
FORMAT(Program2#,6)
FORMAT(CallMasterNum#,6)
FORMAT(RapidF#,7)
{Added Subroutines ***********************}
spReset: {update to the correct StartPos}
TrackXNO# SPX#
TrackYNO# SPY#
TrackCNO# MoveC#
IF AutoCycle? AND NOT PointFeat?
Save# Num#('5') MoveC# { cOpEP }
END
RETURN
resetSP: {update to the correct StartPos}
IF Rotations? OR Repeats? OR AutoCycle?
CalcSCAng
IF AbsValue?
spReset
ELSE
SetAbs
spReset
SetInc
END
END
RETURN
saveEP: {save the correct EndPos}
IF PointFeat?
IF AutoCycle?
SetACSPCompF
Save# Num#('1') ADD# Recall# Num#('1') SPX# { xOpEP }
Save# Num#('2') ADD# Recall# Num#('2') SPY# { yOpEP }
SetACSPComp
ELSE
Save# Num#('1') SPX# { xOpEP }
Save# Num#('2') SPY# { yOpEP }
END
ELSE
Save# Num#('1') EPX# { xOpEP }
Save# Num#('2') EPY# { yOpEP }
END
Save# Num#('4') MoveC# { cOpEP }
IF AutoCycle? AND NOT PointFeat?
Save# Num#('5') SUB# MoveC# Recall# Num#('5') { cOpEP }
END
RETURN
getEP: {save the correct EndPos}
IF Rotations? OR Repeats? OR AutoCycle?
IF AbsValue?
saveEP
ELSE
SetAbs
saveEP
SetInc
END
END
RETURN
setSRXYtoACEP:
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
TrackCNO# ADD# Recall# Num#('4') Recall# Num#('5') { cOpEP }
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
wfo:
'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
wfo
END
ELSE
IF Flag?('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO1
ELSE
wfo
END
ELSE
wfo
END
END
END
END
SetFlagF('2') { Do not output WFO second time wfoStuff is called for MP-WFO-OTAP-ECP }
RETURN
doCoolOn: {Added this sub - JHE 2/12}
IF ThruSpin?
'M7'
ELSE
IF Mist?
'M7.1'
ELSE {implies Flood}
CoolOn {output M8}
END
END
RETURN
doSubComment:
IF UseComments? AND SubComment?
SeqLabC '* SUB NUMBER: ' Program# EOL
END
RETURN
doOpComments:
IF UseComments?
SetScale('1')
SeqLabC '* OPERATION ' Operation#
IF OperationIDComment?
': ' OperationType$
END
EOL
IF OperationComment?
SeqLabC '* ' OperationComment$ EOL
END
IF WorkGroupComment?
SeqLabC '* ' WorkGroupComment$ EOL
END
SeqLabC '* TOOL ' Tool#
IF ToolTypeComment?
': ' ToolDiameter# ' ' ToolType$
END
EOL
IF ToolComment?
SeqLabC '* ' ToolComment$ EOL
END
restoreScale
END
RETURN
psInit:
NewWFOF
FourthCWF
FourthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
psStuff:
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF
END
RETURN
doPostScript:
psInit
EachPS
SeqLabC PostScript EOL
psStuff
NextPS
RETURN
doEndOpPS:
psInit
EachEOPS
SeqLabC EndOpPS EOL
psStuff
NextPS
RETURN
absValueC:
IF NOT AbsValue?
AbsValue
END
RETURN
incValueC:
IF AbsValue?
IncValue
END
RETURN
absOrIncC:
IF AbsoluteMoves?
absValueC
ELSE
incValueC
END
RETURN
setAngleUnder360: {sets status register and machine to current rotary position between -360 and 360 deg}
{Fanuc yes, Fadal no.}
RETURN
doStartPos:
IF RotaryMill?
'X' TrackX# StartPosX# 'Y0.' TrackYNO# StartPosY#
ELSE
StrtPos
END
IF AAxisAvail?
CalcSCAng FadalMoveC
ELSE
TrackCNO# Num#('0')
END
RETURN
entryMove:
IF FirstOperation? OR NewTool?
RapidF# { Forces FeedEnt/FeedRate }
ELSE
IF LAST Rotations? OR LAST Repeats?
RapidF# { Forces FeedEnt/FeedRate }
END
END
IF FeedEntry?
SeqLabC Feed ZIn FeedEntC EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
startSub:
SetFlag('21') {Flag for doEndSub}
OpenSub
SeqLabC SubIDF EOL
doSubComment
RETURN
doEndSub: {This will create the last sub-program, only if one has already been created}
IF Flag?('21')
OpenSub
SeqLabC 'M30' EOL
CloseSub
END
RETURN
subWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
SeqLabC '* WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
' ' EOL
END
END
RETURN
stdSub:
FORMAT(Recall#,6)
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')
SeqLabC CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextRep
SeqLabC CallLab Recall# Num#('10') EOL
startSub
FORMAT(Recall#,4)
RETURN
finishSub1: {part 1}
IF NOT FeedConnect?
SeqLabC RapidC ZCP3C EOL
END
RETURN
finishSubG92: {part 2}
SeqLabC Preset ShiftR EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshiftR EOL
RETURN
doWFOOps:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
ELSE
SeqLabC Rapid doStartPos SetWFO EOL
END
SeqLabC CallLab OnePart EOL
RETURN
openMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
END
NewWFO
EachWFO {simple eachPart}
doWFOOps
IncWFO
NextWFO {simple NextPart}
startSub
ELSE
FORMAT(Recall#,6)
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')
SeqLabC CallLab '99' EOL
Save# Num#('10') Num#('1')
END
NextPart
SeqLabC CallLab Recall# Num#('10') EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
startSub
FORMAT(Recall#,4)
END
RETURN
closeMP:
IF WorkFixtureOffsets?
SeqLabC EndSub EOL
CloseSub
ELSE
SeqLabC Preset ShiftP EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC Preset UnshiftP EOL
END
RETURN
doAbsOrInc:
IF Rotations? AND RotaryMill?
incValueC
ELSE
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
IF ZMove?
incValueC
ELSE
absOrIncC
END
END
END
RETURN
doACAbsOrInc:
IF Rotations? AND CMove?
incValueC
ELSE
absOrIncC
END
RETURN
doDrillAbsOrInc:
IF Rotations? AND RotaryMill?
incValueC
ELSE
IF Flag?('1') { DrillSubs activated }
IF SPZMove?
incValueC
ELSE
absOrIncC
END
END
END
RETURN
restoreAbsOrInc:
IF Rotations? AND RotaryMill? AND NOT AutoCycle?
SeqLabC absOrIncC EOL
ELSE
IF Flag?('1') { Milling ZShiftOnly SepSubs/DrillSubs activated }
SeqLabC absOrIncC EOL
END
END
RETURN
ckCRC:
IF LastFeat?
IF NOT ArcFeat?
CRCOffC
END
ELSE
{IF NOT ZMove?} {Removed - JHE}
CRCOnC
{END}
END
RETURN
ckCRCNum:
IF NOT LastFeat? {Removed AND Equal? SPZ# EPZ# - JHE}
CRCOffsetC
END
RETURN
doGainSetting: {Added - JHE 2/22}
IF Equal? Pallet# Num#('1')
IF FirstFeat?
'M92'
ELSE
IF LastFeat?
'M90'
END
END
END
RETURN
tpPointFeat:
IF AutoCycle?
IF RotaryMill?
CalcSCAng
SeqLabC doACAbsOrInc MoveSXC FadalMoveCC EOL
SetAbsOrInc
TrackCNO# ADD# Recall# Num#('5') MoveC# EOL {calc MoveC position after sub call}
ELSE
SeqLabC MoveSXYC EOL
END
IF Repeats? AND ZshiftOnly?
SeqLabC CallLabB TRUNC# SUB# Program# Num#('1') '01' EOL
ELSE
SeqLabC CallLab '01' EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF FirstFeat?
SetFlagF('9') { For valid Drill Rotation Sub }
IF Rotations?
IF NOT LastFeat?
IF NOT MasterOp?
SetFlag('9') { valid Drill Rotation Sub }
NewProg
StartSub
END
END
END
ELSE
IF RotaryMill?
CalcSCAng
SeqLabC doDrillAbsOrInc MoveSXC MoveSZC FadalMoveCC EOL
ELSE
SeqLabC doDrillAbsOrInc MoveSXYZC EOL
END
END
IF LastFeat?
IF Flag?('9') { valid Drill Rotation Sub }
restoreAbsOrInc
IF NOT MasterOp?
SeqLabC EndSub EOL
CloseSub
END
END
END
END
RETURN
tpRapidFeat:
IF RotaryMill?
CalcCAng
IF XMove? OR ZMove? OR CMove?
EACHFadalSegment
CalcCAng
SeqLabC doAbsOrInc ckCRC RapidC MoveXC MoveZC FadalMoveCC ckCRCNum EOL
NEXTFadalSegment
END
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC RapidC MoveXYZC ckCRCNum EOL
END
END
RETURN
tpLineFeat:
IF RotaryMill?
CalcCAng
IF XMove? OR ZMove? OR CMove?
EACHFadalSegment
CalcCAng
SeqLabC doAbsOrInc ckCRC FeedC MoveXC MoveZC FadalMoveCC AngleFeedC ckCRCNum doGainSetting EOL
NEXTFadalSegment
END
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC doAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum doGainSetting EOL
END
END
RETURN
tpArcFeat:
IF RotaryMill?
EachArcSegment
CalcCAng
SeqLabC doAbsOrInc ckCRC FeedC MoveXC MoveZC FadalMoveCC AngleFeedC ckCRCNum EOL
NextArcSegment
ELSE
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
SeqLabC doAbsOrInc ckCRC
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
ArcFeedC ckCRCNum EOL
NEXTQuadrant
END
RETURN
toolPath:
ResetCRCNum
EACHFeat
IF FirstFeat?
resetSP
END
IF PointFeat?
tpPointFeat
ELSE
IF RapidFeat?
tpRapidFeat
ELSE
IF FirstFeat? OR Rapid?
SeqLabC 'G8' EOL
END
IF LineFeat?
tpLineFeat
ELSE
IF ArcFeat?
tpArcFeat
END
END
END
END
IF LastFeat?
getEP
END
NEXTFeat
SeqLabC CRCOffC EOL
restoreAbsOrInc
RETURN
autoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
startSub
SetSRXYtoSP
SeqLabC incValueC EOL
RETURN
autoCycCutSub2: {part 2}
toolPath
SeqLabC absOrIncC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC ZCP2
END
EOL
SeqLabC 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
SeqLabC absOrIncC Connect doStartPos EOL
milling
finishSub1
finishSubG92
RETURN
doSepSubContour:
SetPass1
TrackZNO# SPZ#
startSub
RapidF#
IF AutoCycle?
NewProg
autoCycCutSub1 {build element sub}
TrackZNO# SPZ#
autoCycCutSub2
ELSE
toolPath
finishSub1
SeqLabC EndSub EOL
CloseSub
END
SetPass1
SetStatusRapid
RapidF#
SetSRXYtoEP
TrackZNO# ClearancePlane2#
TrackCNO# Recall# Num#('4') { cOpEP }
RETURN
doSepSubFeedConnect:
IF FeedConnect?
IF CMove?
AngleFeedC
ELSE
FeedEntC
END
END
RETURN
doSepSubSPMove:
SetStatusOff
IF RotaryMill?
CalcSCAng
IF SPXMove? OR CMove?
IF Rotations? OR AutoCycle?
incValueC
END
SeqLabC Connect MoveSXC FadalMoveCC doSepSubFeedConnect EOL
absOrIncC
ELSE
Connect
END
ELSE
IF SPXMove? OR SPYMove?
IF AutoCycle?
incValueC
END
SeqLabC Connect StrtPosC doSepSubFeedConnect EOL
absOrIncC
ELSE
Connect
END
END
SetStatusOn
RETURN
doSepSubZMoves:
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusInc EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle? AND AutoCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC CallLab '01' EOL
IF NOT FeedConnect? AND NOT AbsValue?
TrackZNO# ZCP2PlusInc#
SeqLabC ZCP2C EOL
IF NOT AutoCycle?
TrackZNO# ClearancePlane3#
END
END
RETURN
setSepSubZ:
SetAbs
TrackZNO# ADD# SPZ# MUL# RepsLess1# RepeatZ#
SetInc
RETURN
doSepSubExit:
IF NOT AbsValue?
setSepSubZ
END
IF AutoCycle?
SeqLabC Rapid ZCP2 EOL
ELSE
Rapid { Will be output at millingOp ZCP3 }
END
RETURN
resetSepSubSR:
SetPass1
SetStatusRapid
RapidF#
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
TrackCNO# Recall# Num#('4') { cOpEP }
RETURN
zonlyRepAutoCycle:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubZMoves
NextCycle
IF FeedConnect?
doSepSubExit
END
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
autoCycPat {write pattern moves and main calls}
resetSepSubSR
TrackZNO# ClearancePlane2#
RETURN
zonlyRep:
doSepSubContour
EachCycle
IF NOT FirstCycle?
doSepSubSPMove
END
doSepSubZMoves
NextCycle
resetSepSubSR
IF FeedConnect?
doSepSubExit
ELSE
TrackZNO# ClearancePlane3#
END
RETURN
millingOp:
SeqLabC ZCP2C EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
zonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
SetFlag('1') { Milling ZShiftOnly SepSubs activated }
zonlyRep
SetFlagF('1') { Milling ZShiftOnly SepSubs deactivated }
END {end Auto Cycle IF}
ELSE {not Z only}
g92Sub
END {end Z only IF}
ELSE {no repeat OPs}
milling
END
IF AutoCycle?
SeqLabC ZCP3C EOL
setSRXYtoACEP
ELSE
SeqLabC RapidC ZCP3C EOL
END
RETURN
skipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
CalcSCAng
TrackCNO# MoveC#
END
NextFeat
RETURN
setDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN
drillingOp:
SeqLabC DrillCP EOL
GetCycle
SeqLabC
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP doStartPos ZDepth RLevel Dwell Peck Retract
IF Tap?
'F' SpeedRPM# FadalTapQ
ELSE
FeedEnt
END
IF PosApproach? {Added - JHE 2/12}
'M46' EOL
ELSE
'M47' EOL
END
IF CallMasterOp?
SeqLabC CallLabB CallMasterNum# '01' EOL
skipToLastFeat
ELSE
TrackZNO# SPZ#
IF MasterOp?
SetFlag('1') { DrillSubs activated }
NewMasterProg
SeqLabC CallLab '01' EOL
startSub
toolPath
SeqLabC EndSub EOL
CloseSub
SetFlagF('1') { DrillSubs deactivated }
ELSE
toolPath
END
END
setDrillEndOpZ
IF NOT Rotations?
SeqLabC DrillOff Rapid ZCP3 EOL
END
RETURN
getSpeed:
IF Drilling?
GetCycle
END
IF Drilling? AND RigidTap?
IF FirstOperation? OR NewTool?
SeqLabC Speed doCoolOn EOL {Added doCoolOn - JHE 2/12}
END
SeqLabC SpeedC EOL
SeqLabC 'G84.2' EOL
ELSE
IF FirstOperation? OR NewTool?
SeqLabC Speed SpinOn doCoolOn EOL {Added doCoolOn - JHE 2/12}
ELSE { SameTool }
IF LAST ProgStop?
SeqLabC Speed SpinOn doCoolOn EOL {Added doCoolOn - JHE 2/12}
ELSE
SeqLabC SpeedC EOL
END
END
END
RETURN
checkPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
RETURN
rotateStartPosC:
TrackXNO# Recall# Num#('1') { xOpEP }
MoveSXC
IF NOT RotaryMill?
TrackYNO# Recall# Num#('2') { yOpEP }
MoveSYC
END
CalcSCAng FadalMoveC
RETURN
rotaryReps: {use the correct EndPos}
EachRotation
IF Milling?
IF FirstRotation?
NewProg
SaveProgNum2
StartSub
millingOp
SeqLabC EndSub EOL
CloseSub
checkPass
ELSE
SeqLabC rotateStartPosC EOL
END
SeqLabC CallLabB Program2# '01' EOL
ELSE
IF Drilling?
IF FirstRotation?
drillingOp
checkPass
ELSE
IF RetractToCP1? AND Equal? ClearancePlane1# ClearancePlane3#
SeqLabC rotateStartPosC EOL
ELSE
IF NOT RetractToCP1? AND Equal? ClearancePlane2# ClearancePlane3#
SeqLabC rotateStartPosC EOL
ELSE { Need to cancel Drill Cycle between Rotations }
SeqLabC DrillOff Rapid ZCP3 EOL
SeqLabC rotateStartPosC EOL
SeqLabC DrillCP EOL
SeqLabC
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP rotateStartPosC ZDepth RLevel Dwell Peck Retract
IF Tap?
'F' SpeedRPM# FadalTapQ
ELSE
FeedEnt
END
IF PosApproach? {Added - JHE 2/12}
'M46' EOL
ELSE
'M47' EOL
END
END
END
END
IF CallMasterOp?
IF NOT FirstRotation?
SeqLabC CallLabB CallMasterNum# '01' EOL
END
ELSE
IF MasterOp?
IF NOT FirstRotation?
SeqLabC CallLab '01' EOL
END
ELSE
IF Flag?('9') { valid Drill Rotation Sub }
SeqLabC CallLab '01' EOL
END
END
END
IF LastRotation?
SeqLabC DrillOff Rapid ZCP3 EOL
END
END
END
IF LastRotation?
EachFeat
IF LastFeat?
IF PointFeat?
CalcSCAng
ELSE
CalcCAng
END
TrackCNO# MoveC# EOL
END
NextFeat
END
NextRotation
TrackXNO# Recall# Num#('1') { xOpEP }
TrackYNO# Recall# Num#('2') { yOpEP }
TrackZNO# ClearancePlane3#
RETURN
opGuts:
IF Rotations?
rotaryReps
ELSE
IF Milling?
millingOp
ELSE
IF Drilling?
drillingOp
END
END
END
RETURN
progStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
SetArcSegmentAccuracy('.0127')
ELSE
SetMaxFeed('500')
SetArcSegmentAccuracy('.0005')
END
SetFadalSegAngleLimit('359.95')
Save# Num#('1') Num#('0') { Status Register Variable for X Axis }
Save# Num#('2') Num#('0') { Status Register Variable for Y Axis }
Save# Num#('4') Num#('0') { Status Register Variable for C Axis }
Save# Num#('5') Num#('0') { AutoCycle SetPass1 C Axis Travel }
Save# Num#('10') Num#('0') { FORMATting for Number of Subroutine Loops }
SetFlagF('1') { Milling ZShiftOnly SepSubs/DrillSubs deactivated }
SetFlagF('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlagF('5') { Suppress Redundant WFO for MP-WFO-OTAP-ECP }
SetFlagF('9') { For valid Drill Rotation Sub }
SetFlagF('21') { If no subs, then suppresses doEndSub }
SetPalletIn('0') {Added - JHE 2/22}
SetTCZ('1') {Added - JHE 2/22}
IF PSComment? AND UseComments?
'Utility Data:' EOL
' At Op Start: All literals and commands will appear at the beginning of the operation.' EOL
' At Op End: All literals and commands will appear at the end of the operation.' 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 ncPost multiple part option.' 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
' PIN(1) Output Gain Setting codes (M92 and M90)' EOL
' TCZ(n) Specifies the value to be output with the g92 block at tape ' EOL
' start and g49 block at tape end. 'n' default is 1. ' EOL
END
RETURN
initOp:
EOR EOL
SeqLabC ProgID1
IF UseComments? AND ProgramNameComment?
'*' ProgramName$
END
EOL
SetProgNum('0')
IF UseComments?
IF ProgramComment?
SeqLabC '* ' ProgramComment$ EOL
END
IF FormatNameComment?
SeqLabC '* FORMAT: ' FormatName$ EOL
END
IF TimeComment?
SeqLabC '* ' Date$ ' AT ' Time$ EOL
END
IF MovesComment?
SeqLabC '* OUTPUT IN ' MoveType$ ' INCHES' EOL
END
IF PartsComment?
SeqLabC '* PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqLabC '* FIRST TOOL NOT IN SPINDLE' EOL
END
END
OpenSub
restoreScale
RETURN
firstOp1:
IF ToolChangeAtHome?
SetHome
END
IF Metric?
SeqLab 'G21' EOL { Metric Mode }
ELSE
SeqLab 'G20' EOL { Inch Mode }
END
SetPalletIn('0') {Added - JHE 2/22}
doPostScript {Moved to here - JHE 2/22}
SeqLabC Preset 'X' HomeX# 'Y' HomeY# 'Z' TCZ# EOL {Changed from Z1. - JHE 2/22}
SeqLabC OpToolID ToolChng EOL
doOpComments
RETURN
firstOp2:
SeqLabC wfoStuff EOL {Moved to here - JHE}
getSpeed
checkPass
SeqLabC Plane AbsOrInc Rapid doStartPos EOL
RETURN
firstOp3:
SeqLabC OfstOn EOL
{SeqLabC CoolOn EOL} {Moved to getSpeed sub - JHE 2/12}
RETURN
newToolOp1:
SeqLabC SpinOff EOL
setAngleUnder360
RETURN
newToolOp2:
doEndOpPS
SeqLabC CoolOff EOL
IF ToolChangeAtHome?
SeqLabC AbsOrIncC Rapid Home 'E0' EOL
END
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN
newToolOp3: {Start new Operation}
SeqLab OpToolID EOL
SeqLabC ToolChng EOL
SetPalletIn('0') {Added - JHE 2/22}
doOpComments
doPostScript
RETURN
newToolOp4:
SeqLabC wfoStuff EOL {Moved to here - JHE}
getSpeed
checkPass
SeqLabC Plane AbsOrInc Rapid doStartPos EOL
RETURN
newToolOp5:
SeqLabC OfstOn EOL
{SeqLabC CoolOn EOL} {Moved to getSpeed sub - JHE 2/12}
RETURN
sameToolOp1:
doEndOpPS
IF LAST ProgStop?
SeqLabC SpinOff CoolOff EOL
SeqLabC 'G53Z0.' EOL { OfstOff }
SeqLabC 'M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
SeqLabC 'G53Z0.' EOL { OfstOff }
END
END
setAngleUnder360
RETURN
sameToolOp2: {Start new Operation}
SetPalletIn('0') {Added - JHE 2/22}
doOpComments
doPostScript
checkPass
RETURN
sameToolOp3: {Start new Operation}
SeqLabC wfoStuff EOL {Moved to here - JHE}
getSpeed
SeqLabC PlaneC AbsOrInc Rapid doStartPos EOL
IF LAST ProgStop?
SeqLabC OfstOn EOL
{SeqLabC CoolOn EOL} {Moved to getSpeed sub - JHE 2/12}
ELSE
SeqLabC
IF NewToolOffset?
OfstOn
END
IF NOT CoolOff? AND LAST CoolOff?
doCoolOn
END
EOL
END
RETURN
end1:
SeqLabC SpinOff EOL
setAngleUnder360
RETURN
end2:
doEndOpPS
SeqLabC CoolOff EOL
SeqLabC Rapid 'G49Z' TCZ# EOL {Changed from Z1. - JHE 2/22}
SeqLabC 'X' HomeX# 'Y' HomeY# 'E0' EOL {Changed from Home - JHE 2/12}
IF NotEqual? UnitAngle# Num#('0')
SeqLabC absOrIncC RapidC 'A'
IF GreaterThan? UnitAngle# Num#('180')
'-'
END
TrackC# Num#('0') EOL
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN
end3:
SeqLabC UnTool ToolChng EOL
SeqLabC EOP EOL
doEndSub
CloseSub
Post2 {organize Subs into one program}
EOR EOL
Close
{*** Removed - JHE 2/12
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
SeqLabC '* FILE LENGTH: ' FileBytes# ' CHARACTERS' EOL
END
IF FileFeetComment?
SeqLabC '* FILE LENGTH: ' FileFeet# ' FEET' EOL
END
IF FileMetersComment?
SeqLabC '* FILE LENGTH: ' FileMeters# ' METERS' EOL
END
Close
END
***}
Retag
RETURN
mpAllTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
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
end2
closeMP
end3
RETURN
mp1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
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
closeMP
end2
end3
RETURN
mp1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
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
end1
end2
end3
RETURN
noMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('2') { Need to output wfoStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF FirstOperation?
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
end2
end3
RETURN
{Start of executable Prog, Top Level ****}
progStart {setup and initializations}
initOp
IF MultipleParts?
IF AllToolsOnePart?
mpAllTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
mp1ToollAllPfu
ELSE {implied ExitClearancePlane?}
mp1ToollAllPXcp
END
END
ELSE
noMPs
END
Wyszukiwarka
Podobne podstrony:
Fadal Format 1 [RPB] PMX95 17 6Fadal Format 1 [MD] PMV25 17 6Fadal Format 2 [CM] PM235 17 5Fadal Format 1 [Coh] PM212 17 5Fadal Format 2 [AC] RM807 17 6Fadal Format 2 [AM] PMW48 17 6Fadal Format 1 [CSE] PM917 17 6Fadal Format 2 [LC] PMT88 17 5Fadal Format 1 [FS] DQ11 15 1Fadal Format 1 [Coh] PM997 17 5Fadal Format 1 [SM] PMT74 17 6Fadal Format 2 [E] PM585 17 6Fadal Format 2 (AC) B807 12Fadal Format 2 [MM] MW60 89Fadal Format 2 [PEP] M116 89 1Fadal Format 2 [HM] MV16 89 1mwięcej podobnych podstron