Maho VCNC 432 [DF] MZ50 89


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

{Noted differences from M001:
Spaces added to all Addresses except N.
No support for FifthAxis at PSStuff and PostScript Comments.
Changed all occurances of Seq/SeqC to SeqLab.
All blocks require line numbers, including Comments.
This control supports Subroutines after M30 by calling the Line# that begins them.
Example:
N189 G22 N=910 { Calls Line 910 }
N190 G14 J1 N1=189 N2=189 { Repeat Once Line 189 to 189 }
N191 G93 X0 Y0 Z0 { Origin Restore }

N566 M30 { End of Program }

N910 { Beginning of SubRoutine }
N567( SUB NUMBER: 10 ) { Sequential Line Numbering }
N583 G92 X5. Y0. Z0. { Origin Shift }
N911
N584( SUB NUMBER: 11 )
Modifications before M30:
Added TagInc and '>' Tag# at StdSub and OpenMP Equally Spaced Offsets.
Changed MachSpec SubCall value to G22.
Changed CallLab to ' N=9' Program# at StdSub, OpenMP, ToolPath AutoCycle PointFeat,
ZOnlyRepAutoCycle and ZOnlyRep.
Changed RepLab RepCycs to ' G14 J' RepsLess1 ' N1=Å‚' Tag# ' N2=Å‚' Tag# at StdSub.
Changed RepLab Parts to ' G14 J' PartsLess1 ' N1=Å‚' Tag# ' N2=Å‚' Tag# at OpenMP EqualSpacedOffsets.
Changed Preset UnShftRC to ' G93 X0 Y0 Z0' at FinishSubG92.
Changed Preset UnShftPC to ' G93 X0 Y0 Z0' at CloseMP EqualSpacedOffsets.
Modifications after M30:
Changed SubID to ' N9' Program# at StartSub.
Changed ShiftRC to ' X' RepeatX# ' Y' RepeatY# ' Z' RepeatZ# at FinishSubG92.
Changed ShiftPC to ' X' PartShiftX# ' Y' PartShiftY# ' Z' PartShiftZ# at CloseMP EqualSpacedOffsets
Additional related changes
Deleted EndSub at CloseMP WorkFixtureOffsets, AutoCycCutSub2, ZOnlyRepAutoCycle and ZOnlyRep.
Deleted AbsOrInc at G92Sub.
Changed ProgID1 to ' N9' Program# at FirstOperation.
Drilling:
Canned Cycle Lines:
G81 Y.1 B.9 Z-1. F5. { FI-RO }
G82 X.5 Y.1 Z-1. F5. { FI-D-RO }
G83 Y.1 B.9 Z-1. Q.25 J0 F5. { PeckFullRetract }
G83 Y.1 Z-1. Q.25 J.05 F5. { PeckChipBreaker }
G85 Y.1 Z-1. F5. { FI-FO }
G85 X.5 Y.1 Z-1. F5. { FI-D-FO }
G84 Y.1 B.9 Z-1. F5. { Tap }
Definitions:
Cycle
Dwell
' Y' CalcCP2FmSurf#
' B' CP1LessCP2# { IF RetractToCP1 = TRUE }
' Z' CalcZFmSurf#
Peck
' J0' { IF Peck and PeckFullOut = TRUE }
' J' Retract# { IF Peck and PeckChipBreaker = TRUE }
FeedEnt
ToolPath:
' G79 Z' CalcZSurf# { FirstFeat }
' G79' MoveSXYC { All Other Features }
NOTE: Processor does not currently support variable drill depths.
Added 'PM' to EOR at FirstOperation.
Moved FirstOperation AbsOrInc from StrtPos line to before handling of MultipleParts AllToolsOnePart.
This causes AbsOrInc to always be output in Main Program.
Deleted 'G80' CRCOff from Safe Start at FirstOperation and NewTool.
Moved ToolChng to OpToolID block at FirstOperation and NewTool.
Changed OfstOn to ZCP1 and moved to StrtPos line at FirstOperation, NewTool and SameTool.
Deleted ResetCRCNum at ToolPath, CRCOffsetC is not Output.
Deleted IncValue OfstOff at NewTool, SameTool and end of Prog.
Deleted AbsOrInc at Home Block at NewTool and end of Prog.
Deleted SpinOff at NewTool, SameTool and end of Prog.
Moved ProgStop to after OpToolID ToolChng at NewTool.
Deleted AbsOrInc at StrtPos line at NewTool and Drilling Repeats.
Moved PlaneC from SameTool to GetStartOfSameTool sub.
Deleted handling of NewToolOffset at SameTool.
Deleted EOR at end of Prog.
Added ASCII(4) after EOP at end of Prog.
Added Retag at end of Prog.
DWB}

{8/7/91
Copied & modified: Maho HCNC 432 [MS] M491.80
For: Machine Specialties
Machine: Maho CNC 432 with HeadStock rotated for Verticle machining.
Control:
Exchanged Y/Z Addresses in MachSpec Strings 1.
Exchanged J/K Addresses in MachSpec Strings 1.
Exchanged G17/G18 in MachSpec Commands 2.
Changed FORMAT for X from '###.####;0.' to '*###.####;0.' in MachSpecs Default Formats for Negating.
Added FORMAT(8) to Negate output of PartShiftX# and RepeatX#.
Exchanged Y/Z Addresses for RepeatY# & RepeatZ# at FinishSubG92.
Exchanged Y/Z Addresses for PartShiftY# & PartShiftZ# at CloseMP.
Exchanged J/K Addresses for HelixPitch# at FormatArc.
Changed Z Address to Y for CalcZSurf# at ToolPath Drilling PointFeat.
Notes from Maho HCNC 432 [MS] M491.80:
HeadStock rotated for Horizontal machining.
Updated per Fanuc 6M M001.80 Format, made minor corrections.
Changed M13 to M3 in MachSpec for SpinOn.
Added Index sub before PSStuff sub.
Moved FourthAxis from PSStuff sub to Index sub, and called with WFOStuff.
Changed FourthAxis Address from A to B at Index sub and PostScript comments.
Control rules state 'One G-Code per Block'. Modified the following:
AbsOrInc at AutoCycCutSub2 and FirstOperation.
Plane/PlaneC at FirstOperation, NewTool and SameTool.
CRCOnC at StdLine.
CRCOffC at FinishSub1, ToolPath AutoCycle RapidFeat and LineFeat, AutoCycCutSub2 and IF Milling.
Modified FormatArc sub to support helical moves.
Deleted CRCOffsetC 3 places at StdLine sub.
Deleted literal 'START' at FirstOperation.
Moved WFOStuff to line after ToolChng.
Moved Speed/SpeedC SpinOn to StrtPos line at FirstOperation, NewTool and SameTool.
Added Rapid back in StrtPos line at FirstOperation, NewTool and SameTool.
Added CoolOn and CoolOff commands back in at FirstOperation, NewTool and SameTool.
Output only for FirstOperation, PostScript or MultipleParts.
Deleted SpinOff at NewTool, SameTool and end of Prog.
Added ' T0 M67' at end of Prog.
Added WFOOff ' X27.1662 Y17.3237 Z19.2922 ' at end of Prog.
Above two comments are output just prior to EOP.
JR}

{2/14/92
Modified: Maho VCNC 432 [MS] M489.80.1
For: Machine Specialties
Deleted logic and FORMAT for outputting negated I Address value.
The I Address needs to be treated normally.
Added DoArc sub
Moved MoveXYZ ArcIJ/ArcRC from FormatArc sub to DoArc sub.
Changed ArcIJC to ArcIJ at DoArc sub.
Corrected logic for supporting HelixPitch# based on Plane and ThirdAxis Move at FormatArc.
KM}

{3/20/92
Modified: Maho VCNC 432 [MS] M489.80.2
For: Machine Specialties
Added logic and FORMAT back in for outputting negated I Address value.
Customer requested to suppress output of J value during ZonlyRep ArcFeatures.
Added TrackZNO# EPZ# at ZonlyRep sub to update Z Status Register.
This corrects bad IF ZMove? boolean at FormatArc sub caused by SkipZ command.
KM/JR}

{3/26/92
Modified: Maho VCNC 432 [MS] M489.80.3
For: Machine Specialties
Changed Address for Peck to Q in MachSpec.
Changed Address for Retract to R in MachSpec.
NOTE: A bug exists that prevents the Retract Address from being output.
KM}

{7/15/92
Modified: Maho VCNC 432 [MS] M489.80.4
For: Machine Specialties
Changes made per Joseph Landry and Bob Shumaker at Machine Specialties.
Updated to Version 4.1 per Fanuc 6M M001.81 Format.
Added Retract# and RapidF# to FORMATs.
Changed Retract to ' J' Retract# at Drilling Cycle line.
This solves the bug that prevents the Retract Address from being output.
Added RapidF# at ToolPath to force FeedRate in all Operations.
DWB}

{4/2/93
Modified: Maho VCNC 432 [MS] M489.81
For: Machine Specialties
Changes made per David Myers at Machine Specialties.
Updated to Version 4.1 per Fanuc 6M M001.81.2 Format.
Added FeedRate Scale Subroutines to modify value of Feed Outputs.
When user has requested an RPM value greater than the controls limits, we need to output that
limit, and adjust the Feed Outputs to maintain Constant Surface Feed.
Changed SetMaxRPM('6000') to SetMaxRPM('20000')
Var(1) contains Num(6000).
Var(2) contains Num(1) Ö SpeedRPM#.
Var(3) contains current Feed value in effect.
Var(4) contains Operations FeedContour# Ö Var(2)
FeedContour# can be RapidF#, FeedEntry# or FeedTapIPR#('1') depending on Prog situation.
NOTE: ArcFeedC and DecelFeed are not supported, thus no ConstantSurfaceFeed is output.
I am currently routing Prog through FeedRate to control this.
3 other possible solutions:
1. Create ArcFeed# and DecelFeed# to output value of their counterparts, or
2. Add ability to use a variable or Math formula within an argument,
Example:
SetScale(' Recall# Num#('2') ')
SetScale(' DIV# Num#('6000') SpeedRPM# ')
3. Give me a formula to accomplish ArcFeed and DecelFeed.
DWB}

{9/28/95, Updated Maho VCNC 432 [MS] M489.81.2 to .85 format per v2.20 Update Instructions .01, JR}
{NOTE: Same as M491 with X axis negated and Y&Z lables swapped}

{9/20/96
Initial: Maho VCNC 432 [MS] M489.85
Created: Maho VCNC 432 [DF] Mxxx.89
ForUser: Delta Faucet
Control: Maho CNC 432
Machine: Maho MH600C
Develop: ComPost2 68k v1.0b3, Catalyst68K v3.04.10.C
Comment: New processor per marked up radout from Brue Snyder
Added G70, G40 & G53 code lines to beginning od program.
Changed MachSpec tool change command from M6 to M66.
Supressed output of CoolOff if coolant was not used.
Added G52 at beginning of program as base WFO call.
WFOs, G54 thru G59, output by request MPs or NewWFO only.
Added TCZ# for Z retract with 3.0 as default.
Changed to NoSubs format per Fanuc 6M NoSubs M877.89.1
Jim Radcliffe}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(TCZ#,4)
FORMAT(CalcZSurf#,4)
FORMAT(CP1LessCP2#,4)
FORMAT(CalcZFmSurf#,4)
FORMAT(CalcCP2FmSurf#,4)
FORMAT(HelixPitch#,4)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
FORMAT(RapidF#,7)
FORMAT(Recall#,8) { FeedRate Scale }

{FeedRate Scale Subroutines ************************************************}

GetSpeed:
IF LTEqual? SpeedRPM# Recall# Num#('1')
Speed
ELSE
FORMAT(Recall#,9)
' S' Recall# Num#('1')
FORMAT(Recall#,8)
Save# Num#('2') DIV# Recall# Num#('1') SpeedRPM#
END
RETURN

GetSpeedC:
IF LTEqual? SpeedRPM# Recall# Num#('1')
SpeedC
ELSE
IF LessThan? LAST SpeedRPM# Recall# Num#('1')
GetSpeed
END
END
RETURN

GetRapidF:
Save# Num#('3') Num#('0')
RETURN

DoFeed:
' F' Recall# Num#('3')
RETURN

GetFeedEnt:
IF LTEqual? SpeedRPM# Recall# Num#('1')
FeedEnt
ELSE
Save# Num#('3') MUL# FeedEntry# Recall# Num#('2')
DoFeed
END
RETURN

GetFeedEntC:
IF LTEqual? SpeedRPM# Recall# Num#('1')
FeedEntC
ELSE
Save# Num#('4') MUL# FeedEntry# Recall# Num#('2')
IF NotEqual? Recall# Num#('3') Recall# Num#('4')
GetFeedEnt
END
END
RETURN

GetFeedRate:
IF LTEqual? SpeedRPM# Recall# Num#('1')
FeedRate
ELSE
Save# Num#('3') MUL# FeedContour# Recall# Num#('2')
DoFeed
END
RETURN

GetFeedRateC:
IF LTEqual? SpeedRPM# Recall# Num#('1')
FeedRateC
ELSE
Save# Num#('4') MUL# FeedContour# Recall# Num#('2')
IF NotEqual? Recall# Num#('3') Recall# Num#('4')
GetFeedRate
END
END
RETURN

GetDecelFeed:
IF LTEqual? SpeedRPM# Recall# Num#('1')
DecelFeed
ELSE
GetFeedRate
END
RETURN

GetArcFeedC:
IF LTEqual? SpeedRPM# Recall# Num#('1')
ArcFeedC
ELSE
GetFeedRateC
END
RETURN

{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?
Seq '( CYCLE START )' EOL
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
Seq '( PART ' Tag# ' )' EOL
END
IF OperationIDComment?
Seq '( OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
Seq '( ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
Seq '( ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
Seq '( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
Seq '( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit: {reset flags}
NewWFOF
RotateF
RETURN

Index: { Called with WFOStuff }
IF FourthCW?
FORMAT(FourthDegree#,2)
' B' FourthDegree#
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
' B' FourthDegree#
FourthCCWF {reset flag}
END
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
Seq PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
Seq EndOpPS EOL
PSStuff
NextPS
RETURN

ExitType:
IF FIFO?
FeedC
ELSE
RapidC
END
RETURN

ExitFeed:
IF FIFO?
GetFeedEntC
END
RETURN

DoArc:
MoveXYZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcRC
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane? AND ZMove?
DoArc
' J' HelixPitch#
ELSE
IF XZPlane? AND YMove?
DoArc
' K' HelixPitch#
ELSE
IF YZPlane? AND XMove?
DoArc
' I' HelixPitch#
ELSE
DoArc
END
END
END
RETURN

StdRapid:
IF LastFeat?
Seq CRCOffC EOL
Seq RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
Seq RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
Seq CRCOnC EOL
Seq RapidC MoveXYZC EOL
END
END
END
RETURN

StdLine: {enables CRC on first call, .70}
IF LastFeat?
Seq CRCOffC EOL
Seq FeedC MoveXYZC GetFeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
Seq FeedC MoveXYZC GetFeedRateC EOL
ELSE
Seq CRCOnC EOL
IF Decelerate?
IF RoomToDecel?
DecelMove1
Seq FeedC MoveXYZC GetFeedRateC EOL
DecelMove2
END
Seq FeedC MoveXYZC GetDecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
Seq FeedC MoveXYZC GetFeedRateC EOL
END
END
END
END
RETURN

StdArc:
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
Seq FormatArc GetArcFeedC EOL
DecelMove2
END
Seq FormatArc GetDecelFeed EOL
ELSE
Seq FormatArc GetArcFeedC EOL
END
NEXTQuadrant
RETURN

ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

EntryMove:
IF FeedEntry?
Seq FeedC ZInC GetFeedEntC EOL
ELSE
Seq RapidC ZInC EOL
END
RETURN

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
Seq IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
Seq FeedC StrtPosC EOL
ELSE
Seq RapidC StrtPosC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
Seq ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
Seq AbsOrInc EOL
Seq ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF NOT FirstFeat?
Seq
IF FIFO?
Rapid
END
MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
Seq ' G79' MoveSXYC
IF FirstFeat?
' Y' CalcZSurf#
END
EOL
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

WFOStuff:
IF MultipleParts? AND WorkFixtureOffsets?
SetWFO
ELSE
IF NewWFO?
'G' NewWFO#
END
END
RETURN

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

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
IF NOT CoolOff?
Seq CoolOff EOL
END
Seq Rapid ' Y' TCZ# EOL
END
DoOpComments
Seq WFOStuff Index EOL
ELSE
Seq PlaneC EOL
Seq OpToolID ToolChng EOL
DoOpComments
DoPostScript
Seq ' G52' EOL
Seq WFOStuff Index EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
Seq Rapid StrtPos EOL
ELSE
Seq Rapid StrtPos ZCP1 GetSpeed SpinOn EOL
Seq CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
IF LAST NOT CoolOff?
Seq CoolOff EOL
END
Seq Rapid ' Y' TCZ# EOL
DoEndOpPS
IF ToolChangeAtHome?
Seq Home EOL
END
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
IF NOT CoolOff?
Seq CoolOff EOL
END
Seq Rapid ' Y' TCZ# EOL
END
DoOpComments
Seq WFOStuff Index EOL
ELSE
Seq PlaneC EOL
Seq OpToolID ToolChng EOL
IF LAST ProgStop?
Seq 'M0' EOL
ELSE
Seq ProgStop EOL
END
DoOpComments
DoPostScript
Seq WFOStuff Index EOL
END
CheckPass
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane? AND NOT FirstPart?
Seq Rapid StrtPos EOL
ELSE
Seq Rapid StrtPos ZCP1 GetSpeed SpinOn EOL
Seq CoolOn EOL
END
ELSE
IF SameTool?

{Finish off last Operation}

IF LAST ProgStop?
IF LAST NOT CoolOff?
Seq CoolOff EOL
END
ELSE
IF CoolOff? AND LAST NOT CoolOff?
Seq CoolOff EOL
END
END
IF LAST ProgStop? OR NewToolOffset?
Seq Rapid ' Y' TCZ# EOL
END
DoEndOpPS
IF LAST ProgStop?
Seq ' M0' EOL
END

{Start new Operation}

Seq PlaneC EOL
DoOpComments
DoPostScript
Seq WFOStuff Index EOL
CheckPass
Seq Rapid StrtPos
IF LAST ProgStop?
ZCP1
END
GetSpeedC
IF LAST ProgStop?
SpinOn
END
EOL
IF LAST ProgStop?
Seq CoolOn EOL
ELSE
IF NOT CoolOff? AND LAST CoolOff?
Seq CoolOn EOL
END
END
END
END
END

{ Common Point for All Operations }

GetRapidF RapidF# { To force FeedRate }

IF Milling?
Seq ZCP2C EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
Seq Connect StrtPos EOL
IF NOT FeedConnect?
Seq ZCP2C EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
Seq CRCOffC EOL
IF NOT FeedConnect?
Seq ExitType PRIME ZCP3C ExitFeed EOL
END
NEXTRep
END
END
Seq CRCOffC EOL
IF AutoCycle?
Seq ZCP3C EOL
ELSE
Seq CRCOffC ExitType ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
IF NOT FirstCycle?
Seq Rapid StrtPos EOL
END
END
Seq DrillCP EOL
GetCycle
Seq Cycle
IF Dwell?
' X' Dwell#
END
' Y' CalcCP2FmSurf#
IF RetractToCP1?
' B' CP1LessCP2#
END
' Z' CalcZFmSurf#
IF Peck?
Peck ' J'
IF PeckChipBreaker?
Retract#
ELSE { PeckFullRetract }
'0'
END
END
GetFeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
Seq RapidC ZCP3C EOL
IF Repeats?
NEXTRep
END
Seq RapidC ZCP3C EOL
END
END
RETURN

FinishLastOp:
IF NOT CoolOff?
Seq CoolOff EOL
END
Seq Rapid ' Y' TCZ# EOL
DoEndOpPS
IF FIRST ToolChangeAtHome?
Seq FirstHome EOL
END
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF ProgStop?
Seq ' M0' EOL
ELSE
Seq ProgStop EOL
END
ELSE
Seq EOP EOL
END
RETURN

DoToolsOps:
EachOp
IF GTEqual? Operation# Recall# Num#('5') AND LTEqual? Operation# Recall# Num#('6')
{Tools1stOp ² op ² ToolsLastOp}
DoOp
END
NextOp
RETURN

NextTools1stOp:
SetNextToolOp Operation#
RETURN

GetToolsOps:
EachOp
IF Equal? Operation# Recall# Num#('5') {if op = Tools1stOp}
IF GreaterThan? NextTools1stOp Recall# Num#('5') {if NextTools1stOp is greater Tools1stOp}
Save# Num#('6') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1}
ELSE {else}
Save# Num#('6') Recall# Num#('7') {ToolsLastOp becomes ncCAMsLastOp}
END
END
NextOp
RETURN

DoTool:
IF NOT Flag?('1')
GetToolsOps
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
DoToolsOps
IncWFO
NextWFO
ELSE
EachPart
TagInc
DoToolsOps
NextPart
END
IF LessThan? Recall# Num#('6') Recall# Num#('7') {if ToolsLastOp < ncCAMsLastOp}
Save# Num#('5') ADD# Recall# Num#('6') Num#('1') {Tools1stOp becomes NextTools1stOp}
ELSE {else}
SetFlag('1') {set DoneFlag}
END
TagInit
END
RETURN

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

{setup and initializations}
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetMaxRPM('20000') { FeedRate Scale }
SetMaxFeed('500')
SetTCZ('3.0')
SetFlagF('1') {done flag}
Save# Num#('1') Num#('3135') { MaxRPM }
Save# Num#('2') Num#('0') { Var(1) Ö SpeedRPM# }
Save# Num#('3') Num#('0') { current feed value }
Save# Num#('4') Num#('0') { operations feed value }
Save# Num#('5') Num#('0') { tools first op# }
Save# Num#('6') Num#('0') { tools last op# }
Save# Num#('7') Num#('0') { ncCAMs last op# }
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 + B move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
' ToolChangeZ(3.0), TCZ(3.0) -' EOL
' Sets the retract Y level for the tool at its completion. 3.0 is the default value.' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR 'PM' EOL
'N9' Program# EOL
IF ToolChangeAtHome?
SetHome
END
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
Seq '( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
Seq '( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
Seq '( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
Seq '( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
Seq '( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
Seq '( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
Seq '( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
Seq AbsOrInc EOL
Seq ' G70' EOL
Seq ' G40' EOL
Seq ' G53' EOL
Seq Plane EOL
END
NextOp
IF MultipleParts?
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoOp
NextOp
FinishLastOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
END
ELSE
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('5') Operation# {ncCAMs1stOp becomes Tools1stOp}
END
IF LastOp?
Save# Num#('7') Operation# {save ncCAMsLastOp}
END
NextOp
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
FinishLastOp
END
END
ELSE
EachOp
DoOp
NextOp
FinishLastOp
END
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
Seq '( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
Seq '( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
Seq '( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
ASCII('04') EOL
CloseSub
Post2 {organize Subs into one program}
Close


Wyszukiwarka

Podobne podstrony:
Maho VCNC 432 [MS] M489 89
Maho VCNC 432 [PC] MU02 89 1
Maho HCNC 432 [MS] M491 89
Maho VCNC 432 [E&M] MQ50 89m
Maho VCNC 432 [IC] M505 81 3m
Maho VCNC 432 [NOAO] C914 12
Maho VCNC 432 [ZC] C949 14m
Maho CNC 432 M194 89
Maho HCNC 432 [REI] C763 12 3
Maho HCNC 432 [NOAO] C722 12
Maho [LANL] M061 89 1
Bandit IV AB [DM] MV32 89 1

więcej podobnych podstron