Fadal Format 1 LH [PW] CU49 16


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

{
10/24/94 [cwh]
C610.81.5 ( from C610.81.4 )

Made changes to ZOnlyRep and FinishSub1 subs to properly handle
Feed connects and clearance moves.
}

{11/8/94
Modified: Fadal Format 1 (PW) C610.81.5
For: Gibbs & Associates
Versions: Catalyst v2.14.12C/Compost 4.21.23
Changes made per Pete Jackson
Changed all occurances of SeqC to SeqLab.
Charles reported a problem involving operations that do not change coordinate systems from
previous operations.
Added ClearCSOffset at NotSameToolWFO and SameToolWFO subs.
DWB}

{11/16/94 Fixed Program Stop bug in NewToolOp2. Tom Hubina}

{
Format: Fadal Format 1 (PW) C610.00
12/22/94
Changed version number to .00 from .81.7 per Fanuc 6M (PW) C001.00.03
Changed all CSAngleAC and CSAngleBC calls to CSAngleA and CSAngleB to output the A and B
commands at the start of every operation.
Added AAxisAvail? and BAxisAvail? checks to CSAngleA and CSAngleB subs
Added return to CS1 moves to End2
Added G92 reset of A and/or B axis to End2
Changed NotSameTool WFO so it would restate the current WFO if no change in CS
Added ClearCSOffset to OpenMP: CloseMP: and SubCSMP:
Added if AChange? OR BChange? to home postition call-out in SameToolOp1
Replaced SetZRepInc and RestoreAbsOrInc with one sub called DoAbsOrInc. Any line with SetZRepInc now
has DoAbsOrInc as the first command after the SeqC.
TH}

{
Format: Fadal Format 1 (PW) C610.00.01
1/13/95
Formatted TrackZNO# to #4
}

{ Added ClearCSOffset to SubCSMP TH}

{
Changed SeqC's to SeqLabs
4/21/95
TH}

{
Fixed unwind code in End2:
5/25/95
TH}

{6/9/95
Fixed CRC so it won't output on a helix
TH}

{7/10/95
Updated: Fadal Format 1 (PW) C610.00.04
For: Gibbs & Associates
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.06/Catalyst v2.14.40/Compost 4.21.30/1.0a
Changes made per Pete Jackson
Updated to Version 4.2 per Fanuc 6M M001.81.2g Format.
Added CkCRC sub for CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Added logic to suppress output of CRCOnC on ZMove Feature.
Added logic to suppress output of CRCOnC in OneFeat ToolPath.
Moved ResetCRCNum at start of ToolPath to CkCRC sub.
Added support of CRC during multiple pocket dog-bone operation.
Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
Outputs G41/G42 on First LineFeat after Z Plunge.
Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
Assures that G40 is not output prior to LastFeat.
Added CRCOffC to ZMoveOnly Feature at ToolPath RapidFeat.
Outputs G40 at all Z Retract blocks.
Deleted DoArcCRC sub.
CkCRC sub now also called at FormatArc sub.
Deletes use of Flag(8)
Deleted CRCValue sub.
Not needed because problem has been resolved, see CNCVIS1 M610.81.7, 5/5/93.
Moved SetFlag(4) from InitOp and NewToolOp1 to start of ToolPath.
Simplified output of Canned Drill Cycle block at IF Drilling.
DWB}

{8/23/95 - Updated to .10 format TH}

{
12/15/95
Added CSAngleA CSAngleB to MP1ToollAllPXcp
TH}

{1/17/96, Updated .10 to .11 version, MPK}

{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .12, MPK}

{4/11/97
Updated: Fadal Format 1 (PW) C610.12
Created: Fadal Format 1 (PW) C610.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 (NW) D001.15 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.
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.
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}

{23Jul98
Original: Fadal Format 1 (PW) C610.15
Created: Fadal Format 1 LH (PW) Cxxx.16
Created C_Style .16 Advanced Mill Longhand Post per Fanuc 6M LH (PW) CV83ż2
Charles Winston}

{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(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(Dwell#,2)
FORMAT(ToolDiameter#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(TrackXNO#,4)
FORMAT(TrackYNO#,4)
FORMAT(TrackZNO#,4)
FORMAT(TrackZ#,4)
FORMAT(Recall#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(PartNum#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(Parts#,5)
FORMAT(Recall#,6)
FORMAT(RapidF#,7)

{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

CSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

CSWFO:
'E' ADD# CSPartNum# Num#('0')
RETURN

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

WFOStuff:
IF Flag?('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
IF NOT SameTool?
IF WFOCS?
CSWFO
ELSE
IF MultipleParts? AND WorkFixtureOffsets?
WFO
ELSE
WFO1
END
END
ELSE
IF WFOCS?
IF ChangeCS?
CSWFO
END
END
END
END
SetFlagF('2') { Do not output WFO second time WFOStuff is called for MP-WFO-OTAP-ECP }
RETURN

CSG52:
{Not Supported}
RETURN

G52Stuff:
{Not Supported}
RETURN

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

DoCSComment:
SeqLab '* CS#' CS# ' - ' CSComment$ EOL
RETURN

ModCSOffsetA:
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetA# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetA# LAST CSOffsetA#
'-'
END
END
END
Save# Num#('11') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('11') SUB# Recall# Num#('11') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('11') Num#('360')
RETURN

ModCSOffsetB:
IF NOT Flag?('9')
IF FirstOperation?
IF LessThan? CSOffsetB# Num#('0')
'-'
END
ELSE
IF LessThan? CSOffsetB# LAST CSOffsetB#
'-'
END
END
END
Save# Num#('11') TRUNC# DIV# CSOffsetB# Num#('360')
IF LessThan? CSOffsetB# Num#('0')
Save# Num#('11') SUB# Recall# Num#('11') Num#('1')
END
SUB# CSOffsetB# MUL# Recall# Num#('11') Num#('360')
RETURN

DoCSWFOComment:
IF FirstOperation? OR NewTool? OR ChangeCS?
SetFlag('9')
SeqLab '* ' CSWFO ' = X' CSOffsetX# ' Y' CSOffsetY# ' Z' CSOffsetZ# EOL
SetFlagF('9')
IF Flag?('6') { TRUE = B-Style Output, FALSE = C-Style Output }
IF AAxisAvail?
' A' CSOffsetA#
END
IF BAxisAvail?
' B' CSOffsetB#
END
END
EOL
END
RETURN

CSComments:
DoCSComment
IF WFOCS?
DoCSWFOComment
END
RETURN

DoPartCycleComment:
IF MultipleParts? AND UseComments? AND SubComment?
'* PART NO. ' PartNum# EOL
END
RETURN

DoCycleComment:
IF UseComments? AND SubComment?
'* CYCLE START' EOL
END
RETURN

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

CSAngleA:
IF AAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'A0.'
ELSE
'A' ModCSOffsetA
END
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
IF Flag?('6') AND WFOCS? { TRUE = B-Style Output, FALSE = C-Style Output }
'B0.'
ELSE
'B' ModCSOffsetB
END
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLab PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLab EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqLab FeedC ZInC
IF NOT EmptyLine? { Mostly for FeedConnect ZShiftOnly with ZMove }
FeedEntC
END
EOL
ELSE
SeqLab RapidC ZInC EOL
END
RETURN

PRIMEZCP2C:
IF Flag?('7')
PRIME ZCP2C
ELSE
'Z' TrackZ# ADD# CSOffsetZ# PRIME ClearancePlane2#
END
RETURN

ExitMove:
IF NOT FeedConnect?
CRCOffC
IF FIFO?
FeedC PRIMEZCP2C FeedEntC
ELSE
RapidC PRIMEZCP2C
END
END
RETURN

ExitMove2:
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
IF FIFO?
FeedC ZCP3C FeedEntC
ELSE
RapidC ZCP3C
END
END
RETURN

AbsValueC:
IF NOT AbsValue?
AbsValue
END
RETURN

IncValueC:
IF AbsValue?
IncValue
END
RETURN

AbsOrIncC:
IF AbsoluteMoves?
AbsValueC
ELSE
IncValueC
END
RETURN

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

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
CRCOffsetC
END
RETURN

FormatArc:
ckCRC
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN

DoPeck: { LongDrillStuff }
{ Not Supported }
RETURN

DrillFeature: { LongDrillStuff }
{ Not Supported }
RETURN

ToolPath:
EACHFeat
IF PointFeat? { Drilling Only }
SeqLab MoveSXYZC EOL
ELSE
IF FirstFeat?
SeqLab 'G8' EOL
END
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLab ckCRC RapidC MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLab ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLab 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 FormatArc ArcFeedC ckCRCNum EOL
DecelMove2
END
SeqLab FormatArc DecelFeed ckCRCNum EOL
ELSE
SeqLab FormatArc ArcFeedC ckCRCNum EOL
END
NEXTQuadrant
IF LastFeat?
SeqLab CRCOffC EOL
END
END
END
END
END
NEXTFeat
RETURN

AutoCycCutSub1: {part 1}
CalcACSRXY {calc tool position, CalcAutoCycleStatusRecordXY}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
IF Repeats? AND ZShiftOnly?
EntryMove
END
SeqLab IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
SeqLab AbsOrInc CRCOffC
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
EOL
SetSRSubXY {restore SR to 1st position value}
ReSetPass2 {restore for positioning moves}
RETURN

Milling:
EntryMove
ToolPath
RETURN

CutAutoCycle:
EACHFeat
DoCycleComment
IF SPXMove? OR SPYMove?
IF FIFO?
Rapid
END
SeqLab RapidC MoveSXYC EOL
END
AutoCycCutSub1
IF Repeats?
IF ZShiftOnly?
EachRep
IF NOT FirstCycle?
IF FeedConnect?
DoCycleComment
IF SPXMove? OR SPYMove?
SeqLab FeedC MoveSXYC FeedEntC EOL
END
AbsOrInc
ELSE
SeqLab AbsOrInc ExitMove EOL
DoCycleComment
IF SPXMove? OR SPYMove?
SeqLab IncValue RapidC MoveSXYC EOL
AbsOrInc
END
IF FeedEntry? AND NOT FIFO?
SeqLab RapidC ZCP2 EOL
END
END
EntryMove
SeqLab IncValue EOL
END
ToolPath
NextRep
END
ELSE
Milling
END
AutoCycCutSub2
NEXTFeat
RETURN

ZonlyRep:
{ NOTE: This Post Processor takes care of Z Clearance. }
EachRep
DoCycleComment
IF NOT FirstCycle?
CRCOffC
IF SPXMove? OR SPYMove?
IF FeedConnect?
FeedC
ELSE
RapidC
END
SeqLab MoveSXYC EOL
END
IF FeedEntry? AND NOT FeedConnect?
SeqLab ZCP2C EOL
END
END
EntryMove
ToolPath
SeqLab ExitMove EOL
NextRep
RETURN

LongDrillStuff:
SeqLab DrillCP EOL
GetCycle
SeqLab StrtPosC EOL
ToolPath
LoadFeat Num#('0') Num#('0') ClearancePlane3#
IF ZMove?
SeqLab RapidC ZCP3C EOL
END
RETURN

DrillStuff:
IF Pulse? { Positive Approach On }
SeqLab 'M46' EOL
END
SeqLab DrillCP EOL
GetCycle
SeqLab
IF RigidTap?
'G84.1'
ELSE
Cycle
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF RigidTap?
FadalTapF FadalTapQ
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ# {.81.2}
RETURN

GetSpeed:
IF Drilling?
GetCycle
END
IF Drilling? AND RigidTap?
IF FirstOperation? OR NewTool?
SeqLab Speed EOL
END
SeqLab SpeedC EOL
SeqLab 'G84.2' EOL
ELSE
IF FirstOperation? OR NewTool?
SeqLab Speed SpinOn EOL
ELSE { SameTool }
IF LAST ProgStop?
SeqLab SpeedC SpinOn EOL
ELSE
SeqLab SpeedC EOL
END
END
END
RETURN

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

CheckPass: {use the correct StrtPos}
IF AutoCycle?
SetPass2
ELSE
SetPass1
END
IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ClearCSOffset
END
RETURN

OpGuts:
ResetCRCNum
RapidF# { No Output }
IF Milling?
SeqLab ZCP2C EOL
IF AutoCycle?
CutAutoCycle
IF Repeats? AND FeedConnect?
ELSE
SeqLab ExitMove2 EOL
END
SetPass1
ELSE { NOT AutoCycle }
IF Repeats? AND ZShiftOnly?
ZonlyRep
ELSE
Milling
END
SeqLab CRCOffC ExitMove2 EOL
END
ELSE
IF Drilling?
DrillStuff
ToolPath
SetDrillEndOpZ
IF Pulse? { Positive Approach Off }
SeqLab 'M47' EOL
ResetCool
END
SeqLab Rapid 'G80' ZCP3 EOL
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('15000')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
Save# Num#('1') Num#('0') { MultipleParts Current Tool FirstOp# }
Save# Num#('2') Num#('0') { MultipleParts ToolOp# Counter }
Save# Num#('3') Num#('0') { LongHand PeckCycle }
Save# Num#('11') Num#('0') { CSAngleA and CSAngleB }
SetFlagF('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
SetFlag('3') { Incrementing WFOs in effect }
SetFlag('4') { This post supports IncWFO/DecWFO }
SetFlagF('6') { TRUE = B-Style Output, FALSE = C-Style Output }
SetFlag('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
SetFlagF('9') { CSAngleA, CSAngleB and DoCSWFOComment }
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
END

IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
IF Equal? NumOfCS# Num#('1') { 3 Axis Part - Output M-Style }
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
ELSE
IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('40')
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to '
IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-WFO'
END
' style output. )' EOL
END
END
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
END
ELSE
IF LTEqual? NumOfCS# Num#('40') {****}
SetWFOCS { use WFO for CS changes }
ELSE
SetFlagF('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to '
IF Flag?('7') { TRUE = Local WFO Coordinates, FALSE = D-Style Output }
'G52'
ELSE
'non-WFO'
END
' style output. )' EOL
END
END
END
END
END
RETURN

InitOp:
EOR EOL
SeqLab 'O' Program#
IF UseComments? AND ProgramNameComment?
'*' ProgramName$
END
EOL
SetProgNum('0')
EachOp
IF FirstOperation?
IF ToolChangeAtHome?
SetHome
END
END
NextOp
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 NOT IN SPINDLE' EOL
END
END
RestoreScale
RETURN

FirstOp1:
SeqLab OpToolID ToolChng EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

FirstOp2:
{ G52Stuff } { Not Supported }
GetSpeed
CheckPass
SeqLab Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
RETURN

FirstOp3:
SeqLab OfstOn CoolOn EOL
RETURN

NewToolOp1:
SeqLab Rapid AbsOrInc SpinOff CoolOff EOL
SeqLab 'G53Z0' EOL { OfstOff }
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLab 'G53' PRIME Home EOL
END
IF LAST ProgStop?
SeqLab 'M00' EOL
ELSE
SeqLab ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
SeqLab OpToolID ToolChng EOL
DoPartCycleComment
DoOpComments
DoPostScript
RETURN

NewToolOp4:
{ G52Stuff } { Not Supported }
GetSpeed
CheckPass
SeqLab Plane AbsOrInc Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
RETURN

NewToolOp5:
SeqLab OfstOn CoolOn EOL
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLab 'G0H0Z0' CoolOff SpinOff 'M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLab CoolOff EOL
END
IF NewToolOffset? OR AChange? OR BChange?
SeqLab 'G0H0Z0' EOL
ELSE
END
END
RETURN

SameToolOp2: {Start new Operation}
DoPartCycleComment
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
{ G52Stuff } { Not Supported }
IF LAST ProgStop?
GetSpeed
SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
SeqLab OfstOn CoolOn EOL
ELSE
GetSpeed
SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
IF NewToolOffset? OR AChange? OR BChange?
SeqLab OfstOn EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLab CoolOn EOL
END
END
RETURN

End1:
SeqLab Rapid AbsOrInc SpinOff CoolOff EOL { 'G0G90M5M9' }
SeqLab 'G53Z0' EOL { OfstOff }
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqLab AbsOrIncC Rapid PRIME FirstHome EOL
END
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetB# Num#('0')
ELSE
SeqLab AbsOrIncC
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
SeqLab Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
IF ProgStop?
SeqLab 'M00' EOL
ELSE
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart?
SeqLab ProgStop EOL
END
END
RETURN

End3:
SeqLab 'X0Y0Z0E0H0' EOL
SeqLab EOP EOL
EOR EOL
Close
Reseq
{ File Length Comments deleted 2/16/93 }
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
IF FirstOperation? OR EquallySpacedOffsets?
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
END
IF FirstOperation?
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END
OpGuts
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
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
OpGuts
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
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
OpGuts
RETURN

NoMPs: {no multiple parts}
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
OpGuts
RETURN

MasterSub:
IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END
RETURN

EndPartSub:
{End of program ************************************************************}

{finish last operation}
End1
End2
RETURN

NewPart1: {Finish off last Part}
IF FullUp?
SeqLab Rapid AbsOrInc SpinOff CoolOff EOL
SeqLab 'G53Z0' EOL { OfstOff }
END
{DoEndOpPS}
RETURN

NewPart2: {Start new Part}
SameToolOp2
RETURN

NewPart3: {Start new Part}
SetFlag('2') { Need to output WFOStuff twice for MP-ESO-OTAP-ECP, once for all others }
{ G52Stuff } { Not Supported }
GetSpeed
SeqLab PlaneC AbsOrInc Rapid StrtPos CSAngleA CSAngleB WFOStuff EOL
IF FullUp?
SeqLab OfstOn CoolOn EOL
END
RETURN

ToggleIncDecWFO:
IF Flag?('3') { Incrementing WFOs in effect }
SetFlagF('3')
ELSE { Decrementing WFOs in effect }
SetFlag('3')
END
RETURN

MPLoop:
Save# Num#('2') Recall# Num#('1')
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
NewWFO
ELSE
LastWFO
END
EachWFO
ELSE
EachPart
END
IF AllToolsOnePart?
EachOp
MasterSub
NextOp
EndPartSub
ELSE { OneToolAllParts }
EachOp
IF Equal? Operation# Recall# Num#('2') { Valid Tool Op }
IF FirstOperation? OR NewTool?
IF FirstPart? AND Flag?('3') { Incrementing WFOs in effect }
MasterSub
ELSE
IF LastPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
MasterSub
ELSE
NewPart1
NewPart2
NewPart3
OpGuts
END
END
ELSE
MasterSub
END
IF LastOp?
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') Num#('0')
END
END
Save# Num#('2') Recall# Num#('1')
ELSE
IF NEXT SameTool?
Save# Num#('2') NEXT Operation#
ELSE
IF LastPart? AND Flag?('3') { Incrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
IF FirstPart? AND NOT Flag?('3') { Decrementing WFOs in effect }
Save# Num#('1') NEXT Operation#
Save# Num#('2') Num#('0')
ELSE
Save# Num#('2') Recall# Num#('1')
END
END
END
END
END
NextOp
END
IF WorkFixtureOffsets?
IF Flag?('3') { Incrementing WFOs in effect }
IncWFO
NextWFO
DecWFO
ELSE { Decrementing WFOs in effect }
DecWFO
NextPrevWFO
IncWFO
END
IF Flag?('4') { This post supports IncWFO/DecWFO }
ToggleIncDecWFO
END
ELSE
NextPart
END
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}
InitOp

IF MultipleParts?
IF WorkFixtureOffsets?
{'NOTE: This Post Processor does not support Work Fixture Offsets for Multiple Parts.' EOL
'It is recommended that you change your selection to Equally Spaced Offsets.' EOL}
END
IF AllToolsOnePart?
MPLoop
ELSE
EachOp
IF FirstOperation?
Save# Num#('1') Operation#
END
NextOp
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
MPLoop MPLoop MPLoop MPLoop MPLoop
EndPartSub
END
ELSE
EachOp
MasterSub
NextOp
EndPartSub
END
End3


Wyszukiwarka

Podobne podstrony:
Fadal Format 2 LH [NM] MU20 16
Fadal Format 2 LH [Co] MW66 12m
Fadal Format 1 LH AI MV41 89 1
Fadal Format 1 LH [FC] MU73 89 1
Fadal Format 1 LH [PV] MU74 89
Fadal Format 1 LH [CC] MU17 89
Fadal Format 2 LH WT MX53 89 4
Fadal Format 2 LH PTT MW94 89m
Fadal Format 2 LH [KE] MW01 12
Fadal Format 1 [PW] C610 16 2m
Fadal Format 2 [PW] C611 16 2
Fadal Format 2 [NW] D611 16 2m
Fadal Format 2 [FW] B611 16 2
Fadal Format 2 NDT70 16

więcej podobnych podstron