Cin Acr 950HMC [T40] DW32 15 6


{
MILL=T
LATHE=F
SIMPLE_ROT_POS=F
ROTARY_MILL=F
ADV_MILL=T
SUBS=T
MILLTURN_Y-AXIS=F
METRIC=F
}

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

{5/13/97,
Initial: Cin Acr 950MC Maxim C920.12.4
Created: Cin Acr A2100 [AG] Mxxx.15
For: Amarillo Gear
Stripped out all rotary move stuff, this is a three axis post,
updated per Fanuc 6M M001.15
made numerous changes including:
added G95 to FirstOp and NewTool milling ops and all drilling ops except tapping, user will enter IPR feedrates,
post no longer supports retract to CP1 for drilling. W word handles retract amount, this is outputs TCZ# so
that user can explicitly set retract amount,
added variable before drill cycle to set W amount,
added call to W variable in pointfeat when drilling,
changed subs per A2100 format,
restructred saftey start blocks in FirstOp and NewTool,
WFOStuff will only output if NewWFO? is true,
added empty lines between tools and programs,
added warning comment to program beginning,
arcs are set to R format,
eliminated labels and numbers for plane command in form,
drill depths are now an unsigned value, MPK}

{5/13/97,
Initial: Cin Acr 950MC Maxim C920.12.4
Created: Cin 850 [AG] Mxxx.15
For: Amarillo Gear
Changed subs to 850 standard,
changed drilling variable to G10 type,
Changed program end to M30, deleted literal M30 at program end,
deleted literal 'G98X0' in NewToolOp2 and 'X0Y9.' in End1,
added literal 'X0Y10.Z10.' to End2,
drill depths are signed again,
MPK}

{5/16/97,
Initial: Cin Acr 850MC [AG] MY94.15
Created: Cin Acr 850MC [AG] MY94.15.1
Reformatted 'F' in default formats to 4 decimal places for IPR feedrates,
Put output of G95/G94 just after Cycle call in drilling,
Put Rapid before AbsOrInc in various StrtPos block,
Deleted output of 'K' FeedTapIPR#('1') for Rigidtapping, no just uses FeedEnt,
Took spaces out of variable definition in FirstOp2, NewTool4, and SameTool3,
TCZ is initialized now in PSInit,
MPK}

{6/11/97
Initial: Cin Acr 850MC [AG] MY94.15.1
Created: Cin Acr 850MC [AG] MY94.15.2
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: Modified per fax and conversation with James Baker
Deleted SpinOn command except from DoCoolOn sub.
Changed SetTCZ('.375') to SetTCZ('.1')
Added format for ZDepth#
Added sequence number to sub definition lines.
Changed EOP from M30 to M02.
Added PreTool to G94/G95 block.
Added M42 for tapping operations.
Jim Radcliffe}

{10/21/97,
Initial: Cin Acr 850MC [AG] MY94.15.2
Created: Cin Acr 950HMC [AG] Dxxx.15
For: Amarillo Gear
Deleted all G90 calls in safety start blocks and replaced with G95. Deleted subsequent G95 calls
on next line.
Added literal 'M38' after all SpinOn calls.
Deleted all beginning and end spaces in comments that were outputted.
Added literal 'J1' after every drill cycle cancel.
Changed G90 calls in tap operations to G94. Deleted subsequent G94 call on next line. Added literal
'M38' after M03 but before 'M42' on tap operations.\
Made all drill depths positive.
Asked to have post name changed.
CDH
Made D-style ad mill post per Fanuc 6M (NW) D0001.15, MPK}

{12Nov97
Original: Cin Acr 950HMC [T40] DW32.15
Created: Cin Acr 950HMC [T40] DW32.15.1
For: Amarillo Gear
Changes made per: Don
Split the (combination) M-code, M13 (SpinON + CoolOn), into two seperate codes, M03 and M08
and seperated their calls as follows:
Deleted all references to DoCoolOn Sub and renamed it DoSpinOn
Deleted the Boolean for IF CWSpindle? and replaced it with SpinOn
Added CoolOn to SameTool Boolean, at the start of OpGuts.
Added CoolOn to all Drill Cycles.
Corrected typing error, "IF IF GreaterThan?" in DoCSComment, this should now correctly suppress the CS Comment.
Deleted redundant 'G95' in the NOT SameTool Boolean, at the start of OpGuts.
Deleted WFOStuff from FirstOp2, NewToolOp4 and SameToolOp3
Changed DoCoolOn to CoolOn in SameToolOp3
Changed SetTCZ('.375') to SetTCZ('.1') at PSInit ( Previously it had only been changed in Progstart )
Charles Winston}

{12/1/97
Initial: Cin Acr 950HMC [T40] DW32.15.1
Created: Cin Acr 950HMC [T40] DW32.15.2
For: Amarillo Gear
Comments:
Added Rapid, 'Z' TrackZ# Num#('30'), and 'M101' to start block,
inverted position of PreTool and 'W[T1]' in drill cycle,
deleted all output of CS comments,
MPK
}

{4Dec98
Initial: Cin Acr 950HMC [T40] DW32.15.2
Created: Cin Acr 950HMC [T40] DW32.15.3
For: Amarillo Gear
Changes made per: Don Rowland
Added Post Header Comment at the top of Prog.
Added Formatting for Pallet# in Prog Numeric Format Definitions
Added Boolean to suppress redundant ToolTypeComment and ToolComment in DoOpComments when SameTool is True
Adjusted the Logic in FinishSub1 to switch CRCOff after the Feed (or Rapid) Move.
Added support for PostScript PIN(x) Command and changed [T1] to [T Pallet#] throughout the post
Added PalletInF and SetPalletIn('1') at PSInit
Added booleans in ToolPath RapidFeat and LineFeat to switch CRCOff after the Feed (or Rapid) Move.
Suppressed output of PreTool at the start of OpGuts when SameTool is True.
Suppressed output of PreTool CoolOn in OpGuts at Drilling when SameTool is True.
Added a conditional Move to ZCP1 in NewToolOp1
Added Booleans in SameToolOp3 to suppress all output except the StrtPos, unless ChangeCS or NewToolOffset is True.
Added BLOCK DELETE code in NewToolOp2 and SameToolOp3 to allow inspection of the Part when ProgStop is True.
Added 10 to the value of the ClearancePlane1 in End2
Added Utility Data Instructions at InitProg.
Charles Winston}

{22Jan98
Initial: Cin Acr 950HMC [T40] DW32.15.3
Created: Cin Acr 950HMC [T40] DW32.15.4
For: Amarillo Gear
Changes made per: Don Rowland
Develop: Catalyst 5.03/ComPost2 1.7b13
Changed Rapid to RapidC and ZCP1 to ZCP1C in SameToolOp3.
Deleted OR ChangeCS? from the NewToolOffset Boolean in SameToolOp3.
Deleted 'M38' in SameToolOp3.
Charles Winston}

{08Feb99
Original: Cin Acr 950HMC [T40] DW32.15.4
Created: Cin Acr 950HMC [T40] DW32.15.5
For: Amarillo Gear
Changes made per: Don Rowland
Develop: Catalyst 5.03/ComPost2 1.7b15
Added ModCSOffsetB. Rotary table requires Positive,Absolute Index values.
Deleted G10 Register line in SameToolOp3
Added support for custom G10 Register output in FirstOp2 and NewToolOp4.
Customer can enter "G10 Register values", by entering TCZ or PIN PostScript values.
The Post will output consecutive G10 register lines if Multiple values are entered.
The user can enter single values on their own, if required.
PIN numbers update the [T] register, TCZ values update the 'V' Drill Clearance Plane.
At the present time the Registers can only be changed when drilling.
When SameTool is TRUE, only the [T] Register can be changed, however, the [T] value will revert
to is previous value at the next NewTool, if its value is changed whilst SameTool is TRUE.
Default Values are established in PSInit.
Supported by the following subs:
G10Register, saveDefaultPIN, defaultPIN, saveDefaultTCZ, defaultTCZ
currentPIN, saveCurrentPIN, restoreCurrentPIN, setupDefaults.
Customised PSInit, PSStuff and DoPostScript.
Added Utility Data at InitProg.
Charles Winston}

{16Feb99
Original: Cin Acr 950HMC [T40] DW32.15.5
Created: Cin Acr 950HMC [T40] DW32.15.6
For: Amarillo Gear
Changes made per: Don Rowland
Develop: Catalyst 5.03/ComPost2 1.7b15
Added Format#2 for Recall# at ModCSOffsetB. Recall# was outputting as an integer.
Charles Winston}

{Prog Numeric Format Definitions ****}

#1 = '#.00'
#2 = '#####.###;0'
#3 = '*#####.###;0'
#4 = '####.####;0'
#5 = '#######0'
#6 = '####^##0'
#7 = '+####.####;0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Sub#,2)
FORMAT(CSOffsetA#,3)
FORMAT(CSOffsetB#,3)
FORMAT(ToolDiameter#,4)
FORMAT(TrackZNO#,4)
FORMAT(TrackZ#,4)
FORMAT(TCZ#,4)
FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,4)
FORMAT(CSOffsetZ#,4)
FORMAT(FeedTapIPR#,4)
FORMAT(HelixPitch#,4)
FORMAT(TrackZ#,4)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(NewWFO#,5)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Parts#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Recall#,5)
FORMAT(Pallet#,5)
FORMAT(Dwell#,6)
FORMAT(ZDepth#,7)

{Prog Subroutines ****}

DoSpinOn:
SpinOn
IF Tap?
'M38M42'
ELSE
'M38'
END
RETURN

RestoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
RETURN

MPESWFO: { MultipleParts EquallySpaced }
'H' ADD# PartNum# SUB# NewWFO# Num#('1')
RETURN

WFO:
'H' PartNum#
RETURN

WFONum:
'H' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts? AND WorkFixtureOffsets?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH MULTIPLE PARTS AND WORK FIXTURE OFFSETS' EOL
ELSE
WFONum
END
ELSE
IF Flag?('2')
IF NOT SameTool?
IF MultipleParts?
IF WorkFixtureOffsets?
WFO
ELSE
MPESWFO
END
ELSE
WFONum
END
END
END
END
SetFlagF('2')
RETURN

DoSubComment:
IF UseComments? AND SubComment?
'(MSG, SUB NUMBER: ' Program# ')' EOL
END
RETURN

ModCSOffsetB:
IF BAxisAvail?
Save# Num#('50') DIV# CSOffsetB# Num#('360')
Save# Num#('50') SUB# Recall# Num#('50') TRUNC# Recall# Num#('50')
Save# Num#('50') MUL# Recall# Num#('50') Num#('360')
IF LTEqual? Recall# Num#('50') Num#('0')
Save# Num#('50') ABS# Recall# Num#('50')
ELSE
Save# Num#('50') SUB# Num#('360') Recall# Num#('50')
END
FORMAT(Recall#,2)
Recall# Num#('50')
FORMAT(Recall#,5)
END
RETURN

DoCSComment:
{Customer does not want any CS comments}
RETURN

CSComments:
IF FirstOperation? OR NewTool? OR ChangeCS?
DoCSComment
END
RETURN

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

CSAngleA:
IF AAxisAvail?
'A' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
'B' ModCSOffsetB
Save# Num#('9') Recall# Num#('50')
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

saveDefaultPIN:
Save# Num#('20') Recall# Num#('21')
RETURN

defaultPIN:
Recall# Num#('20')
RETURN

saveDefaultTCZ:
Save# Num#('30') Recall# Num#('31')
RETURN

defaultTCZ:
FORMAT(Recall#,4)
Recall# Num#('30')
FORMAT(Recall#,5)
RETURN

currentPIN:
Recall# Num#('40')
RETURN

saveCurrentPIN:
Save# Num#('40') Pallet#
RETURN

restoreCurrentPIN:
Save# Num#('40') defaultPIN
RETURN

setG10Register:
IF NotEqual? Recall# Num#('21') Num#('999')
saveDefaultPIN
END
IF NOT SameTool?
restoreCurrentPIN
END
IF NotEqual? Recall# Num#('31') Num#('999')
saveDefaultTCZ
END
RETURN

G10Register:
IF Drilling?
SeqLabC 'G10=[T' defaultPIN ']V' defaultTCZ EOL
IF NOT SameTool?
IF NotEqual? Recall# Num#('22') Num#('999') AND NotEqual? Recall# Num#('32') Num#('999')
SeqLabC 'G10=[T' Recall# Num#('22') ']V'
FORMAT(Recall#,4)
Recall# Num#('32') EOL
FORMAT(Recall#,5)
END
IF NotEqual? Recall# Num#('23') Num#('999')AND NotEqual? Recall# Num#('33') Num#('999')
SeqLabC 'G10=[T' Recall# Num#('23') ']V'
FORMAT(Recall#,4)
Recall# Num#('33') EOL
FORMAT(Recall#,5)
END
IF NotEqual? Recall# Num#('24') Num#('999')AND NotEqual? Recall# Num#('34') Num#('999')
SeqLabC 'G10=[T' Recall# Num#('24') ']V'
FORMAT(Recall#,4)
Recall# Num#('34') EOL
FORMAT(Recall#,5)
END
IF NotEqual? Recall# Num#('25') Num#('999')AND NotEqual? Recall# Num#('35') Num#('999')
SeqLabC 'G10=[T' Recall# Num#('25') ']V'
FORMAT(Recall#,4)
Recall# Num#('35') EOL
FORMAT(Recall#,5)
END
END
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
PalletInF
IF FirstOperation? { Setup the Default Values for TCZ# and Pallet# }
SetPalletIn('1')
SetTCZ('.1')
Save# Num#('21') Num#('1') { Default PIN Value }
Save# Num#('40') Num#('1') { Current PIN Value }
saveDefaultPIN
Save# Num#('31') Num#('0.1') { Default TCZ Value }
saveDefaultTCZ
END
IF NOT SameTool?
restoreCurrentPIN
END
SetPalletIn('999')
SetTCZ('999')
Save# Num#('6') Num#('20') { Counter for PIN Register }
Save# Num#('7') Num#('30') { Counter for TCZ Register }

Save# Num#('21') Num#('999') { PIN Values }
Save# Num#('22') Num#('999')
Save# Num#('23') Num#('999')
Save# Num#('24') Num#('999')
Save# Num#('25') Num#('999')

Save# Num#('31') Num#('999') { TCZ Values }
Save# Num#('32') Num#('999')
Save# Num#('33') Num#('999')
Save# Num#('34') Num#('999')
Save# Num#('35') Num#('999')
RETURN

PSStuff:
IF NotEqual? Num#('999') Pallet#
IF SameTool?
saveCurrentPIN
ELSE
Save# Num#('6') Add# Num#('1') Recall# Num#('6')
Save# Recall# Num#('6') Pallet#
END
SetPalletIn('999')
END

IF NotEqual? Num#('999') TCZ#
IF NOT SameTool?
Save# Num#('7') Add# Num#('1') Recall# Num#('7')
Save# Recall# Num#('7') TCZ#
SetTCZ('999')
END
END
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL
PSStuff
NextPS
setG10Register
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL
PSStuff
NextPS
RETURN

EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
' ' EOL
SeqLabC '(DFS,L' Program# ')' EOL
DoSubComment
RETURN

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

StdSub:
SeqLabC '(CLS,L' Program# ',' RepCycs ')' EOL
StartSub
RETURN

FinishSub1: {part 1}
SeqLabC
IF NOT FeedConnect?
IF AutoCycle?
CRCOffC ZCP3C
ELSE
IF FIFO?
FeedC CRCOffC ZCP3C FeedEntC
ELSE
RapidC CRCOffC ZCP3C
END
END
END
EOL
RETURN

FinishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

DoWFOOps:
IF Flag?('5')
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
ELSE
SeqLabC SetWFO EOL
END
SeqLabC '(CLS,L' Program# ')' EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('5') { Suppress Redundant WFO for MP-OTAP-ECP }
END
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
DoWFOOps
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
DoWFOOps
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
ELSE
SeqLabC '(CLS,L' Program# ',' Parts# ')' EOL
IF OneToolAllParts? AND ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLabC '(ENS)' EOL
CloseSub
ELSE
SeqC Preset ShiftPC EOL
SeqLabC '(ENS)' EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

DoAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF ZMove? AND AbsValue?
IncValue
ELSE
IF NOT ZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

DoDrillAbsOrInc:
IF Flag?('1') AND AbsoluteMoves?
IF SPZMove? AND AbsValue?
IncValue
ELSE
IF NOT SPZMove? AND NOT AbsValue?
AbsValue
END
END
END
RETURN

RestoreAbsOrInc:
IF Flag?('1') AND AbsoluteMoves? AND NOT AbsValue?
SeqLabC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
IF ZMove?
MoveXYZ ArcIJ 'K' HelixPitch#
ELSE
MoveXY
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
END
ELSE
IF XZPlane?
IF YMove?
MoveXYZ ArcIJ 'J' HelixPitch#
ELSE
MoveX MoveZ
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
END
ELSE { YZPlane }
IF XMove?
MoveXYZ ArcIJ 'I' HelixPitch#
ELSE
MoveY MoveZ
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
END
END
END
RETURN

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

ckCRCNum:
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC '(CLS,L' Program# ')' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC DoDrillAbsOrInc MoveSXYZC
IF NOT FirstFeat?
'W[T' CurrentPIN ']'
END
EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC DoAbsOrInc
IF LastFeat? { Customer wants CRCOff after the Rapid command }
RapidC ckCRC
ELSE
ckCRC RapidC
END
MoveXYZC ckCRCNum EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC FeedRateC ckCRCNum EOL
DecelMove2
END
SeqLabC DoAbsOrInc ckCRC FeedC MoveXYZC DecelFeed ckCRCNum EOL
ELSE
SeqLabC DoAbsOrInc
IF LastFeat? { Customer wants CRCOff after the Feed command }
FeedC ckCRC
ELSE
ckCRC FeedC
END
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
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
Save# Num#('1') CSOffsetA#
Save# Num#('2') CSOffsetB#
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SeqLabC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO?
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
SeqLabC '(ENS)' 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 Connect AbsOrInc StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
Feed
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
END
END
SeqLabC ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
Rapid
IF SPXMove? OR SPYMove?
SeqLabC IncValue StrtPosC EOL
AbsOrInc
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 '(CLS,L' Program# ')' 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
SeqLabC '(ENS)' EOL
CloseSub
{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 '(CLS,L' Program# ')' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC '(ENS)' EOL
CloseSub
RETURN

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

SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN

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

OpGuts:
IF Milling?
SeqLabC
ZCP2C
IF NOT SameTool?
PreTool CoolOn
END
EOL
IF Repeats?
NewProg
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 CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLabC Rapid AbsOrInc StrtPos EOL
END
GetCycle
SeqLabC
IF FIFO? AND Dwell?
'G89'
ELSE
Cycle
END
'Z' ZDepth# RLevel
Peck
IF Peck?
IF PeckChipBreaker?
'J0'
ELSE
'J1'
END
END
FeedEnt 'W[T' CurrentPIN ']'
IF NOT SameTool?
PreTool CoolOn
END
EOL
IF CallMasterOp?
SeqLabC '(CLS,L' CallMasterNum# ')' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLabC '(CLS,L' Program# ')' EOL
StartSub
ToolPath
SeqLabC '(ENS)' EOL
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLabC 'G80J1' EOL
SeqLabC Rapid ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetProgNum('0')
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetTCZ('.1')
IF Metric?
SetMaxFeed('12700')
ELSE
SetMaxFeed('500')
END
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlag('3') { True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP }
SetFlag('4') { True = toggle between incrementing/decrementing WFO's }
SetFlagF('5') { Suppress Redundant WFO for MP-OTAP-ECP }
Save# Num#('9') Num#('0') { Program Stop Index value }
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
' ' EOL
' Using The PIN(x) PostScript command. ( Where X is any integer )' EOL
' This will cause the Post to output the value of the PIN number' EOL
' in all T-register output. eg. PIN(5) will cause [T5] to be output.' EOL
' [T1] is the default value used if no other PIN number is entered.' EOL
' The command is Modal. Except when used with the SameTool' EOL
' ' EOL
' ' EOL
' Using The TCZ(x) PostScript command. ( Where X is any number )' EOL
' This will cause the Post to output the value of the TCZ number' EOL
' in all V-register output. eg.TCZ(.25) will cause V.25 to be output.' EOL
' V.1 is the default value used if no other TCZ number is entered.' EOL
' ' EOL
END
RETURN

InitOp:
'(' ProgramName$ ' *** FIRST TIME PRG. / PROVE OUT COMPLETELY ***' EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'(MSG, PROGRAM NAME: ' ProgramName$ ')' EOL
END
IF ProgramComment?
'(MSG, ' ProgramComment$ ')' EOL
END
IF FormatNameComment?
'(MSG, FORMAT: ' FormatName$ ')' EOL
END
IF TimeComment?
'(MSG, ' Date$ ' AT ' Time$ ')' EOL
END
IF MovesComment?
'(MSG, OUTPUT IN ' MoveType$ ' INCHES)' EOL
END
IF PartsComment?
'(MSG, PARTS PROGRAMMED: ' Parts# ')' EOL
END
IF StartToolComment?
'(MSG, FIRST TOOL NOT IN SPINDLE)' EOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
' ' EOL
':?' Rapid 'Z' TrackZ# Num#('30') ToolChng OpToolID 'M101' EOL
DoOpComments
DoPostScript
RETURN

FirstOp2:
CheckPass
G10Register
SeqLabC Rapid
IF Tap?
'G94' {Feed in IPM}
ELSE
'G95' {Feed in IPR}
END
Plane StrtPos ZCP1 CSAngleA CSAngleB Speed DoSpinOn EOL
RETURN

FirstOp3:
RETURN

NewToolOp1:
IF MultipleParts? AND OneToolAllParts? AND FullUp?
SeqLabC 'M26' EOL {Sends Z axis full up}
ELSE
LoadFeat Num#('0') Num#('0') ClearancePlane1#
IF ZMove?
SeqLabC Rapid ZCP1 EOL
END
END
RETURN

NewToolOp2:
DoEndOpPS
IF LAST ProgStop?
'/2N?G00Z25.' EOL
'/2N?B'
IF LessThan? Sub# Recall# Num#('9') Num#('65') Num#('0')
FORMAT(ADD#,2)
Add# Num#('360') Sub# Recall# Num#('9') Num#('65') EOL
FORMAT(ADD#,5)
ELSE
Sub# Recall# Num#('9') Num#('65') EOL
END
'/2N?M00' EOL
ELSE
SeqLabC ProgStop EOL
END
RETURN

NewToolOp3: {Start new Operation}
' ' EOL
':?' ToolChng OpToolID EOL
DoOpComments
DoPostScript
RETURN

NewToolOp4:
CheckPass
G10Register
SeqLabC Rapid
IF Tap?
'G94' {Feed in IPM}
ELSE
'G95' {Feed in IPR}
END
Plane StrtPos ZCP1 CSAngleA CSAngleB Speed DoSpinOn EOL
RETURN

NewToolOp5:
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
'/2N?G00Z25.' EOL
'/2N?B'
IF LessThan? Sub# Recall# Num#('9') Num#('65') Num#('0')
Add# Num#('360') Sub# Recall# Num#('9') Num#('65') EOL
ELSE
Sub# Recall# Num#('9') Num#('65') EOL
END
'/2N?M00' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
END
RETURN

SameToolOp2: {Start new Operation}
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
IF LAST ProgStop?
SeqLabC Rapid
IF NewToolOffset? OR ChangeCS?
IF Tap?
'G94' {Feed in IPM}
ELSE
'G95' {Feed in IPR}
END
END
PlaneC StrtPos
IF NewToolOffset? OR ChangeCS?
ZCP1 CSAngleA CSAngleB Speed SpinOn 'M38' EOL
END
ELSE
SeqLabC RapidC
IF NewToolOffset?
IF Tap?
'G94' {Feed in IPM}
ELSE
'G95' {Feed in IPR}
END
END
PlaneC StrtPos
IF NewToolOffset? OR ChangeCS?
ZCP1C CSAngleA CSAngleB SpeedC
END
EOL
END
RETURN

End1:
IF MultipleParts? AND OneToolAllParts? AND FullUp?
SeqLabC 'M26' EOL {Sends Z axis full up}
END
RETURN

End2:
DoEndOpPS
FORMAT(ADD#,2)
SeqLabC 'X0Y10.Z' Add# ClearancePlane1# Num#('10') EOL
IF Equal? Recall# Num#('1') Num#('0') AND Equal? Recall# Num#('2') Num#('0')
ELSE
SeqLabC
IF AAxisAvail?
CSAngleA
END
IF BAxisAvail?
CSAngleB
END
EOL
IF Equal? CSOffsetA# Num#('0') AND Equal? CSOffsetA# Num#('0')
ELSE
SeqLabC Preset
IF AAxisAvail?
'A0'
END
IF BAxisAvail?
'B0'
END
EOL
END
END
IF ProgStop?
SeqLabC 'M0' EOL
END
RETURN

End3:
SeqLabC EOP EOL
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
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
END
Close
ReTag
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
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 {End of program}
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
OpenMP
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
OpenMP
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2')
IF FirstOperation?
InitOp
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 {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('2') { WFOStuff }
IF FirstOperation?
InitOp
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 {End of program}
End2
End3
RETURN

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

ProgStart {setup and initializations}

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


Wyszukiwarka

Podobne podstrony:
Cin Acr 950HMC [T40] CW32 15
Cin Acr 850MC [VTF] M328 15 1
Cin Acr A2100 [REN] CY33 15 5m
Cin Acr 850MC [RI] C664 15
Cin Acr 850MC [RI] D664 15
Cin Acr 850MC [AG] MY94 15 4
Cin Acr 850MC [VTF] B328 15
Cin Acr 850SX [D&H] CY84 15
Cin 10HC Acr 900 PMW DV69 15 1
Cin Acr 900V2 [KM] MT25 89
Acr A2100 [ALA] CX48 15 1
Cin Acr 850SX Sabre PM689 17 3
Cin Acr CNC TC [12] L273 85 1
Cin Acr 850 SX [WF] L592 85
Cin Acr 850MC M196 89
Cin Acr 850 SX L315 85

więcej podobnych podstron