Siemens 8M Charmin M752 81 20


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

{from M001.81, 11/10/91, wfg}
{ .81.02, wfg, 1/8/92, corrected Z polities for top, left, & right, as well as Y polarity for Left}
{ .81.14m, wfg, Feed & RPM rounding}
{ .81.15m, wfg, do not round tap RPM}
{ .81.16m, wfg, 4/16/92, head change corrections}
{ .81.17m, wfg, 5/7/92, feed format, last to tool change, dup RPM, dup PostScript}

{2/4/95
Copied & modified: Siemans M8 Elgamill M468.81.17m
For: General Tool
Machine: Charmin Solon 4 Axis Mill
Control: Seimens System 8M
Made changes per marked up readout.
Commented out Seq ' L929 R48 60 R49 55' EOL line at beginnig of program.
Commented out SeqC ' T' TrimToolComment$ ('6') EOL line at beginnig of program.
Changed ' L96' to ' L30' at 1st op and NewTool.
Commented out NextToolNum calls.
Commented out SetHead and ChangeHead calls.
Moved Offset call from SetHead sub to main after StartPosition line.
Moved SpindleOn call from SetHead sub to main after SetHead call.
Commented out G43/G44 in Offset sub.
Added GearRange.
Moved FeedEnt from SpindleOn to Drilling and unconditional in EntryMove.
Also: Corrected FIFO handling per M001.81.2, FeedEnt calls.
Commented out ' R11 n' from Drilling.
Changed literal ' D01' in Offset sub to ToolOfst.
Commented out ToToolChange calls.
Changed MoveSPHVDC to MoveSPHVC in ToolPath for Drilling.
Does not support multiple drilling depths in the same workgroup!
Added CRCOffsetC to StartPosition line at beginning of operations.
Commented out OffsetReset.
Jim Radcliffe}

{3/9/95, created English version, JR}

{3/23/95
Modified: Siemens 8M Charmin M752.81.17
For: General tool
Re-arrainged SpindleOn line.
Commented out EOPToToolChange call at end of program. Replaced with literal lines.
Commented out L96 and L999 lines at end of program.
Re-arrainged Drill Cycle lines R codes. Commented out 'R04 .2'.
Jim Radcliffe}

{4/10/95
Initial: Siemens 8M Charmin M752.81.18
ForUser: General Tool
Added missing FeedC commands
Jim Radcliffe}

{2/8/96
Initial: Siemens 8M Charmin M752.81.19
Created: Siemens 8M Charmin M752.81.20
ForUser: General Tool
Develop: ComPost 4.21.33, Catalyst68K v3.0C
Comment: Modified per marked up readout from David Bishop dated 12/19/96
All R value numbers must have decimals.
Added FORMAT for Recall# to Prog Formatter list.
Deleted FORMAT handling in FormatR prog sub.
Added 'D00' to end of program.
Jim Radcliffe}

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

#1 = '#.00'
#2 = '###.0###;0.0'
#3 = '########;0'
#4 = '####0'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,2)
FORMAT(Program#,3)
FORMAT(Operation#,3)
FORMAT(Tool#,3)
FORMAT(Parts#,3)
FORMAT(EPX#,2)
FORMAT(EPY#,2)
FORMAT(EPZ#,2)
FORMAT(ArcI#,2)
FORMAT(ArcJ#,2)
FORMAT(ADD#,2)
FORMAT(MUL#,2)
FORMAT(TrackX#,2)
FORMAT(TrackY#,2)
FORMAT(TrackZ#,2)
FORMAT(TrackZNO#,2)
FORMAT(Peck#,2)
FORMAT(Dwell#,2)
FORMAT(DirectTapFeed#,2)
FORMAT(Recall#,2)
FORMAT(SpeedRPM#,4)

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

HLabel:
IF Front? OR TOP? OR Bottom?
' X'
ELSE
' Z'
END
RETURN

VLabel:
IF Front?
' Y'
ELSE
IF Top? OR Bottom?
' Z'
ELSE
' Y'
END
END
RETURN

DLabel:
IF Front?
' Z'
ELSE
IF Top? OR Bottom?
' Y'
ELSE
IF Left? OR Right?
' X'
END
END
END
RETURN

HComp:
IF Right?
MUL# TrackX# EPX# Num#('-1')
ELSE
EPX#
END
RETURN

VComp:
IF Top?
MUL# TrackY# EPY# Num#('-1')
ELSE
EPY#
END
RETURN

DComp: {uses Var(4)}
{tracking is in HVD because of no plane changes}
IF Bottom?
ADD# MUL# NUM#('-1') TrackZ# Recall# Num#('4') YStockMin#
ELSE
IF Left?
ADD# MUL# NUM#('-1') TrackZ# Recall# Num#('4') XStockMin#
ELSE
IF Right?
ADD# TrackZ# Recall# Num#('4') XStockMax#
ELSE
IF Front?
ADD# TrackZ# Recall# Num#('4') ZStockMax#
ELSE
IF Top?
ADD# TrackZ# Recall# Num#('4') YStockMax#
END
END
END
END
END
RETURN

DrillDepth:
Save# Num#('4') ZDepth#
DComp
RETURN

FeatMove:
IF Front?
HLabel HComp
VLabel VComp
IF ZMove?
DLabel Save# Num#('4') EPZ#
DComp
END
ELSE
VLabel VComp
HLabel HComp
IF ZMove?
DLabel Save# Num#('4') EPZ#
DComp
END
END
RETURN

FeatMoveC:
IF Front?
IF XMove?
HLabel HComp
END
IF YMove?
VLabel VComp
END
IF ZMove?
DLabel Save# Num#('4') EPZ#
DComp
END
ELSE
IF YMove?
VLabel VComp
END
IF XMove?
HLabel HComp
END
IF ZMove?
DLabel Save# Num#('4') EPZ#
DComp
END
END
RETURN

FeatMoveHV:
IF Front?
HLabel HComp
VLabel VComp
ELSE
VLabel VComp
HLabel HComp
END
RETURN

AlgaMoveHVDC: {Var(1) = H, Var(2) = V, Var(3) = D}
LoadFeat Recall# Num#('1') Recall# Num#('2') Recall# Num#('3')
FeatMoveC
RETURN

AlgaMoveHVC: {Var(1) = H, Var(2) = V}
LoadFeat Recall# Num#('1') Recall# Num#('2') Recall# Num#('2')
LoadFeat Recall# Num#('1') Recall# Num#('2') SPZ# {default Z (D) to current position}
FeatMoveC
RETURN

AlgaMoveHV: {Var(1) = H, Var(2) = V}
LoadFeat Recall# Num#('1') Recall# Num#('2') Recall# Num#('2')
LoadFeat Recall# Num#('1') Recall# Num#('2') SPZ# {default Z (D) to current position}
FeatMoveHV
RETURN

ToCP1:
DLabel
Save# Num#('4') ClearancePlane1#
DComp
RETURN

ToCP2:
DLabel
Save# Num#('4') ClearancePlane2#
DComp
RETURN

ToCP3:
DLabel Save# Num#('4') ClearancePlane3#
DComp
RETURN

StartPositionC:
Save# Num#('1') StartPosX# Save# Num#('2') StartPosY#
AlgaMoveHVC
RETURN

StartPosition:
Save# Num#('1') StartPosX# Save# Num#('2') StartPosY#
AlgaMoveHV
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
' ( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF WorkGroupComment?
' ( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
' ( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
' ( ' 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

TheOpComment:
IF UseComments? AND OperationComment?
' ( ' OperationComment$ ' )' EOL
END
RETURN

SideComment:
IF UseComments?
IF Front?
' ( FRONT SIDE OPERATION )' EOL
ELSE
IF TOP?
' ( TOP SIDE OPERATION )' EOL
ELSE
IF BOTTOM?
' ( BOTTOM SIDE OPERATION )' EOL
ELSE
IF LEFT?
' ( LEFT SIDE OPERATION )' EOL
ELSE
IF RIGHT?
' ( RIGHT SIDE OPERATION )' EOL
ELSE
' ( UNDEFINED SIDE OPERATION )' EOL
END
END
END
END
END
END
RETURN

PSInit: {reset flags}
RETURN

PSStuff: {revised.72}
RETURN

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

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

EntryMove:
IF FeedEntry?
SeqC Feed Save# Num#('4') FIRST SPZ#
DLabel DComp
FeedEnt EOL
ELSE
SeqC RapidC Save# Num#('4') FIRST SPZ#
DLabel DComp
EOL
END
RETURN

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

FinishSub1: {part 1}
UnSkipZ
SeqC CRCOffC
IF NOT FeedConnect?
IF AutoCycle?
ToCP3
ELSE
IF FIFO? {.81}
FeedC ToCP3 FeedEntC
ELSE
RapidC ToCP3
END
END
END
EOL
RETURN

MoveSPHVC:
Save# Num#('1') SPX# Save# Num#('2') SPY#
AlgaMoveHVC
RETURN

MoveSPHVDC:
Save# Num#('1') SPX# Save# Num#('2') SPY# Save# Num#('3') SPZ#
AlgaMoveHVDC
RETURN

FormatArc:
IF Front? OR Top? OR Right?
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
ELSE {reverse arc}
IF ArcCW?
CCWArcC
ELSE
CWArcC
END
END
FeatMoveC
IF Front?
ArcIJ
ELSE
IF Top?
' J' Mul# ArcJ# Num#('-1') {1/22/92 request}
ELSE
' J' ArcJ#
END
IF Right?
' I' Mul# ArcI# Num#('-1') {1/22/92 request}
ELSE
' I' ArcI#
END
END
RETURN

ckCRCOn:
IF CutterRadiusCompensation? AND NOT Flag?('2')
IF Left? OR Bottom? {reverse CRC}
IF CRCLeft?
' G42'
ELSE
' G41'
END
ELSE
IF CRCLeft?
' G41'
ELSE
' G42'
END
END
SetFlag('2')
END
RETURN

StdLine: {enables CRC on first call}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC ckCRCOn FeedC FeatMoveC FeedRateC EOL
DecelMove2
END
SeqC ckCRCOn FeedC FeatMoveC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC ckCRCOn FeedC FeatMoveC FeedRateC EOL
END
END
RETURN

ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSPHVC EOL
SeqC SubCall CallLab EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC MoveSPHVC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqC CRCOffC RapidC FeatMoveC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC RapidC FeatMoveC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqC CRCOffC FeedC FeatMoveC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqC FeedC FeatMoveC FeedRateC EOL
ELSE
StdLine {enables CRC on first call}
END
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 ckCRCOn FormatArc ArcFeedC EOL
DecelMove2
END
SeqC ckCRCOn FormatArc DecelFeed EOL
ELSE
SeqC ckCRCOn FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
SeqC AbsOrInc EOL {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
SeqC AbsOrInc FeedC ToCP2 FeedEntC EOL
ELSE
SeqC AbsOrInc RapidC ToCP2 EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
END
{SeqC 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?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

StdRep:
SubWarning
EachRep
SeqC AbsOrInc Connect StartPosition EOL
Milling
FinishSub1
NextRep
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
{StartSub}
NewProg
EachCycle
IF FeedConnect?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
SeqC Rapid ZCP2PlusInc EOL {.69 added Rapid, reads better}
{can't call for cycle = 1, .69 changed to ZCP2PlusInc}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
{SeqC SubCall CallLab EOL}
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqC Feed ToCP2 FeedEnt EOL {.69}
ELSE
SeqC Rapid ToCP2 EOL {.69}
END
END {.69}
{SeqC EndSub EOL}
{CloseSub}
{Element shift, not pattern}
RETURN

SpindleOn:
SeqC
GearRange SpinOn
IF Tap?
' S' SpeedRPM# {can't round rpm}
ELSE
Speed
END
EOL
SetFlag('1')
RETURN

HeadVert:
SeqC '(POSITION HEAD VERTICAL AT 0 DEG.)' EOL
SeqC ' L92 R50 48' EOL
RETURN

HeadHor:
SeqC '(POSITION HEAD HORIZONTAL AT 0 DEG.)' EOL
SeqC ' L92 R50 46' EOL
RETURN

HeadBot:
SeqC '( ROTATE HEAD TO 180 DEG.)' EOL
SeqC ' L91 R50 180' EOL
RETURN

HeadRight:
SeqC '( ROTATE HEAD TO -90 DEG.)' EOL
SeqC ' L91 R50 -90' EOL
RETURN

HeadLeft:
SeqC '( ROTATE HEAD TO 90 DEG.)' EOL
SeqC ' L91 R50 90' EOL
RETURN

HeadTop:
SeqC '( ROTATE HEAD TO 0 DEG.)' EOL
SeqC ' L91 R50 0' EOL
RETURN

Offset:
SeqC
{
IF Left? OR Bottom?
' G44'
ELSE
' G43'
END
}
ToolOfst ToCP1 EOL
RETURN

OffsetReset:
SeqC
IF Left? OR Bottom?
' G44'
ELSE
' G43'
END
' D01' ToCP3 EOL
RETURN

XPlus:
' X' ADD# RECALL# Num#('6') XStockMax#
RETURN

YPlus:
' Y' ADD# RECALL# Num#('6') YStockMax#
RETURN

ZPlus:
' Y' ADD# RECALL# Num#('6') ZStockMax#
RETURN

SetHead: {Starts in Horizontal 0 mode}
IF Front?
HeadHor
ELSE {change to vertical}
HeadVert
IF Top?
{SeqC ' L91 R50 0' EOL defaults to 0 after change to vertical}
ELSE
IF Bottom?
HeadBot
SeqC Rapid ' G53 Z0.0' EOL
ELSE
IF Right?
HeadRight
SeqC Rapid ' G53 Z-100.0' EOL
ELSE
IF Left?
HeadLeft
SeqC Rapid ' G53 Z-100.0' EOL
ELSE
'**** BAD SIDE TYPE IN SetHead' EOL
END
END
END
END
END
RETURN

Left400:
' X' ADD# Num#('-400') XStockMin#
RETURN

Left200:
' X' ADD# Num#('-200') XStockMin#
RETURN

Right400:
SAVE# Num#('6') Num#('400') XPlus
RETURN

Right200:
SAVE# Num#('6') Num#('200') XPlus
RETURN

Z550:
SeqC ' G53 Z-550.0' EOL
RETURN

Y00:
SeqC RapidC ' G40 G53 Y0.0 M05' EOL
RETURN

Y300:
SeqC RapidC ' G40 G53 Y-300.0 M05' EOL
RETURN

ToToolChange:
IF LAST Front?
SeqC Rapid ' G40 G53 Z0.0 M05' EOL
SeqC ' G53 Y0.0' EOL
SeqC Left400 EOL
ELSE
IF LAST Top?
SeqC Rapid ' G40 G53 Y0.0 M05' EOL
SeqC Left400 EOL
ELSE
IF LAST Right?
SeqC Right200 EOL
SeqC ' G53 Y-200.0 M05' EOL
ELSE
IF LAST Left?
SeqC Left200 EOL
SeqC ' G53 Y-200.0 M05' EOL
ELSE
IF LAST Bottom?
SeqC Rapid ' G53 Z0.0' EOL
SeqC ' G53 Y-300.0' EOL
SeqC Left400 EOL
ELSE
'**** BAD SIDE TYPE IN ToToolChange' EOL
END
END
END
END
END
RETURN

EOPToToolChange: {sides are logged in WG comment}
IF Front?
SeqC Rapid ' G40 G53 Z0.0 M05' EOL
SeqC ' G53 Y0.0' EOL
SeqC Left400 EOL
ELSE
IF Top?
SeqC Rapid ' G40 G53 Y0.0 M05' EOL
SeqC Left400 EOL
ELSE
IF Right?
SeqC Right200 EOL
SeqC ' G53 Y-200.0 M05' EOL
ELSE
IF Left?
SeqC Left200 EOL
SeqC ' G53 Y-200.0 M05' EOL
ELSE
IF Bottom?
SeqC Rapid ' G53 Z0.0' EOL
SeqC ' G53 Y-300.0' EOL
SeqC Left400 EOL
ELSE
'**** BAD SIDE TYPE IN EOPToToolChange' EOL
END
END
END
END
END
RETURN

ChangeHead:
IF LAST Front? {horizontal}
IF NOT Front?
SeqC RapidC ' G40 G53 Z0.0 M05' EOL
IF Bottom?
SeqC ' G53 Y-300.0' EOL
SeqC Left400 EOL
Z550
HeadVert
HeadBot
Offset
ELSE
SeqC ' G53 Y0.0' EOL
IF Top?
SeqC Left400 EOL
Z550
HeadVert
Offset
ELSE
IF Right?
SeqC Right400 EOL
Z550
HeadVert
HeadRight
Offset
ELSE
IF Left?
SeqC Left400 EOL
Z550
HeadVert
HeadLeft
Offset
END
END
END
END
SpindleOn
END
ELSE
IF LAST Top?
IF NOT Top?
IF Bottom?
Y300
Z550
HeadBot
SeqC ' G53 Z0.0' EOL
Offset
ELSE
Y00
IF Front?
Z550
HeadHor
Offset
ELSE
IF RIght?
SeqC Right400 EOL
Z550
HeadRight
Offset
ELSE
IF Left?
SeqC Left400 EOL
Z550
HeadLeft
Offset
END
END
END
END
SpindleOn
END
ELSE
IF LAST Right?
IF NOT Right?
SeqC RapidC Right200 EOL
IF Front?
Y00
Z550
HeadTop
HeadHor
Offset
ELSE
IF Top?
Y00
Z550
HeadTop
Offset
ELSE
IF Left?
Y300
Z550
HeadLeft
SeqC ' G53 Z-100.0' EOL
Offset
ELSE
IF Bottom?
SeqC RapidC Right200 EOL
Y300
Z550
HeadBot
SeqC ' G53 Z0.0' EOL
Offset
END
END
END
END
SpindleOn
END
ELSE
IF LAST Left?
IF NOT Left?
SeqC RapidC Left200 EOL
IF Front?
Y00
Z550
HeadTop
HeadHor
Offset
ELSE
IF Top?
Y00
Z550
HeadTop
Offset
ELSE
IF Right?
Y300
Z550
HeadRight
SeqC ' G53 Z-100.0' EOL
Offset
ELSE
IF Bottom?
Y300
Z550
HeadBot
SeqC ' G53 Z0.0' EOL
Offset
END
END
END
END
SpindleOn
END
ELSE
IF LAST Bottom?
IF NOT Bottom?
SeqC RapidC ' G53 Z0.0 M05' EOL
IF Front?
SeqC ' G53 Y0.0' EOL
SeqC Left400 EOL
Z550
HeadTop
HeadHor
Offset
ELSE
IF Top?
SeqC ' G53 Y0.0' EOL
SeqC Left400 EOL
Z550
HeadTop
Offset
ELSE
IF Left?
SeqC ' G53 Y-200.0' EOL
SeqC Left400 EOL
Z550
HeadLeft
SeqC ' G53 Z-100.0' EOL
Offset
ELSE
IF Right?
SeqC ' G53 Y-200.0' EOL
SeqC Right400 EOL
Z550
HeadRight
SeqC ' G53 Z-100.0' EOL
Offset
END
END
END
END
SpindleOn
END
END
END
END
END
END
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
SideComment
CheckPass
TheOpComment
RETURN

FormatR: {use var #5 for input}
Recall# Num#('5')
RETURN

DrillCP1:
Save# Num#('4') ClearancePlane1#
Save# Num#('5') DComp
FormatR
RETURN

DrillCP2:
Save# Num#('4') ClearancePlane2#
Save# Num#('5') DComp
FormatR
RETURN

NextToolNum:
IF SetNextToolOp FirstOperation? {no more tool changes}
SeqC 'T0' EOL
ELSE
SeqC ' T' SetNextToolOp TrimToolComment$ ('6') EOL
END
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('10000')
SetMaxFeed('15000') {mm for metric}
SetFlagF('1') {Has rpm be output for this operation?}
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
' FRONT - ' EOL
' TOP - ' EOL
' BOTTOM - ' EOL
' LEFT - ' EOL
' RIGHT - ' EOL
' Notes: ' EOL
' Tool number is first six characters of tool comment' EOL
' all programming to be in XY plane, with PostScript side commands' EOL

END
EachOp {Start of post processing *********************}
SetFlagF('1') {no rpm output yet}
IF FirstOperation?
EOR ' ' Program# EOL
OpenSub
IF UseComments? AND ProgramNameComment?
Seq ' ( ' ProgramName$ ' )' EOL
END
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramComment?
SeqC ' ( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
SeqC ' ( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
SeqC ' ( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
SeqC ' ( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
SeqC ' ( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
SeqC ' ( FIRST TOOL NOT IN SPINDLE )' EOL
END
SeqC ' (SET X DATUM TO )' EOL
SeqC ' (SET Y DATUM TO )' EOL
SeqC ' (SET Z DATUM TO )' EOL
END
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
IF MultipleParts? AND AllToolsOnePart?
EachPart
END
Plane
{Seq ' L929 R48 60 R49 55' EOL}
{SeqC ' T' TrimToolComment$ ('6') EOL}
SeqC ' L30' EOL
DoOpComments
SideComment
{NextToolNum}
DoPostScript
{SetHead}
SpindleOn
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EachPart
END
CheckPass
TheOpComment
SeqC AbsOrInc Rapid StartPosition CRCOffsetC EOL
Offset
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EachPart
SeqC StartPosition EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
NextPart
END
DoEndOpPS
{ToToolChange}
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
NextPart
END
IF LAST ProgStop?
SeqC ' M00' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

SeqC ' L30' EOL
DoOpComments
SideComment
{NextToolNum}
{SetHead}
SpindleOn
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EachPart
END
CheckPass
TheOpComment
SeqC AbsOrInc Rapid StartPosition CRCOffsetC EOL
Offset
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
EachPart
SeqC StartPosition EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
{ToToolChange}
{
IF NOT LAST Front?
IF NOT LAST Top?
HeadVert
END
HeadHor
END
}
SeqC ' M00' EOL
{SetHead}
SpindleOn

{Start new Operation}

GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StartPosition CRCOffsetC EOL
Offset
ELSE

{Start new Operation}

{ChangeHead}
GetStartOfSameTool
SeqC PlaneC AbsOrInc Rapid StartPosition CRCOffsetC
IF NOT Flag?('1')
IF Tap?
' S' SpeedRPM# {can't round}
ELSE
SpeedC
END
SetFlag('1') {speed has been output}
END
EOL
END
END
END
END {common point for all operations}
IF Milling?
SeqC ToCP2 CoolOn EOL
IF Repeats?
NewProg
IF ZshiftOnly?
IF AutoCycle? {incremental Autocycle sub can have Z moves}
ZonlyRepAutoCycle
ELSE {Z shift only, NOT Auto Cycle}
StdRep
END {end Auto Cycle IF}
ELSE {not Z only}
StdRep
END {end Z only IF}
ELSE {no repeat OPs}
Milling
END
IF AutoCycle?
SeqC ToCP3 CoolOff EOL
ELSE
IF FIFO? {.81}
SeqC FeedC ToCP3 FeedEntC CoolOff EOL
ELSE
SeqC RapidC ToCP3 CoolOff EOL
END
END
IF CutterRadiusCompensation?
SeqC ' G40' EOL
{OffsetReset}
SeqC Rapid
LoadFeat Num#('0') Num#('0') Num#('0') {dummy load EP's to get SP's}
LoadFeat SPX# SPY# SPZ#
FeatMoveHV EOL
END
ELSE
IF Drilling?
IF Repeats?
EachRep
SeqC AbsOrInc Rapid StartPosition EOL
END
GetCycle
SeqC Cycle

' R03 ' DrillDepth

' R02 '
IF RetractToCP1?
DrillCP1
ELSE
DrillCP2
END

' R10 '
IF RetractToCP1?
DrillCP1
ELSE
DrillCP2
END

IF Peck?
' R01 '
Save# Num#('5') Peck#
FormatR
END

IF Peck?
{' R04 .2'}
' R05 '
Save# Num#('5') Peck#
FormatR
END

IF Dwell?
' R04 '
Save# Num#('5') Dwell#
FormatR
END

IF Tap?
IF CWSpindle?
' R06 04 R07 03'
ELSE
' R06 03 R07 04'
END
END

{
' R11 '
IF Left? OR Right?
'1'
ELSE
IF Top? OR Bottom?
'2'
ELSE
'3'
END
END
}

CoolOn
IF Tap?
' F' DirectTapFeed#
ELSE
FeedEnt
END
EOL
TrackZNO# SPZ# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC ' G80' CoolOff EOL
IF Repeats?
NextRep
END
SeqC RapidC ToCP3 EOL
END
END
NextOp {loops back to EachOP until last Operation}

{End of program ************************************************************}

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
NextPart
END

{EOPToToolChange}
SeqC Rapid ' G40 G53 Z32.55 M05 D00' EOL
SeqC ' G53 X15.0 Y11.0' EOL

IF MultipleParts? AND OneToolAllParts? AND FullUp?
NextPart
END
DoEndOpPS

IF ProgStop?
SeqC ' M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
NextPart
END

{
SeqC ' L96 M43' EOL
SeqC ' L999' EOL
}

IF UseComments?
SeqC ' (END OF PROGRAM)' EOL
SeqC ' (UNLOAD PART)' EOL
END
SeqC EOP EOL
CloseSub
Post2 {organize Subs into one program}
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:
Siemens 8M Charmin M752 81 20m
Dynapath Delta 20 SP M780 81 2
Dynapath Sys 20 [WM] M784 81 5
Fanuc 10M (AGA) M147 81 2
Using the Siemens S65 Display
Tosnuc 600M VMC 45 M442 81 3
20 Organizacja usług dodatkowych w zakładzie hotelarskim
20 rad jak inwestowac w zloto
20 3SH~1
51 20

więcej podobnych podstron