{Change Comments ***********************************************************}
{3/28/90
Modified: Anilam Crusader 2 M158.70.3
For: Apple Computer
Created metric version.
JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}
{2/13/91
Modified: Anilam Crusader 2 M158.71m
Updated to Version 3.2 per Fanuc 6M M001.76.2 Format.
Commented out UseSeparateSubCalls and SetMaxSeparateSubCalls per customer's request.
Changed literal 'E' to literal 'G29E' at all CloseSub commands.
This post processor does not support MultipleParts, SpinOn/Off, Speed or CoolOn/Off.
DWB}
{4/3/91
Modified: Anilam Crusader 2 M158.76.2m
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}
{10/24/91
Modified: Anilam Crusader 2 M158.79m
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 6M M001.81 Format.
DWB}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '########;0'
#6 = '#.###;0.'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Tag#,5)
FORMAT(Dwell#,6)
FORMAT(Peck#,6)
{Prog Subroutines **********************************************************}
DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Tag# ' )' EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
'( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
'( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
'( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
IF NOT Metric? { CAM file is in English, Tools and ToolPath }
SetScale('25.4') { change to Metric, this is a Metric Post }
END
END
RETURN
PSInit: {reset flags}
RotateF
RETURN
PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC 'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC 'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC 'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC 'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN
DoPostScript:
PSInit
EachPS
SeqC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
GetG4:
SeqC 'G4' EOL
RETURN
EntryMove:
IF FeedEntry?
SeqC Feed FeedEnt EOL
END
GetG4
RETURN
StartSub:
OpenSub
DoSubComment
SeqC 'G29S' Tag# EOL
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:
SeqC 'G29D' RepCycs EOL
SeqC 'G29C' Tag# EOL
SeqC 'G29E' EOL
StartSub
RETURN
FinishSub1: {part 1}
SeqC CRCOffC EOL
IF NOT FeedConnect?
GetG4
END
RETURN
FinishSubG92: {part 2}
SeqC 'G29E' EOL { EndSub }
CloseSub
RETURN
FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
MoveXY
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN
StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC CRCOnC FeedC MoveXYC FeedRateC EOL
DecelMove2
END
SeqC CRCOnC FeedC MoveXYC DecelFeed EOL
ELSE
IF XMove? OR YMove?
SeqC CRCOnC FeedC MoveXYC FeedRateC EOL
END
END
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC 'G29D1' EOL
SeqC 'G29C' Tag# EOL
SeqC 'G29E' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC MoveSXYC EOL {.80.01}
IF NOT FirstFeat?
GetG4
END
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqC CRCOffC EOL
SeqC RapidC MoveXYC EOL
ELSE
IF XMove? OR YMove?
SeqC RapidC MoveXYC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC CRCOffC EOL
SeqC FeedC MoveXYC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
ELSE
StdLine
END
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc 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
SetAbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO? {.81}
SeqC FeedC FeedRateC EOL
ELSE
SeqC RapidC EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
GetG4
END
SeqC 'G29E' EOL { EndSub }
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?
TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
SetAbsOrInc
SeqC Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
TagInc
EachCycle
IF FeedConnect?
SeqC Feed FeedEnt EOL
GetG4
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqC Rapid EOL
GetG4
END
SeqC Feed FeedEnt EOL
GetG4
ELSE
SeqC Rapid EOL
GetG4
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC 'G29D1' EOL
SeqC 'G29C' Tag# EOL
SeqC 'G29E' EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqC Feed FeedRate EOL {.69}
ELSE
SeqC Rapid EOL {.69}
END
GetG4
END {.69}
SeqC 'G29E' EOL { EndSub }
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqC FeedC FeedEnt EOL {.71.2, changed to FeedC}
GetG4
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
GetG4
END
SeqC Feed FeedEnt EOL
GetG4
ELSE
SeqC RapidC EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
GetG4
END
END
SeqC 'G29D1' EOL
SeqC 'G29C' Tag# EOL
SeqC 'G29E' EOL
NextCycle
StartSub
ToolPath
FinishSub1
SeqC 'G29E' EOL { EndSub }
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
Plane { No OutPut }
SetAbsOrInc
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
SkipZ
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
' 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
IF MultipleParts?
'**** This post does not support MultipleParts ****' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL IN SPINDLE )' EOL
END
END
OpenSub
IF NOT Metric? { CAM file is in English, Tools and ToolPath }
SetScale('25.4') { change to Metric, this is a Metric Post }
END
DoOpComments
DoPostScript
SetAbs
Plane { No OutPut }
Seq CRCOff 'G52G70' EOL
SeqC 'T0' EOL
SeqC ToolOfst EOL
CheckPass
SetAbsOrInc
SeqC Rapid StrtPos EOL
ELSE
IF NewTool?
{Finish off last Operation}
SeqC 'G4T0' EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqC Rapid Home EOL
END
IF LAST ProgStop?
GetG4
ELSE
SeqC ProgStop EOL {G4}
END
{Start new Operation}
Seq OpToolID EOL
DoOpComments
DoPostScript
SetAbs
Plane { No OutPut }
SeqC CRCOff EOL
SeqC ToolOfst EOL
CheckPass
SetAbsOrInc
SeqC Rapid StrtPos EOL
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC 'T0' EOL
GetG4
{Start new Operation}
GetStartOfSameTool
SeqC Rapid StrtPos EOL
SeqC ToolOfst EOL
ELSE
IF NewToolOffset?
SeqC 'T0' EOL
{Start new Operation}
GetStartOfSameTool
SeqC Rapid StrtPos EOL
SeqC ToolOfst EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqC Rapid StrtPos EOL
END
END
END
END
END {common point for all operations}
IF Milling?
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
SeqC CRCOffC EOL
GetG4
ELSE
IF Drilling?
IF Repeats?
NewProg
TagInc
StdSub
SetAbsOrInc
SeqC Rapid StrtPos EOL
END
GetCycle
GetG4
ToolPath
IF Repeats?
FinishSubG92
END
GetG4
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
SeqC 'G4T0' EOL
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SetAbsOrInc
SeqC Rapid FirstHome EOL
END
IF ProgStop?
GetG4
END
SeqC 'G29E' EOL
CloseSub
Post2 {organize Subs into one program}
SeqC 'G29E' EOL
EOR EOL
Close
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:
Anilam Crusader II SM M987 81 4Anilam Crusader [USS] M195 89Anilam Crusader L051 82Anilam Crusader II G&C M995 89Anilam Crusader (VT) M220 87mAnilam Crusader 2[MD] M463 89Anilam Crusader 2 L231 82Anilam 1400 [UPE] CU05 15 1crusadesCastles & Crusades Martial Artist ClassCastles & Crusades The Eel s Head Brewerywięcej podobnych podstron