Sharnoa Udo M005 80


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

{7/24/90, Added InitProg globally to posts with this remark, DWB}

{5/7/91
Modified: Sharnoa Tiger III CO M389.79
For: Gibbs & Associates
Updated to new 4.0 Version per Fanuc 6M M001.80
DWB}

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

#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '########;0'
#6 = '####.###;'
#7 = 'ą####.####;0' { Used for FORMATting in ZOnlyRep. }

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane3#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(RepeatX#,4)
FORMAT(RepeatY#,4)
FORMAT(RepeatZ#,4)
FORMAT(EPX#,4)
FORMAT(EPY#,4)
FORMAT(EPZ#,4)
FORMAT(SPZ#,4)
FORMAT(ArcR#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}

{Prog Subroutines **********************************************************}

DoSubComment:
IF UseComments? AND SubComment?
IF AutoCycle?
NewProg
'/ SUB NUMBER: ' Program# EOL
ELSE
'/ CYCLE START' EOL
END
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
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
END
RETURN

PSInit: {reset flags}
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqLabC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqLabC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

EntryMove:
IF AutoCycle? { Implies Incremental }
IF FeedEntry?
SeqLabC Feed ' Z/' SPZ# FeedEnt EOL
ELSE
SeqLabC RapidC ' Z/' SPZ# EOL
END
ELSE
FindAnyZMoves
IF NoZMoves?
SeqLabC FeedC ' Z-#5' FeedEnt EOL
SkipZ
ELSE
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
SeqLabC FeedRate EOL
END
END
RETURN

StartSub:
{ NOTE: This Post Processor outputs unconditional jumps. }
IF AutoCycle?
OpenSub
END
DoSubComment
'>' Tag# EOL
SeqLab
RETURN

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

StdSub:
{ NOTE: This Post Processor outputs unconditional jumps. }
IF AutoCycle?
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3)' UdoReps EOL
END
StartSub
RETURN

FinishSub1: {part 1}
{ NOTE: This Post Processor outputs unconditional jumps. }
UnSkipZ
IF NOT FeedConnect?
IF NOT AutoCycle?
SeqLabC RapidC ZCP3 EOL
END
END
RETURN

FinishSubG92: {part 2}
{ NOTE: This Post Processor outputs unconditional jumps. }
SeqLabC Preset ' X' RepeatX# ' Y' RepeatY# ' Z' RepeatZ# EOL { Incremental Shift. }
IF AutoCycle?
SeqLabC EndSub EOL
CloseSub
ELSE
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3)' UdoReps EOL
END
SeqLabC ' G99' EOL { Restore Control to Original Origin. }
RETURN

OpenMP:
{ NOTE: This Post Processor outputs unconditional jumps. }
StartSub
RETURN

CloseMP:
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3)' UdoReps EOL
RETURN

CheckMove:
IF AutoCycle? { Implies Incremental }
IF ArcFeat?
' X/' EPX# ' Y/' EPY#
IF ZMove?
' Z/' EPZ#
END
' R' ArcR#
ELSE { NOT ArcFeat }
IF RapidFeat?
IF NOT FirstFeat? AND LAST ArcFeat?
Rapid
ELSE
RapidC
END
ELSE
IF LineFeat?
IF NOT FirstFeat? AND LAST ArcFeat?
Feed
ELSE
FeedC
END
END
END
IF XMove?
' X/' EPX#
END
IF YMove?
' Y/' EPY#
END
IF ZMove?
' Z/' EPZ#
END
END
ELSE { NOT AutoCycle }
SharnoaMill
END
RETURN

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

ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
SeqLabC MoveSXYC EOL
IF AutoCycle?
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3) E1' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqLabC CheckMove FeedRateC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC CheckMove EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqLabC CheckMove FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLabC CheckMove FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
IF AutoCycle? AND LAST NOT ArcFeat?
IF ArcCW?
' G2'
ELSE
' G3'
END
END
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC CheckMove ArcFeedC EOL
DecelMove2
END
SeqLabC CheckMove DecelFeed EOL
ELSE
SeqLabC CheckMove ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SetAbs
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
SeqLabC RapidC ZCP2 EOL
END
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?
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
IF AutoCycle?
TagInc
END
SetAbs
SeqLabC Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagInc
EachCycle
IF FeedConnect?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC Rapid ZCP2PlusInc EOL {.69 added Rapid, reads better}
{can't call for cycle = 1, .69 changed to ZCP2PlusInc}
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3) E1' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
SeqLabC Rapid ZCP2 EOL {.69}
END {.69}
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
SeqLabC ' G4'
IF FeedEntry? AND NOT FeedConnect?
' :' ClearancePlane2# '=25' { Load value of ClearancePlane2# into Parameter #25. }
END
' :' SPZ# '=26' EOL { Load value of SPZ# into Parameter #26. }
StartSub
SeqLabC Connect StrtPos EOL {.71.2, added Connect}
IF FeedEntry?
IF NOT FeedConnect?
SeqLabC ' Z#25' EOL { Rapid Tool in Z to value stored in Parameter #25. }
END
SeqLabC Feed ' Z#26' FeedEnt EOL { Feed Tool in Z to value stored in Parameter #26. }
ELSE
SeqLabC RapidC ' Z#26' EOL { Rapid Tool in Z to value stored in Parameter #26. }
SeqLabC FeedRate EOL
END
SkipZ
ToolPath
UnSkipZ
IF NOT FeedConnect?
SeqLabC RapidC ZCP3C EOL
END
SeqLabC ' G4'
IF FeedEntry? AND NOT FeedConnect?
{ Add value of ClearancePlane3# and Parameter #26 and store in Parameter #25. }
FORMAT(ClearancePlane3#,7)
' :#26' ClearancePlane3# '=25'
END
FORMAT(RepeatZ#,7)
' :#26' RepeatZ# '=26' EOL { Add value of RepeatZ# to Parameter #26. }
FORMAT(ClearancePlane3#,4)
FORMAT(RepeatZ#,4)
SeqLabC SubCall RepLab 'ł' Tag# ' (2) (3)' UdoReps EOL
SeqLabC ' G4'
IF FeedEntry? AND NOT FeedConnect?
' :' ClearancePlane1# '=25' { Load value of ClearancePlane1# into Parameter #25. }
END
' :' ClearancePlane1# '=26' EOL { Load value of ClearancePlane1# into Parameter #26. }
RETURN

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

{Start of executable Prog **************************************************}

{setup and initializations}
InitProg
SetAbs
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50')
SetMaxRPM('10000')
SetMaxFeed('500')
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 AutoCycle?
QuadStop
ELSE
NoQuadStop
END
IF FirstOperation?
TagInc
EOR EOR EOL
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
IF Metric? {CAM file is in metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
SeqLabC '/TOOL Z-DEPTH FEED LINE' EOL
'>' Tag# EOL

{ The following line was commented out because ReTag modifies the literal ?'s. }
{SeqC ' G37 L' PutSeq ' E4:#4?:#5?10:#6?20:#7?30' EOL}

SeqLab ' G37 L' 'ł' Tag# ' E4:#4 :#5 10:#6 20:#7 30' EOL
SeqLabC ' G98 X1 Y1 Z1' EOL
SeqLabC ' G70 L#7' EOL
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
DoOpComments
DoPostScript
SeqLabC ' G4 (2).01 (3).01' EOL
SeqLabC SetCRC ' T#4 M3 ()/#2 (1)/#3' EOL
SeqLabC Plane EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC Rapid StrtPos ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
DoEndOpPS
IF LAST ProgStop?
SeqLabC ' M' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

DoOpComments
DoPostScript
SeqLab ' G4 (2).01 (3).01' EOL
SeqLabC SetCRC ' T#4 M3 ()/#2 (1)/#3' EOL
SeqLabC Plane EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC Rapid StrtPos ZCP1 EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC ' M' EOL
END

{Start new Operation}

DoOpComments
DoPostScript
SeqLabC ' G4 (2).01 (3).01' EOL
SeqLabC SetCRC ' T#4 M3 ()/#2 (1)/#3' EOL
SeqLabC Plane EOL
CheckPass
SeqLabC Rapid StrtPos ZCP1 EOL
END
END
END {common point for all operations}
IF Milling?
IF AutoCycle?
TagInc
END
SeqLabC ZCP2 EOL
IF Repeats?
TagInc
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
IF UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
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
UnSkipZ
SeqLabC Rapid ZCP3 EOP EOL
ELSE
IF Drilling?
IF Repeats?
TagInc
StdSub
SeqLab Rapid StrtPos EOL
END
SeqLabC DrillCP EOL
GetCycle
SeqLabC Cycle StrtPos ZDepth RLevel Dwell Peck Retract FeedEnt EOL
EachFeat
SeqLabC DrilFeat EOL
NextFeat
IF Repeats?
FinishSubG92
END
SeqLabC Rapid ZCP3 EOP EOL
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?
CloseMP
END
DoEndOpPS
IF ProgStop?
SeqLabC ' M' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
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 III M023 80
żuraw 80
Dynapath 20M M074 80 1
OLYMPUS µ [mju] III 80 instrukcja obsługi
cmd=kom jedno,80&serwis=1
M005
Fanuc 11M MS [HM] M433 80

więcej podobnych podstron