{Change Comments ***********************************************************}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{1/28/91
Copied & modified: Sharnoa-Tiger III M023.55
For: Gibbs & Associates
Machine: Tiger III
Control: Sharnoa
Updated to Version 3.2 per Fanuc 6M M001.76.1 Format.
Added 'T' label to CRCOffset in Form.
DWB}
{1/28/91
Copied & modified: Sharnoa-Tiger III M023.76.1
For: Chevron Oil Field Research Company
Machine: Tiger III
Control: Sharnoa
Modifications made per customer request:
Deleted DrillOff at FirstOperation.
Deleted occurance of ' G99' work fixture offset code for FirstOperation only.
Deleted CRCOff at NewTool.
Deleted all occurances of CRCOffsetC.
DWB}
{4/3/91
Modified: Sharnoa Tiger III CO M389.76.7
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}
{5/7/91
Modified: Sharnoa Tiger III CO M389.79
Renamed: Sharnoa Tiger IV CO M389.80
For: Gibbs & Associates
Changed OfstOn to ZCP1 4 places.
DWB}
{4/10/92
Modified: Sharnoa Tiger IV CO M389.80
For: Chevron
Removed all occurances of CoolOn/CoolOff.
Removed the G17, G18, G19 codes for planes in the form,
to illiminate the output but still allow for flexible capability.
Deleted all speed code commands, their machine does not read them.
Commented out the ' O' NewWFO# EOL in the WFOStuff subroutine, not sure if
they really want to delete this altogether, wait to delete this code.
Kim Michelman}
{5/14/96
Updated: Sharnoa Tiger IV CO M389.80.1
Created: Sharnoa Tiger IV CO M389.89
For: Gibbs & Associates
Versions: ncCad 4.33.02/ncCAM 4.33.01/ncPost 4.33.09/Catalyst v3.04.04C/Compost 4.21.37/1.0a
Changes made per Pete Jackson.
Updated for Catalyst v3.0 per Fanuc 6M M001.89 Format
DWB}
{12/16/96
Updated: Sharnoa Tiger IV CO M389.80
Created: Sharnoa Tiger IV CO M389.89.1
For: Gibbs & Associates/Douglas Stephens Plastics Co.
Versions: Catalyst v3.20C/Compost 4.21.37/v1.0b1
Corrections made to previous notes.
Changes made on 4/10/92 were supposed to be made to Sharnoa Tiger V M810.80.1.
Changes were accidentally made to this post at the same time.
Added G17, G18, G19 codes back in Compost2 Work Planes Dialog.
Added Speed commands back in at FirstOperation, NewTool and SameTool.
Added CoolOn commands back in at FirstOperation, NewTool and SameTool.
Added CoolOff commands back in at NewTool, SameTool and end of Prog.
Added ' O' NewWFO# back in at WFOStuff.
Updated for Catalyst v3.20C per Fanuc 6M M001.89a Format
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.
Deleted Flag(2) for CutterRadiusCompensation logic.
Moved contents of FormatLine 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 SeqC 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 SeqC 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.
Added Flag(3) to force SeqLab at start of Subs.
Added Flag(4) to force G-code at start of Subs.
DWB}
{1/8/97
Copied: Sharnoa Tiger IV CO M389.89.1
Created: Sharnoa Tiger VI MY01.89
For: Douglas Stephens Plastics Co.
Machine: Tiger VI
Control: Sharnoa
Versions: Catalyst v3.23C/Compost 4.21.37/v1.0b3
Changes made per Mark Paluszek of Douglas Stephens Plastics Co, phone calls and sample files.
Changes also made per Terry Van De Walker of Sharnoa, phone conversations and sample files.
Changes also made per Wayne Shibuya of Gibbs & Associates and Sharnoa Tiger V M810.80.4.
Complete rewrite to correct support for Canned Peck Drilling, Helical Arcs, AutoCycles and
ZShiftOnly Repeats, SepSubs, among other minor issues.
Canned Peck Drilling requires Peck and Retract Parameters on every location block.
Post outputs Polar Coordinates for Arcs.
ncPost and Virtual Source Code output G11 block which positions tool to startpoint using
Arc centerpoints, radius and start angle, followed by G12 block outputting end angle and ZMove
if applicable.
Incremental Arcs are handled manually in post processor because Incrmental moves require literal
'/' character, which is not part of ncPost and Virtual Source Code.
Non-Polar Arcs LessThan 180 degrees is output as GXYZR.
Non-Polar Arcs GTEqual 180 and LessThan 360 degrees is output as GXYZR-.
Full Arcs must be output in Polar Coordinates.
Past problems were due in part because Polar CenterPoints are modal.
Incremental output requires that Polar CenterPoints be distance from last values output.
AutoCycles require setting up Absolute Polar CenterPoints prior to calling Incremental Path.
Incremental Polar CenterPoints are Tracked during ToolPath.
Modified Flag(4) to also force G-code after PolarArc.
Added Flag(5) to force G-code after ArcFeat.
Added Flag(6) to Track Polar CenterPoint for Full Incremental AutoCycle Arcs.
Added Flag(7) to output G4 FeedRate prior to PolarArc when needed.
Added Vars(1-11) to Track Polar CenterPoint for Full Incremental AutoCycle Arcs.
Added VarReport1 and VarReport2 subs to report variable values.
Calls to same are commented out. Uncomment calls when report is desired.
DWB}
{Prog Numeric Format Definitions ****}
#1 = '#.00'
#2 = '#####.###;0.'
#3 = '*#####.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####.###;0.'
#7 = '*####.####;0.' { 180+ degree ArcR# }
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Recall#,4)
FORMAT(ADD#,4)
FORMAT(SUB#,4)
FORMAT(DIV#,4)
FORMAT(MUL#,4)
FORMAT(SQRT#,4)
FORMAT(ATAN#,4)
FORMAT(StartPosX#,4)
FORMAT(StartPosY#,4)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(EPZ#,4)
FORMAT(SPX#,4)
FORMAT(SPY#,4)
FORMAT(SPZ#,4)
FORMAT(ArcI#,4)
FORMAT(ArcJ#,4)
FORMAT(ArcR#,4)
FORMAT(SPMoveAngle#,4)
FORMAT(EPMoveAngle#,4)
FORMAT(Peck#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
{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
WFONum:
' G99 E' NewWFO#
RETURN
WFOStuff:
{ This post only supports PostScript and OpenMP WFOs }
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'/*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
SeqLabC '/ SUB NUMBER: ' Tag# EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqLabC '/OPERATION ' Operation# ': ' OperationType$ EOL
END
IF OperationComment?
SeqLabC '/' OperationComment$ EOL
END
IF WorkGroupComment?
SeqLabC '/' WorkGroupComment$ EOL
END
IF ToolTypeComment?
SeqLabC '/TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ EOL
END
IF ToolComment?
SeqLabC '/' ToolComment$ EOL
END
RestoreScale
END
RETURN
PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC ' A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC ' A' FourthDegree# EOL
FourthCCWF
END
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
EntryMove:
IF Flag?('3') { Force SeqLab at Start of Sub }
SeqLab
END
IF FeedEntry?
IF Flag?('4') { Force G-Code at Start of Sub }
Feed
END
IF AutoCycle? { Implies Incremental }
SeqLabC FeedC ' Z/' FIRST SPZ# FeedEnt EOL
ELSE
SeqLabC FeedC ZIn FeedEnt EOL
END
ELSE
IF Flag?('4') { Force G-Code at Start of Sub }
Rapid
END
IF AutoCycle? { Implies Incremental }
SeqLabC RapidC ' Z/' FIRST SPZ# EOL
ELSE
SeqLabC RapidC ZIn EOL
END
END
SetFlagF('3') { Force SeqLab at Start of Sub }
SetFlagF('4') { Force G-Code at Start of Sub }
RETURN
StartSub:
OpenSub
DoSubComment
'>' Tag# EOL
SetFlag('3') { Force SeqLab at Start of Sub }
SetFlag('4') { Force G-Code at Start of Sub }
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
SeqLabC ' ' EOL
SeqLabC '/ WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT' EOL
SeqLabC ' ' EOL
END
END
RETURN
StdSub:
SeqLabC SubCall RepLab 'ł' Tag# ' E' RepCycs EOL
StartSub
RETURN
FinishSub1: {part 1}
SeqLabC
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C
ELSE
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
END
EOL
SeqLabC CRCOffC EOL
RETURN
FinishSubG92: {part 2}
SeqLabC Preset ShftSR EOL
SeqLabC EndSub EOL
CloseSub
TagDown
IF MultipleParts? AND EquallySpacedOffsets?
SeqLabC Preset UnshftSR EOL
ELSE
SeqLabC ' G99' EOL { Restore Control to Original Origin. }
END
RETURN
OpenMP:
TagUp TagInc
IF WorkFixtureOffsets?
NewWFO
EachWFO {simple eachPart}
SeqLabC ' G99' SetWFO EOL
SeqLabC SubCall ' Lł' Tag# EOL
IncWFO
NextWFO {simple NextPart}
ELSE
SeqLabC SubCall ' Lł' Tag# ' E' Parts EOL
END
StartSub
SetFlagF('3') { Force SeqLab at Start of Sub }
SetFlagF('4') { Force G-Code at Start of Sub }
SeqLab
RETURN
CloseMP:
IF WorkFixtureOffsets?
SeqLabC EndSub EOL
CloseSub
TagDown
ELSE
SeqLabC Preset ShftSP EOL
SeqLabC EndSub EOL
CloseSub
TagDown
END
SeqLabC ' G99' EOL { Restore Control to Original Origin. }
RETURN
DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
SetInc
ELSE
IF NOT ZMove? AND NOT AbsValue?
SetAbs
END
END
END
RETURN
DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
SetInc
ELSE
IF NOT SPZMove? AND NOT AbsValue?
SetAbs
END
END
END
RETURN
RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SetAbs
END
RETURN
GetMove:
IF AutoCycle?
IF XMove?
' X/' EPX#
END
IF YMove?
' Y/' EPY#
END
ELSE
SetAbs MoveXYC SetInc
END
IF ZMove?
' Z/' EPZ#
END
RETURN
GetArc:
IF ArcCW?
' G2'
ELSE
' G3'
END
RETURN
FormatArc:
GetMove
IF ArcCW?
IF GreaterThan? SPMoveAngle# EPMoveAngle#
IF GTEqual? SUB# SPMoveAngle# EPMoveAngle# Num#('180')
FORMAT(ArcR#,7)
END
ELSE
IF LTEqual? SUB# EPMoveAngle# SPMoveAngle# Num#('180')
FORMAT(ArcR#,7)
END
END
ELSE
IF GreaterThan? SPMoveAngle# EPMoveAngle#
IF LTEqual? SUB# SPMoveAngle# EPMoveAngle# Num#('180')
FORMAT(ArcR#,7)
END
ELSE
IF GTEqual? SUB# EPMoveAngle# SPMoveAngle# Num#('180')
FORMAT(ArcR#,7)
END
END
END
' R' ArcR#
FORMAT(ArcR#,4)
RETURN
VarReport1:
EOL
' Num( 1) = ' Recall# Num#('1') EOL { Sub Polar Center I Value }
' Num( 2) = ' Recall# Num#('2') EOL { Sub Polar Center J Value }
' Num( 3) = ' Recall# Num#('3') EOL { Polar Center I Value }
' Num( 4) = ' Recall# Num#('4') EOL { Polar Center J Value }
RETURN
VarReport2:
' Num( 5) = ' Recall# Num#('5') EOL { Distance from I to X }
' Num( 6) = ' Recall# Num#('6') EOL { Distance from J to Y }
' Num( 7) = ' Recall# Num#('7') EOL { A Squared }
' Num( 8) = ' Recall# Num#('8') EOL { B Squared }
' Num( 9) = ' Recall# Num#('9') EOL { C Squared }
' Num(10) = ' Recall# Num#('10') EOL { Polar StartPos Radius Value }
' Num(11) = ' Recall# Num#('11') EOL { Polar Angle }
RETURN
PolarIJ: { Full Incremental AutoCycle Arcs Need Calculated IJ Polar Centers }
SetStatusOff
SetACSPCompF
Save# Num#('1') SPX# { Sub Polar Center I Value }
Save# Num#('2') SPY# { Sub Polar Center J Value }
SetACSPComp
IF FirstFeat?
Save# Num#('3') Num#('0') { Polar Center I Value }
Save# Num#('4') Num#('0') { Polar Center J Value }
Save# Num#('5') SUB# SPX# Recall# Num#('1') { Distance from I to X }
Save# Num#('6') SUB# SPY# Recall# Num#('2') { Distance from J to Y }
Save# Num#('7') MUL# Recall# Num#('5') Recall# Num#('5') { A Squared }
Save# Num#('8') MUL# Recall# Num#('6') Recall# Num#('6') { B Squared }
Save# Num#('9') ADD# Recall# Num#('7') Recall# Num#('8') { C Squared }
Save# Num#('10') SQRT# Recall# Num#('9') { Polar StartPos Radius Value }
IF Equal? Recall# Num#('7') Num#('0')
IF Equal? Recall# Num#('8') Num#('0')
Save# Num#('11') Num#('0')
ELSE
IF GreaterThan? Recall# Num#('6') Num#('0')
Save# Num#('11') Num#('90')
ELSE
Save# Num#('11') Num#('270')
END
END
ELSE
IF Equal? Recall# Num#('8') Num#('0')
IF GreaterThan? Recall# Num#('5') Num#('0')
Save# Num#('11') Num#('0')
ELSE
Save# Num#('11') Num#('180')
END
ELSE
Save# Num#('11') ATAN# DIV# Recall# Num#('6') Recall# Num#('5')
IF LessThan? Recall# Num#('5') Num#('0')
Save# Num#('11') ADD# Recall# Num#('11') Num#('180')
ELSE
IF LessThan? Recall# Num#('6') Num#('0')
Save# Num#('11') ADD# Recall# Num#('11') Num#('360')
END
END
END
END
END
{VarReport1}
{VarReport2}
SeqLabC ' G10'
' I' Recall# Num#('1')
' J' Recall# Num#('2')
' R' Recall# Num#('10')
' C' Recall# Num#('11')
EOL
SetStatusOn
RETURN
PolarArc:
SetAbs
SeqLabC ' G11'
IF Flag?('6') { Need to Track Polar CenterPoint for Full Incremental AutoCycle Arcs }
Save# Num#('1') SUB# ArcI# Recall# Num#('3')
Save# Num#('2') SUB# ArcJ# Recall# Num#('4')
Save# Num#('3') ArcI#
Save# Num#('4') ArcJ#
{VarReport1}
' I/' Recall# Num#('1') ' J/' Recall# Num#('2')
ELSE
' I' ArcI# ' J' ArcJ#
END
' R' ArcR#
IF ArcCW?
IF GTEqual? SPMoveAngle# Num#('270')
' C' SUB# SPMoveAngle# Num#('270')
ELSE
' C' ADD# SPMoveAngle# Num#('90')
END
ELSE
IF LessThan? SPMoveAngle# Num#('90')
' C' ADD# SPMoveAngle# Num#('270')
ELSE
' C' SUB# SPMoveAngle# Num#('90')
END
END
ArcFeedC EOL
SeqLabC
IF ArcCW?
CWArc
IF GTEqual? EPMoveAngle# Num#('270')
' C' SUB# EPMoveAngle# Num#('270')
ELSE
' C' ADD# EPMoveAngle# Num#('90')
END
ELSE
CCWArc
IF LessThan? EPMoveAngle# Num#('90')
' C' ADD# EPMoveAngle# Num#('270')
ELSE
' C' SUB# EPMoveAngle# Num#('90')
END
END
IF ZMove?
SetInc ' Z/' EPZ# SetAbs
END
EOL
TrackXNO# EPX#
TrackYNO# EPY#
TrackZNO# EPZ#
SetInc
SetFlag('4') { Force G-Code after PolarArc }
RETURN
ckCRC:
IF NOT ArcFeat?
IF LastFeat?
CRCOffC
IF NOT EmptyLine?
SetFlag('4') { Force G-Code after CRCOffC }
END
ELSE
IF XYPlane? AND NOT ZMove?
CRCOnC
IF NOT EmptyLine?
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
SetFlag('4') { Force G-Code after CRCOnC }
END
END
END
END
RETURN
ToolPath:
SetFlagF('5') { Force G-Code after ArcFeat }
SetFlag('7') { G4 FeedRate prior to PolarArc }
EACHFeat
IF PointFeat?
SetFlagF('7') { G4 FeedRate prior to PolarArc }
IF AutoCycle?
IF NOT FirstFeat?
SeqLabC Rapid MoveSXYC EOL
END
IF Flag?('6') { Need to Track Polar CenterPoint for Full Incremental AutoCycle Arcs }
PolarIJ
END
SeqLabC SubCall RepLab 'ł' Tag# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
IF Flag?('4') { Force G-Code at Start of Sub }
SetFlagF('4')
Cycle
END
SeqLabC DrilFeat Dwell
IF Peck?
' E' Peck# ' D' Retract#
END
EOL
END
END
ELSE
SeqLabC ckCRC EOL
DoAbsOrInc
IF AutoCycle? OR NOT AbsValue?
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
IF Flag?('4')
{ Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
SetFlagF('4')
Rapid
ELSE
IF Flag?('5') { Force G-Code after ArcFeat }
Rapid
END
END
SetFlagF('5')
SeqLabC RapidC GetMove EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
SetFlagF('7') { G4 FeedRate prior to PolarArc }
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
IF Flag?('4')
{ Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
SetFlagF('4')
Feed
ELSE
IF Flag?('5') { Force G-Code after ArcFeat }
Feed
END
END
SetFlagF('5')
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FeedC GetMove FeedRateC EOL
DecelMove2
END
SeqLabC FeedC GetMove DecelFeed EOL
ELSE
SeqLabC FeedC GetMove FeedRateC EOL
END
END
ELSE
IF ArcFeat?
SetFlagF('7') { G4 FeedRate prior to PolarArc }
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
IF Equal? SPMoveAngle# EPMoveAngle#
SetFlagF('4') { Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
PolarArc
ELSE
IF Flag?('4')
{ Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
SetFlagF('4')
GetArc
ELSE
IF FirstFeat?
GetArc
ELSE
IF Flag?('5') { Force G-Code after ArcFeat }
IF ArcCW? AND LAST NOT ArcCW?
GetArc
ELSE
IF NOT ArcCW? AND LAST ArcCW?
GetArc
END
END
ELSE
IF LAST NOT ArcFeat?
GetArc
END
END
END
END
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
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
SetFlag('5') { Force G-Code after ArcFeat }
END
END
END
ELSE
IF ArcFeat?
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
SetFlagF('4') { Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
IF Flag?('7') { G4 FeedRate prior to PolarArc }
IF NotEqual? FeedEntry# FeedContour#
SetFlagF('7')
SeqLabC ' G4' FeedRate EOL
END
END
SeqLabC SharnoaMill FeedRateC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
IF LastFeat? OR NEXT NOT ArcFeat?
IF Flag?('3') { Force SeqLab at Start of Sub }
SetFlagF('3')
SeqLab
END
IF Flag?('4') { Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
SetFlagF('4')
IF RapidFeat?
Rapid
ELSE
IF LineFeat?
Feed
END
END
ELSE
IF Flag?('5') { Force G-Code after ArcFeat }
IF RapidFeat?
Rapid
ELSE
IF LineFeat?
Feed
END
END
END
END
SetFlagF('5')
SeqLabC SharnoaMill FeedRateC EOL
IF NotEqual? FeedEntry# FeedContour#
SetFlagF('7') { G4 FeedRate prior to PolarArc }
END
END
END
END
TrackXNO# EPX#
TrackYNO# EPY#
TrackZNO# EPZ#
END
END
NEXTFeat
RestoreAbsOrInc
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SetInc
RETURN
AutoCycCutSub2: {part 2}
ToolPath
SetAbs
SeqLabC
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqLabC CRCOffC EOL
SeqLabC EndSub EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN
AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after TagInc for correct sub calls}
SetPass1 {reset}
RETURN
Milling:
IF AutoCycle?
TagUp TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
TagDown
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
SetFlagF('3') { Force SeqLab at Start of Sub }
SetFlagF('4') { Force G-Code at Start of Sub }
SetAbs
SeqLab Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
SeqLab
SetFlagF('3') { Force SeqLab at Start of Sub }
TagUp TagInc
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SetInc
SeqLabC
IF SPXMove?
' X/' StartPosX#
END
IF SPYMove?
' Y/' StartPosY#
END
EOL
SetAbs
END
END
SeqLabC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
SetInc
SeqLabC
IF SPXMove?
' X/' StartPosX#
END
IF SPYMove?
' Y/' StartPosY#
END
EOL
SetAbs
END
IF FeedEntry?
SeqLabC ZCP2PlusInc EOL
END
END
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FirstCycle?
Rapid
END
SeqLabC RapidC ZInPlusInc EOL
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC SubCall RepLab 'ł' Tag# EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLabC Feed ZCP2 FeedEnt EOL
ELSE
SeqLabC Rapid ZCP2 EOL
END
END
TagDown
SeqLabC EndSub EOL
CloseSub
TagDown
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL
END
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL
END
END
SeqLabC SubCall ' Lł' Tag# EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC EndSub EOL
CloseSub
TagDown
RETURN
CheckPass:
SetFlagF('6') { Need to Track Polar CenterPoint for Full Incremental AutoCycle Arcs }
IF AutoCycle? {use the correct StrtPos}
SetPass1
SetStatusOff
EachFeat
IF NOT Flag?('6')
IF ArcFeat?
IF Equal? SPMoveAngle# EPMoveAngle#
SetFlag('6')
END
END
END
NextFeat
SetStatusOn
SetPass2
ELSE
SetPass1
END
RETURN
SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
SeqLabC WFOStuff EOL
CheckPass
RETURN
GetSpinOn:
IF CoolOff?
SpinOn
ELSE
IF CWSpindle?
' M33'
ELSE
' M34'
END
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
NoQuadStop
TagInit
SetAbs
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('200')
SetMaxRPM('10000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlagF('3') { Force SeqLab at Start of Sub }
SetFlagF('4') { Force G-Code at Start of Sub and after PolarArc, CRCOnC and CRCOffC }
SetFlagF('5') { Force G-Code after ArcFeat }
SetFlagF('6') { Need to Track Polar CenterPoint for Full Incremental AutoCycle Arcs }
SetFlagF('7') { G4 FeedRate prior to PolarArc }
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 {Start of post processing *********************}
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
SeqLabC '/PROGRAM: ' ProgramName$ EOL
END
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 ABSOLUTE INCHES' EOL
END
IF PartsComment?
SeqLabC '/PARTS PROGRAMMED: ' Parts# EOL
END
IF StartToolComment?
SeqLabC '/FIRST TOOL IN SPINDLE' EOL
END
END
OpenSub
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab CRCOff OpToolID ToolChng EOL
SeqLabC Plane EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
SeqLabC ' G4' GetSpinOn Speed EOL
SeqLabC WFOStuff EOL
CheckPass
SeqLabC Rapid StrtPos ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC ' G4' GetSpinOn Speed EOL
SeqLabC WFOStuff EOL
SeqLabC Rapid StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
LoadFeat Num#('0') Num#('0') LAST ClearancePlane1#
IF ZMove?
SeqLabC MoveSXYC MoveZ CoolOff EOL
ELSE
SeqLabC ' G4' CoolOff EOL
END
CloseMP
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC Rapid Home SpinOff EOL
ELSE
SeqLabC ' G4' SpinOff EOL
END
ELSE
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC Rapid Home SpinOff CoolOff EOL
ELSE
SeqLabC ' G4' SpinOff CoolOff EOL
END
END
IF LAST ProgStop?
SeqLabC ' G4 M' EOL
ELSE
IF OptionalStops?
SeqLabC ' G4' ProgStop EOL
END
END
{Start new Operation}
SeqLab CRCOff OpToolID ToolChng EOL
SeqLabC PlaneC EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
SeqLabC ' G4' GetSpinOn Speed EOL
SeqLabC WFOStuff EOL
CheckPass
SeqLabC Rapid StrtPos ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC ' G4' GetSpinOn Speed EOL
SeqLabC WFOStuff EOL
SeqLabC Rapid StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC ' G4' SpinOff CoolOff EOL
SeqLabC ' G4 M' EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC EOL
SeqLabC ' G4' GetSpinOn Speed EOL
SeqLabC Rapid StrtPos ZCP1 EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC ' G4' CoolOff EOL
END
IF NewToolOffset?
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC EOL
SeqLabC Rapid StrtPos ZCP1 SpeedC EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqLabC PlaneC EOL
SeqLabC Rapid StrtPos SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC ' G4' CoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC ZCP2C EOL
IF Repeats?
TagUp TagInc
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?
SeqLabC ZCP3C EOL
ELSE
IF FIFO?
SeqLabC FeedC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC ZCP3C EOL
END
END
SeqLabC CRCOffC EOL
ELSE
IF Drilling?
IF Repeats?
TagUp TagInc
StdSub
SetFlagF('3') { Force SeqLab at Start of Sub }
SetFlagF('4') { Force G-Code at Start of Sub }
SeqLab Rapid StrtPos EOL
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC Cycle StrtPos RLevel ' P' SUB# ClearancePlane2# Num#('.05') ZDepth Dwell
IF Peck?
' E' Peck# ' D' Retract#
END
FeedEnt EOL
IF CallMasterOp?
SeqLabC SubCall RepLab 'ł' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
TagUp NewMasterTag
SeqLabC SubCall RepLab 'ł' Tag# EOL
StartSub
ToolPath
SeqLabC EndSub EOL
CloseSub
TagDown
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SeqLabC Rapid ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
LoadFeat Num#('0') Num#('0') ClearancePlane1#
IF ZMove?
SeqLabC MoveSXYC MoveZ CoolOff EOL
ELSE
SeqLabC ' G4' CoolOff EOL
END
CloseMP
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC Rapid FirstHome SpinOff EOL
ELSE
SeqLabC ' G4' SpinOff EOL
END
ELSE
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC Rapid FirstHome SpinOff CoolOff EOL
ELSE
SeqLabC ' G4' SpinOff CoolOff EOL
END
END
IF ProgStop?
SeqLabC ' G4 M' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC ' G4' EOP EOL
CloseSub
Post2 {organize Subs into one program}
Close
ReTag
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
Wyszukiwarka
Podobne podstrony:
Sharnoa Tiger IV CO M389 89 2Sharnoa Tiger V M810 89 2Sharnoa Tiger V MY02 89Sharnoa Tiger IV [WT] MX24 89 2Sharnoa Tiger III M023 80Centurion VI [DT] MX62 89 1Bandit IV AB [DM] MV32 89 1Nauka o materiałach 2 VIFadal Format 2 [MM] MW60 89Fadal Format 2 [PEP] M116 89 1Fiz pol VI 2014Fanuc MF M4 MS NS SSI M421 89 2więcej podobnych podstron