Maho VCNC 432 [MS] M489 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}

{1/17/96, Updated .85 to .86 version, MPK}

{3/25/96, Updated .86 to .89 version, TH}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(PartShiftY#,4)
FORMAT(PartShiftZ#,4)
FORMAT(RepeatY#,4)
FORMAT(RepeatZ#,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 }
FORMAT(PartShiftX#,10)
FORMAT(RepeatX#,10)

{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?
SeqLab '( SUB NUMBER: ' Program# ' )' EOL
END
RETURN

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

PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
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: {revised.72}
RETURN

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

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

EntryMove:
IF FeedEntry?
SeqLab Feed ZIn GetFeedEnt EOL
ELSE
SeqLab RapidC ZIn EOL
END
RETURN

StartSub:
OpenSub
'N9' Program# EOL
DoSubComment
RETURN

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

StdSub:
TagInc
'>' Tag# EOL
SeqLab SubCall ' N=9' Program# EOL
SeqLab ' G14 J' RepsLess1 ' N1=Å‚' Tag# ' N2=Å‚' Tag# EOL
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqLab Preset ' X' RepeatX# ' Z' RepeatY# ' Y' RepeatZ# EOL
CloseSub
SeqLab ' G93 X0 Y0 Z0' EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqLab SetWFO EOL
SeqLab SubCall ' N=9' Program# EOL
IncWFO
NextWFO
ELSE
TagInc
'>' Tag# EOL
SeqLab SubCall ' N=9' Program# EOL
SeqLab ' G14' ' J' PartsLess1 ' N1=Å‚' Tag# ' N2=Å‚' Tag# EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
CloseSub
SeqLab WFO1 EOL
ELSE
SeqLab Preset ' X' PartShiftX# ' Z' PartShiftY# ' Y' PartShiftZ# EOL
CloseSub
SeqLab ' G93 X0 Y0 Z0' 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?
SeqLab AbsValue EOL
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

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLab MoveSXYC EOL
SeqLab SubCall ' N=9' Program# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLab DoDrillAbsOrInc EOL
SeqLab ' G79' MoveSXYC
IF FirstFeat?
' Y' CalcZSurf#
END
EOL
END
ELSE
IF RapidFeat?
IF LastFeat?
SeqLab DoAbsOrInc EOL
SeqLab CRCOffC EOL
SeqLab RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLab DoAbsOrInc EOL
SeqLab RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLab DoAbsOrInc EOL
SeqLab CRCOnC EOL
SeqLab RapidC MoveXYZC EOL
END
END
END
ELSE
IF LineFeat?
IF LastFeat?
SeqLab DoAbsOrInc EOL
SeqLab CRCOffC EOL
SeqLab FeedC MoveXYZC GetFeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLab DoAbsOrInc EOL
SeqLab FeedC MoveXYZC GetFeedRateC EOL
ELSE
SeqLab DoAbsOrInc EOL
SeqLab CRCOnC EOL
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab FeedC MoveXYZC GetFeedRateC EOL
DecelMove2
END
SeqLab FeedC MoveXYZC GetDecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLab FeedC MoveXYZC GetFeedRateC EOL
END
END
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
SeqLab DoAbsOrInc EOL
SeqLab FormatArc GetArcFeedC EOL
DecelMove2
END
SeqLab DoAbsOrInc EOL
SeqLab FormatArc GetDecelFeed EOL
ELSE
SeqLab DoAbsOrInc EOL
SeqLab FormatArc GetArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
RETURN

WFOStuff:
IF NewWFO?
IF MultipleParts?
EOL
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
SeqLab
ELSE
' G' NewWFO#
END
ELSE
IF FirstOperation? AND NeedWFO1?
' G' NewWFO#
END
END
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
SeqLab AbsOrInc EOL
IF Repeats? AND FeedConnect? AND ZshiftOnly?
{.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
SeqLab FeedC ZCP2 GetFeedEntC EOL
ELSE
SeqLab RapidC ZCP2 EOL
END
END
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
SeqLab 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?
SeqLab Feed IncValue StrtPosC EOL
SeqLab AbsOrInc
ELSE
SeqLab Feed
END
ELSE
SeqLab Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLab Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLab AbsOrInc ZCP2PlusInc EOL
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLab Rapid ZCP2PlusInc EOL
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLab SubCall ' N=9' Program# 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}
SeqLab Feed ZCP2 GetFeedEnt EOL {.69}
ELSE
SeqLab Rapid ZCP2 EOL {.69}
END
END {.69}
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLab Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqLab FeedC ZInPlusInc GetFeedEnt EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLab RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqLab Feed ZInPlusInc GetFeedEnt EOL
ELSE
SeqLab RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqLab SubCall ' N=9' Program# 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:
SeqLab PlaneC EOL
DoOpComments
DoPostScript
SeqLab WFOStuff Index EOL
CheckPass
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('20000') { FeedRate Scale }
Save# Num#('1') Num#('3135') { MaxRPM }
SetMaxFeed('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR 'PM' EOL
'N9' Program# EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
SeqLab '( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
SeqLab '( ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
SeqLab '( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
SeqLab '( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
SeqLab '( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
SeqLab '( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
SeqLab '( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
SeqLab AbsOrInc EOL
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Plane EOL
SeqLab OpToolID ToolChng EOL
DoOpComments
DoPostScript
SeqLab WFOStuff Index EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLab Rapid StrtPos ZCP1 GetSpeed SpinOn EOL
SeqLab CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLab StrtPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLab CoolOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLab Rapid Home EOL
END

{Start new Operation}

SeqLab PlaneC EOL
SeqLab OpToolID ToolChng EOL
IF LAST ProgStop?
SeqLab ' M0' EOL
ELSE
SeqLab ProgStop EOL
END
DoOpComments
DoPostScript
SeqLab WFOStuff Index EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLab Rapid StrtPos ZCP1 GetSpeed SpinOn EOL
SeqLab CoolOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLab StrtPos EOL
END
ELSE
IF SameTool?

{Finish off last Operation}

IF LAST ProgStop? OR CoolOff? AND LAST NOT CoolOff?
SeqLab CoolOff EOL
END
DoEndOpPS
IF LAST ProgStop?
SeqLab ' M0' EOL
END

{Start new Operation}

SeqLab PlaneC EOL
DoOpComments
DoPostScript
SeqLab WFOStuff Index EOL
CheckPass
SeqLab Rapid StrtPos
IF LAST ProgStop?
ZCP1
END
GetSpeedC
IF LAST ProgStop?
SpinOn
END
EOL
IF LAST ProgStop? OR NOT CoolOff? AND LAST CoolOff?
SeqLab CoolOn EOL
END
END
END
END {common point for all operations}
GetRapidF RapidF# { To force FeedRate }
IF Milling?
SeqLab 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?
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
SeqLab CRCOffC EOL
IF AutoCycle?
SeqLab ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqLab FeedC ZCP3C FeedEntC EOL
ELSE
SeqLab RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLab Rapid StrtPos EOL
END
SeqLab DrillCP EOL
GetCycle
SeqLab 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
IF CallMasterOp?
SeqLab SubCall ' N=9' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
NewMasterProg
SeqLab SubCall ' N=9' Program# EOL
StartSub
ToolPath
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLab RapidC ZCP3C EOL
IF Repeats?
FinishSubG92
END
SeqLab RapidC ZCP3C EOL
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLab CoolOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLab Rapid FirstHome EOL
END
IF ProgStop?
SeqLab ' M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLab ' T0 M67' EOL
SeqLab WFOOff ' X27.1662 Y17.3237 Z19.2922 ' EOL
SeqLab EOP EOL
ASCII('04') EOL
CloseSub
Post2 {organize Subs into one program}
Close
Retag
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:
Maho HCNC 432 [MS] M491 89
Maho VCNC 432 [DF] MZ50 89
Maho VCNC 432 [PC] MU02 89 1
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
Fanuc 10M MS M031 89
Yasnac MX1 3 MS M315 89 1m
Yasnac MX1 3 MS M315 89
Maho HCNC 432 [REI] C763 12 3
Cin Acr 900 [MS] MZ14 89
Yasnac MX1 MS M033 89

więcej podobnych podstron