{Change Comments ***********************************************************}
{5/18/95
Initial: Siemens 8M Charmin M752.81.19m
ForUser: Fructus
Control: Sinumeric 8M
Machine: HMC-600
Develop: ComPost 4.21.26, Catalyst v2.14.40C
Comment: New Processor Per instructions
Jim Radcliffe}
{1/9/96
Updated & Modified: Sinumeric 8M HMC-600 M793.81.2m
For: Fructus
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.08/Catalyst v2.28.08/Compost 4.21.34/1.0a
Changes made per Mikael Bagge of Fructus, faxes, sample part and output file.
Updated for Catalyst v2.20 per Fanuc 6M M001.85.02 Format
Changed Format for Address D from 00 to #0 in Compost Default Formats dialog.
Added ####.### Format for Address F in Compost Default Formats dialog.
Form did not Format Address F, and Post was outputting both F. and F650240.
Deleted DirectTapFeed# at Prog Numeric Format Definitions.
Added DIV# to FORMAT#2 at Prog Numeric Format Definitions.
Modified ending of Subs.
All Subs, which are output prior to main, end with M17, except for final sub, which ends with M02.
Added Flag(4) to test for existance of output subs.
Deleted all occurances of EndSub command.
Added condition to output EndSub command at StartSub sub.
First sub will set Flag(4).
All other subs will output M17 to end previous sub.
Following final SubProgram, post will output EOP block at end of Prog.
Modified structure of CRCOn/CRCOff.
Customer reported that control requires strict adherence to following:
CRCOn = G00/G01/G02/G03 G41/G42 D2 XYZIJK
CRCOff = G00/G01/G02/G03 G40 D0 XYZIJK
Added ckCRCOffC to cancel CRC outside and after ToolPath.
Added Flag(3) to check for need of D0, CRCOffsetOff.
Added L966 M6, tool change sub, at FirstOperation.
Deleted R04 Dwell parameter at IF Drilling.
Deleted R10 ZRetract parameter at IF Drilling.
Changed DirectTapFeed# to DIV# FeedEntry# SpeedRPM# at IF Drilling.
DWB}
{1/17/96, Updated .85 to .86 version, MPK}
{3/25/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '000'
#3 = '00'
#4 = '###0.0##'
#5 = '#######0'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CallMasterNum#,2)
FORMAT(Program#,2) {.72}
FORMAT(Repeats#,3)
FORMAT(Parts#,3) {.72}
FORMAT(TrackZNO#,4)
FORMAT(DIV#,4)
FORMAT(ClearancePlane1#,4)
FORMAT(ClearancePlane2#,4)
FORMAT(SPZ#,4)
FORMAT(Peck#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
{Prog Subroutines **********************************************************}
RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is a Metric post}
END
RETURN
DoSubComment:
IF UseComments? AND SubComment?
SeqC ' ( SUB NUMBER: ' Program# ' )' EOL
END
RETURN
DoOpComments:
IF UseComments?
SetScale('1')
IF OperationIDComment?
SeqC ' ( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
SeqC ' ( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
SeqC ' ( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
SeqC ' ( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
SeqC ' ( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN
PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN
PSStuff: {revised.72}
FourthCWF {reset flag}
FourthCCWF {reset flag}
FifthCWF {reset flag}
FifthCCWF {reset flag}
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 ZIn FeedEnt EOL
ELSE
SeqC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
IF Flag?('4')
SeqC EndSub EOL
ELSE
SetFlag('4') { For output of M02 following final sub }
END
'%SP' EOL
'L' Program# '00' EOL
DoSubComment
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 ' L' Program# Repeats# EOL
StartSub
RETURN
ckCRCOffC:
IF CutterRadiusCompensation? AND Flag?('3')
SetFlagF('3')
CRCOffC ' D0'
END
RETURN
FinishSub1: {part 1}
SeqC
IF NOT FeedConnect?
IF AutoCycle?
ckCRCOffC ZCP3C
ELSE
IF FIFO? {.81}
FeedC ckCRCOffC ZCP3C FeedEntC
ELSE
RapidC ckCRCOffC ZCP3C
END
END
END
EOL
RETURN
FinishSubG92: {part 2}
SeqC Preset ShiftRC EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqC SetWFO ' L' Program# '01' EOL
IncWFO
NextWFO
ELSE
SeqC ' L' Program# Parts# EOL
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets?
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC 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?
SeqC AbsValue EOL
END
RETURN
ckCRC:
IF LastFeat?
CRCOffC
IF CutterRadiusCompensation? AND Flag?('3')
SetFlagF('3')
' D0'
END
ELSE
IF NOT ZMove?
SetFlag('2') { CRCOffsetC }
CRCOnC
END
END
RETURN
ckCRCNum:
IF Flag?('2')
SetFlagF('2')
SetFlag('3')
CRCOffsetC
END
RETURN
FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
ckCRC ckCRCNum MoveXYZC ArcIJ
RETURN
FormatLine:
DoAbsOrInc FeedC ckCRC ckCRCNum MoveXYZC
RETURN
ToolPath:
ResetCRCNum
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqC ' L' Program# '01' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC DoDrillAbsOrInc MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqC DoAbsOrInc RapidC ckCRC ckCRCNum MoveXYZC EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatLine FeedRateC EOL
DecelMove2
END
SeqC FormatLine DecelFeed EOL
ELSE
SeqC FormatLine FeedRateC EOL
END
END
ELSE
IF ArcFeat?
IF LastFeat?
SeqC FormatArc ArcFeedC EOL
ELSE
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
END
NEXTFeat
RestoreAbsOrInc
RETURN
WFOStuff:
IF NewWFO?
IF MultipleParts?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
ELSE
' G' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
' G' NewWFO#
END
END
END
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqC IncValue EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
SeqC AbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
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
SeqC 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?
SeqC Feed IncValue StrtPosC EOL
SeqC AbsOrInc
ELSE
SeqC Feed
END
ELSE
SeqC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqC AbsOrInc ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqC Rapid ZCP2PlusInc EOL
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqC ' L' Program# '01' 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 ZCP2 FeedEnt EOL {.69}
ELSE
SeqC Rapid ZCP2 EOL {.69}
END
END {.69}
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqC FeedC ZInPlusInc FeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqC ' L' Program# '01' EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
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
GetStartOfSameTool:
Plane { No Output }
DoOpComments
DoPostScript
CheckPass
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('15000') {mm for metric}
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { CRCOffsetC }
SetFlagF('3') { CRCOffsetOffC }
SetFlagF('4') { Subs output }
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
OpenSub
EOR ProgNum EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
SeqC ' ( ' ProgramName$ ' )' EOL
END
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$ ' MILLIMETERS )' EOL
END
IF PartsComment?
SeqC ' ( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
SeqC ' ( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Plane { No Output }
SeqC ' M99' EOL
SeqC OpToolID ' M71' EOL { chooses first tool }
SeqC ' L966 M6' EOL { tool change sub }
SeqC ' L960 M60' EOL { table in }
SeqC ' L999' EOL { control code ??? }
SeqC ' G59 N1 X Y Z B0' EOL { This sets G54 }
SeqC ' G59 N2 X Y Z B0' EOL { This sets G55 }
SeqC ' G59 N3 X Y Z B0' EOL { This sets G56 }
SeqC ' G59 N4 X Y Z B0' EOL { This sets G57 }
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC Rapid AbsOrInc WFOStuff StrtPos ' G43' ToolOfst ZCP1 Speed PreTool SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF LAST ProgStop?
SeqC ' M00' EOL
ELSE
SeqC ProgStop EOL
END
{Start new Operation}
Plane { No Output }
SeqC ' L966' ToolChng ' ( ' ToolComment$ ' )' EOL
SeqC ' L999' EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqC Rapid AbsOrInc WFOStuff StrtPos ' G43' ToolOfst ZCP1 Speed PreTool SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC ' M00' EOL
{Start new Operation}
GetStartOfSameTool
SeqC Rapid AbsOrInc WFOStuff StrtPos ' G43' ToolOfst ZCP1 Speed SpinOn EOL
ELSE
IF NewToolOffset?
{Start new Operation}
GetStartOfSameTool
SeqC Rapid AbsOrInc WFOStuff StrtPos ' G43' ToolOfst ZCP1 SpeedC EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqC Rapid AbsOrInc WFOStuff StrtPos SpeedC EOL
END
END
END
END
END {common point for all operations}
IF Milling?
SeqC ZCP2C CoolOn 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?
SeqC ZCP3C CoolOff EOL
ELSE
IF FIFO? {.81}
SeqC FeedC ckCRCOffC ZCP3C FeedEntC CoolOff EOL
ELSE
SeqC RapidC ckCRCOffC ZCP3C CoolOff EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
GetCycle
SeqC Cycle
IF Peck?
' R01 ' Peck#
END
' R02 ' ClearancePlane2#
' R03 ' FIRST SPZ#
IF Peck?
' R05 ' Peck#
END
IF Tap?
IF CWSpindle?
' R06 04 R07 03'
ELSE
' R06 03 R07 04'
END
END
CoolOn
IF Tap?
' F' DIV# FeedEntry# SpeedRPM#
ELSE
FeedEnt
END
EOL
IF CallMasterOp?
SeqC ' L' CallMasterNum# '01' EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqC ' L' Program# '01' EOL
StartSub
ToolPath
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqC Rapid ' G80' ZCP3 CoolOff EOL
IF Repeats?
FinishSubG92
END
END
END
NextOp {loops back to EachOP until last Operation}
{End of program ************************************************************}
{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ProgStop?
SeqC ' M00' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqC ' L960 M61' EOL { table out }
SeqC EOP EOL
IF Flag?('4') { Subs were output }
OpenSub
SeqC EOP EOL
CloseSub
END
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:
Sinumeric 8M [DI] MV80 89 2sirio 600Fagor 8050 [MDR] MX28 89mFadal 2 LH [WSM] MX32 89mSUZUKI GSXR 600 750Heid TNC 425 [NPP] MX02 89mSerwisowka Kody Komputera Rover 100; 200; 400; 600; 800 [D]Siemens 810M M114 89mNajbardziej wyjątkowy zegar na wieży Kremla obchodzi 600 latBP Boss 7 2 M102 89mFadal Format 2 [R] MU27 89mYasnac MX2 Matsuura M017 89m8M prostowniki jednofazoweHeid 145C BP M215 89mwięcej podobnych podstron