CIM X 20HC Acr M236 87


{8/28/89
Copied & modified: Fanuc 6M (no sep subs).
For: BGA
Machine: Cincinnati 20HC-2500 CIM-Xchanger.
Control: Acramatic Release 3.1.
Jim Radcliffe}

{10/2/89
Modified: CIM-X 20HC Acr M236.55
For: BGA
Change ASCII('13') to a literal space as the ReTag removes the CR.
Added PostScript and SepSubs but commented out.
Misc other update stuff.
NOTE: CRC needs work also needs third axis departure in
inches per radian for Helical Interpolation.
Jim Radcliffe}

{2/9/90, Updated: CIM-X 20HC Acr M236.62 to .70 & added Helical Interp, JR}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}

{4/03/91
Modified: CIM-X 20HC Acr M236.71
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}

{3/16/94
Modified: CIM-X 20HC Acr M236.79
For BGA
Updated to .81.2 format per Fanuc 6M M001.81.2
Added manual drilling routine for pecking, PeckManual is still not working!
uses variable Num#('1') to keep track of Z depth position, max num full pecks = 100
Jim Radcliffe}

{2/9/96, Updated .81 version to .84, MPK}

{3/22/96, Tested ZOnlyRepAutCycle, Incremented number to .87, MPK}

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

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

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(CRCNormalVectorX#,6)
FORMAT(CRCNormalVectorY#,6)
FORMAT(ArcZRads#,7)
FORMAT(TrackZ#,7)
FORMAT(NewWFO#,8)

{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

DoSubComment:
IF UseComments? AND SubComment?
'(MSG, SUB NUMBER: ' Program# ' )' EOL
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 ToolTypeComment?
'(MSG, TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'(MSG, ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit: {reset flags}
NewWFOF
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 FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
'(DFS,I' ProgNum ')' 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:
'(CLS,I' ProgNum ',R' RepsLess1 ')' EOL
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqLabC Preset ShiftRC EOL
SeqLabC 'M02' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqLabC SetWFO EOL
'(CLS,I' ProgNum ')' EOL
IncWFO
NextWFO
ELSE
'(CLS,I' ProgNum ',R' PartsLess1 ')' EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLabC 'M02' EOL
CloseSub
SeqLabC WFO1 EOL
ELSE
SeqLabC Preset ShiftPC EOL
SeqLabC 'M02' EOL
CloseSub
SeqLabC Preset UnshftPC EOL
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
IF XYPlane? AND ZMove? {helical move}
'K' ArcZRads#
END
RETURN

CheckVector:
IF CutterRadiusCompensation?
'P' CRCNormalVectorX# 'Q' CRCNormalVectorY#
END
RETURN

DoLastPeck: {OldZ - Peck# ² Depth}
SeqLabC Feed 'Z' TrackZ# SPZ# FeedEntC EOL {move to Depth}
IF RetractToCP1?
SeqLabC Rapid ZCP1 EOL {move to CP1}
ELSE
SeqLabC Rapid ZCP2 EOL {move to CP2}
END
RETURN

DoPeck:
IF GreaterThan? SUB# Recall# Num#('1') Peck# SPZ# {IF OldZ - Peck# > Depth}
Save# Num#('1') SUB# Recall# Num#('1') Peck# {Save#1 = OldZ - Peck# = NewZ}
SeqLabC Feed 'Z' TrackZ# Recall# Num#('1') FeedEntC EOL {move to NewZ}
IF PeckFullRetract?
SeqLabC Rapid ZCP2 EOL {move to CP2}
END
SeqLabC RapidC 'Z' TrackZ# ADD# Recall# Num#('1') Retract# EOL {move to RetractZ}
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
'(CLS,I' ProgNum ')' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF Peck?
SeqLabC RapidC MoveSXYC EOL
SeqLabC ZCP2C EOL
Save# Num#('1') ClearancePlane2#
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck DoPeck
DoLastPeck
ELSE
SeqLabC MoveSXYC EOL
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLabC RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FeedC MoveXYZC CheckVector FeedRateC EOL
DecelMove2
END
SeqLabC FeedC MoveXYZC CheckVector DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC FeedC MoveXYZC CheckVector FeedRateC EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FormatArc CheckVector ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc CheckVector DecelFeed EOL
ELSE
SeqLabC FormatArc CheckVector ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts?
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS'
ELSE
'H' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
'H' NewWFO#
END
END
END
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
SeqLabC AbsOrInc EOL {.69 removed RapidC}
ELSE
SeqLabC AbsOrInc
IF FIFO? {.81}
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
EOL
END
SeqLabC 'M02' EOL
CloseSub
SetSRSubXY {restore tool position}
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 AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Feed IncValue StrtPosC EOL
SeqLabC AbsOrInc
ELSE
SeqLabC Feed
END
ELSE
SeqLabC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLabC AbsOrInc ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLabC Rapid ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
'(CLS,I' ProgNum ')' 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}
SeqLabC Feed ZCP2 FeedEnt EOL {.69}
ELSE
SeqLabC Rapid ZCP2 EOL {.69}
END
END {.69}
SeqLabC 'M02' 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
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL {can't call for cycle =1}
{.69 added Rapid, reads better}
END
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
'(CLS,I' ProgNum ')' EOL
NextCycle
StartSub
SkipZ
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
SeqLabC 'M02' EOL
CloseSub
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

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

{setup and initializations}
InitProg
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 FirstOperation?
EOR EOL
OpenSub
'(PGM,I' ProgNum ')' EOL
IF UseComments?
IF ProgramNameComment?
'(MSG, PROGRAM: ' 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
IF ToolChangeAtHome?
SetHome
END
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
'O?G70' EOL
SeqLabC AbsOrInc EOL
SeqLabC Plane EOL
DoOpComments
DoPostScript
'O?' Rapid ToolChng OpToolID EOL
CheckPass
'O?' Rapid StrtPos ZCP1 FeedEnt Speed ToolOfst
IF NOT LastTool?
PreTool
END
WFOStuff SpinOn EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC Rapid
IF ToolChangeAtHome?
Home
END
CoolOff EOL
IF LAST ProgStop?
SeqLabC 'M00' EOL
ELSE
SeqLabC ProgStop EOL
END
' ' EOL {has to have a space, ReTag is swiping just a CR}

DoOpComments
DoPostScript
'O?' Rapid ToolChng OpToolID EOL
CheckPass
'O?' Rapid StrtPos ZCP1 FeedEnt Speed ToolOfst PreTool WFOStuff SpinOn EOL
SeqLabC PlaneC EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
SeqLabC 'M00' EOL

{Start new Operation}

GetStartOfSameTool
SeqLabC Rapid StrtPos SpeedC WFOStuff SpinOn EOL
SeqLabC PlaneC EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
{Start new Operation}

GetStartOfSameTool
SeqLabC Rapid StrtPos ZCP1 SpeedC ToolOfst WFOStuff EOL
SeqLabC PlaneC EOL
ELSE
{Start new Operation}

GetStartOfSameTool
SeqLabC Rapid StrtPos SpeedC WFOStuff EOL
SeqLabC PlaneC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC ZCP2C 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?
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
IF AutoCycle?
SeqLabC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqLabC FeedC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLabC AbsOrInc Rapid StrtPos EOL
END
GetCycle
IF NOT Peck?
IF FIFO? AND Dwell?
SeqLabC 'G89'
ELSE
SeqLabC Cycle
END
StrtPos ZDepth RLevel EOL
TrackZNO# ZDepth# {.81}
END
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
IF Repeats?
FinishSubG92
END
SeqLabC RapidC ZCP3C EOL
END
END
NextOp
IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC Rapid
IF ToolChangeAtHome?
FirstHome
END
CoolOff EOL
IF ProgStop?
SeqLabC 'M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC EOP EOL
Post
EOR EOL
Close
ReTag
IF UseComments?
SetScale('1')
Reopen
IF FileBytesComment?
'(MSG, FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
'(MSG, FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
'(MSG, FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
Close
END



Wyszukiwarka

Podobne podstrony:
Cin 5V 1250 Acr 8 D M154 87
Cin 720 Acr 5 [PAMA] M492 87
Cin Acr 850MC [RI] M664 87
Cin Acr 850SX [WI] M700 87
Fanuc 11M Acr 3000V M382 87
Cin T10 Acr 950MC[JD] M535 87
Cin Acr 850 [FMI] M814 87
Cin Acr 850MC [SJ] M494 87
Cin Acr 338 D M160 87
Cin Acr 850SX [LBS] MU11 87
Cin Acr 225WA M911 87 2
Cin Acr 5 Heald [CI] MY92 87 1
Cin Acr A2100 M703 87 1
Fanuc 10M MVJr[G43r] M192 87
Tosnuc 600M BMC 40 M440 87

więcej podobnych podstron