Maho VCNC 432 [ZC] C949 14m


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

{
11/15/94 [ws]
Bxxx.81.2 (from M491.81.2)

Converted old style post to new style for use as a 5th Axis post.
}

{
12/11/94
Cxxx.00

Converted to C style post
Updated to .00 version per Fanuc 6M (PW) C001.00.02
}

{
Format: Maho HCNC 432 [NOAO] C722.00.01
1/10/95
Added ClearCSOffset to OpenMP: CloseMP: and SubCSMP:
Started using Flag('3') to determine toggle between incrementing through MPs and decrementing through MPs
Changed CloseMP to check Flag('3'). If true, the WFOs will increment from first to last. If false, the WFOs will
decrement from last to first.
Example:
TRUE for 4 parts: G54P1, G54P2, G54P3, G54P4
FALSE for 4 parts: G54P4, G54P3, G54P2, G54P1
This is most useful for tombstone machining on rotary tables. With this method, the code will machine part1, rotate, part2,
rotate, part3, rotate, part4, tool change, part4, part3, part2, part1, toolchange, etc. It minimizes the rotation and also
stops the machine from "winding up".
To do this a new sub was created called ToggleIncDecWFO. The flag is set to true in ProgStart and toggled inside CloseMP
after running through the parts
Replaced SetZRepInc and RestoreAbsOrInc with one sub called DoAbsOrInc. Any line with SetZRepInc now
has DoAbsOrInc as the first command after the SeqLabC.
Started using Flag ('4') to turn on Inc/Dec WFO's (See above). True means use Inc/Dec WFO's.
TH}

{
Format: Maho HCNC 432 [NOAO] C722.00.02
1/13/95
Formatted TrackZNO# to #4
TH}

{ Added ClearCSOffset to SubCSMP TH}

{
Format: Maho HCNC 432 [NOAO] C722.00.04
3/2/95
Replaced accidental SeqLabC with SeqLab
TH}

{
Format: Maho HCNC 432 [REI] C763.00.05
3/21/95
Added SeqLab in front of CSWFO Comments
Changed format of Peck Drill cycles to use I instead of Q
Formatted Peck# to #4
Added K to Peck drill cycles and used Peck# as value
Set first WFO to be G57
Changed format of all subs to use G14 Jump and Repeat style instead of sub programs

Ä„Ä„Ä„Ä„Ä„Ä„Ä„Ä„ This post has not been tested with WFO multiple parts and probably will not work

TH}

{
Format: Maho HCNC 432 [REI] C763.00.06
3/31/95
Changed first WFO back to G54
Set up so G93 is only output if ChangeCS?
A and B moves are now output conditionally in SameTool
TH}

{
Format: Maho HCNC 432 [REI] C763.00.07
4/7/95
Untied ChangeCS? from NewToolOffset? in SameToolOp1
Removed the ChangeCS? case. Retract before rotation must be handled by exit clearance plane
Added the needed OfstOn and AbsOrInc if NewToolOffset? in SameToolOp3
Changed percentage on peck cycles from 75% to 25%
Set up OpGuts to call ZOnlyRep correctly if Z shift only, NOT Auto Cycle
TH}

{
Format: Maho HCNC 432 [REI] C763.00.08
4/11/95
Fixted NotSameToolG93: to only output G54 if the CS Changes
Removed T0M67 and the G53 line from the end of the program.
Removed unwind code from end of program
Formatted the MUL# command to fix the output of the I in drilling section of OpGuts
TH}

{6/14/95
Initial: Maho HCNC 432 [REI] C763.00.08
Created: Maho VCNC 432 [REI] Cxxx.00.08
Comment: Per Tom Hubina created vertical head position processor
Exchanged Y/Z and J/K Addresses in MachSpec Strings 1.
Exchanged G17/G18 in MachSpec Commands 2.
Negated Default Formats for I & X from in MachSpec.
Added FORMAT#11 to Negate output of PartShiftX#, RepeatX# and CSOffsetX#
Exchanged Y/Z Addresses for RepeatY# & RepeatZ#.
Exchanged Y/Z Addresses for PartShiftY# & PartShiftZ#.
Exchanged Y/Z Addresses for CSOffsetY# & CSOffSetZ#.
Exchanged J/K Addresses for HelixPitch# at FormatArc.
Moved FORMAT(HelixPitch#,4) to FormatArc, negated for ' I' output
Changed Z Address to Y for CalcZSurf# at ToolPath Drilling PointFeat.
Jim Radcliffe}

{
Format: Maho VCNC 432 [REI] C809.00.09
7/1/95
Changed Format of all X's to be normal (un-inverted)
Changed format of all Y's (Z's after address switch) to be inverted
Added G92 line after every G93
TH}

{
Format: Maho VCNC 432 [REI] C809.00.10
7/17/95
Changed ' G92 X-.0017 Y25.1871 Z-16.1631' to ' G92 X-.0013 Y25.1886 Z-16.1636'
TH}

{8/23/95
Format: Maho VCNC 432 [REI] C809.10
For: Gibbs & Associates
Versions: ncCad 4.33.01/ncCAM 4.33.01/ncPost 4.33.06/Catalyst v2.22/Compost 4.21.32/1.0a
Changes made per Tom Hubina
Fixed problem with Tagging per Maho HCNC 432 [NOAO] C722.10.01.
DWB}

{
Maho VCNC 432 [REI] C809.10.01
9/5/95
For: Remmele
Changed format: 2 to #.###;0.
Set CP1LessCP2 to format 2
Moved ' Z' CalcZFmSurf# before ' B' CP1LessCP2#
Changed CSAnlgeA to add 90 degrees to all output
TH}

{
Maho VCNC 432 [REI] C809.10.02
10/9/95
For: Remmele
Changed CSAnlgeA to subtract 90 degrees from all output
TH}

{
Maho VCNC 432 [REI] C809.10.03
10/9/95
For: Remmele
Removed A axis subtraction. Now outputs A suplied by Virtual.
TH}

{
Maho VCNC 432 [REI] C809.10.04
10/16/95
For: Remmele
Un-inverted the Y-axis. (Was outputing -Y)
TH}

{
Maho VCNC 432 [REI] C809.10.05
11/9/95
For: Remmele
Inverted the Z axis
TH}

{
Format: Maho VCNC 432 [REI] C809.10.06
11/14/95
Implemented full G14 jump and repeats
TH}

{1/17/96, Updated .10 to .11 version, MPK}

{2/27/96
Initial: Maho VCNC 432 [REI] C809.11
Created: Maho VCNC 432 [Zygo] Cxxx.11m
ForUser: Zygo
Control: CNC 432
Machine: Maho
Develop: ComPost 4.21.34, Catalyst68K v3.02.02C
Comment: Modified per notes and marked up readout from Norman Paradis
Changed to Metric output.
Changed M6 to M66
Changed M3 to M13
Commented out CoolOn and CoolOff commands.
One G code per line.
Jim Radcliffe}

{ 3/25/96 Changed version number to .12 TH}

{4/26/96
Initial: Maho VCNC 432 [ZC] C949.12m
Created: Maho VCNC 432 [ZC] C949.12.1m
Develop: ComPost 4.21.34, Catalyst68K v3.02.13C
Comment: Modified per marked up readout from Norman Paradis
Corrected MovesComment to MILLIMETERS
Deleted special handling of speeds and feeds in favor of standard commands.
Deleted SetMaxRPM and SetMaxFeed
Corrected - negated default K format.
Corrected - negated ' K' HelixPitch#.
Corrected - un-negated ' I' HelixPitch#.
Corrected - changed all occurances
of:
' Y' CSOffsetY# ' Z' CSOffSetZ#
to:
' Z' CSOffsetY# ' Y' CSOffSetZ#
Corrected - negeted CSOffsetY#
Corrected - HelixPitch# is not outputting in metric so I forced it to!
Added sequnce numbers to fotter comments.
Changed J word for repeats to the actual number instead of less one.
Added Work Offset handling per Maho VCNC 432 [NOAO] C914.12
Jim Radcliffe}

{5/10/96
Initial: Maho VCNC 432 [ZC] C949.12.1m
Created: Maho VCNC 432 [ZC] C949.12.2m
Develop: ComPost 4.21.37, Catalyst68K v3.04.04C
Comment: Corrected tagging bug
Changed SaveCSProg to SaveCSTag
Changed Tag# in CloseMP G14 lines to CSSubID#.
Jim Radcliffe}

{12/17/96
Initial: Maho VCNC 432 [ZC] C949.12.2m
Created: Maho VCNC 432 [ZC] C949.12.3m
Develop: ComPost2 PPC v1.0b4, Virtual Gibbs 3.23
Comment: Modified per marked up readout from Zygo.
Changed program number to ProgramName$
Corrected I value in Pecking Cycle.
Jim Radcliffe}

{1/7/96
Initial: Maho VCNC 432 [ZC] C949.12.3m
Created: Maho VCNC 432 [ZC] C949.14m
Develop: ComPost 4.21.37PPC, Virtual Gibbs 3.23
Comment: Updated to .14 format per Fanuc 6M (PW) C001.14
Jim Radcliffe}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(CP1LessCP2#,2)
FORMAT(PartShiftX#,4)
FORMAT(PartShiftY#,11)
FORMAT(PartShiftZ#,4)
FORMAT(RepeatX#,4)
FORMAT(RepeatY#,11)
FORMAT(RepeatZ#,4)
FORMAT(CalcZSurf#,4)
FORMAT(CalcZFmSurf#,4)
FORMAT(CalcCP2FmSurf#,4)
FORMAT(Retract#,4)
FORMAT(Peck#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(CallMasterNum#,5)
FORMAT(Repeats#,5)
FORMAT(Dwell#,6) {.72}
FORMAT(RapidF#,7)
FORMAT(Recall#,8) { FeedRate Scale }

FORMAT(CSOffsetX#,4)
FORMAT(CSOffsetY#,11)
FORMAT(CSOffsetZ#,4)
FORMAT(ADD#,5)
FORMAT(SUB#,5)
FORMAT(MUL#,4)
FORMAT(CS#,5)
FORMAT(CSOffsetA#,10)
FORMAT(CSOffsetB#,10)
FORMAT(TrackZNO#,4)

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

RestoreScale:
IF NOT Metric? {CAM file is in English, tools and tool path}
SetScale('25.4') { change to Metric, this is an Metric post}
END
RETURN

CSPartNum#:
ADD# CS# MUL# NumOfCS# SUB# PartNum# Num#('1')
RETURN

CSWFO:
' G' ADD# CSPartNum# Num#('53')
RETURN

WFO:
' G' ADD# PartNum# Num#('53')
RETURN

WFOStuff:
IF Flag?('2')
IF NOT SameTool?
IF WFOCS?
CSWFO
ELSE
WFO
END
ELSE
IF WFOCS?
IF ChangeCS?
IF MultipleParts?
{MP ChangeCS is handled in SubCSMP and CloseMP}
ELSE
CSWFO
END
END
END
END
END
SetFlagF('2')
RETURN

CSG52:
{ This processor does not support G52s }
RETURN

G52Stuff:
{ This processor does not support G52s }
IF NOT MultipleParts?
IF WFOCS?
ClearCSOffset
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
SeqLab '( SUB NUMBER: ' Tag# ' )' EOL
END
RETURN

DoCSComment:
SeqLab '( CS#' CS# ' - ' CSComment$ ' )' EOL
RETURN

DoCSWFOComment:
SeqLab '( ' CSWFO ' = X' CSOffsetX# ' Z' CSOffsetY# ' Y' CSOffsetZ# ' )' EOL
RETURN

OffsetComments:
IF NOT MultipleParts?
IF WFOCS?
IF ChangeCS?
DoCSComment
DoCSWFOComment
END
ELSE
IF ChangeCS?
DoCSComment
ELSE
IF NOT SameTool?
DoCSComment
END
END
END
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
OffsetComments
RETURN

CSAngleA:
IF AAxisAvail?
' A' CSOffsetA#
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
' B' CSOffsetB#
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit:
NewWFOF
FourthCWF
FourthCCWF
FifthCWF
FifthCCWF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
RETURN

DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL
PSStuff
NextPS
RETURN

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

StartSub:
OpenSub
'>' Tag# 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:
SeqLab ' G14 J' Repeats# ' 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 FeedEntC EOL
ELSE
SeqLab RapidC ZCP3C EOL
END
END
END
RETURN

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

ToggleIncDecWFO:
IF Flag?('3')
SetFlagF('3')
ELSE
SetFlag('3')
END
RETURN

OpenMP:
TagUp TagInc
IF WorkFixtureOffsets?
StartSub
SaveCSTag
SaveCSOpStart
ClearCSOffset
ELSE
SeqLab ' G14' ' J' Parts# ' N1=Å‚' Tag# ' N2=²' Tag# EOL
IF ExitClearancePlane?
SetFlag('2') { WFOStuff }
END
StartSub
END
RETURN

DoCSWFOOps:
EachCSOp
DoCSComment
DoCSWFOComment
ClearCSOffset
SeqLab CSWFO EOL
SeqLab ' G14' ' J1' ' N1=Å‚' CSSubID# ' N2=²' CSSubID# EOL
NextCSOp
RETURN

DoCSG52Ops: { This Processors does not support G52s }
SeqLab ' G14' ' J1' ' N1=Å‚' CSSubID# ' N2=²' CSSubID# EOL
RETURN

CloseMP:
IF WorkFixtureOffsets?
'<' Tag# EOL
CloseSub
IF Flag?('3')
NewWFO
EachWFO {simple eachPart}
IF WFOCS?
DoCSWFOOps
ClearCSOffset
ELSE
SeqLab WFO EOL
DoCSG52Ops
END
IncWFO
NextWFO {simple NextPart}
DecWFO
ELSE
LastWFO
EachWFO {simple eachPart}
IF WFOCS?
DoCSWFOOps
ClearCSOffset
ELSE
SeqLab WFO EOL
DoCSG52Ops
END
DecWFO
NextPrevWFO {simple NextPart}
IncWFO
END
IF Flag?('4')
ToggleIncDecWFO
END
TagDown
ELSE
SeqLab Preset ' X' PartShiftX# ' Z' PartShiftY# ' Y' PartShiftZ# EOL
'<' Tag# EOL
TagDown
CloseSub
SeqLab ' G93 X0 Y0 Z0' EOL
END
RETURN

SubCSMP:
IF WFOCS?
IF ChangeCS?
'<' Tag# EOL
CloseSub
TagInc
StartSub
SaveCSTag
END
ClearCSOffset
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
FORMAT(MUL#,4)
' J' MUL# HelixPitch# NumSc#('1')
ELSE
IF XZPlane? AND YMove?
DoArc
FORMAT(MUL#,11)
' K' MUL# HelixPitch# NumSc#('1')
ELSE
IF YZPlane? AND XMove?
DoArc
FORMAT(MUL#,4)
' I' MUL# HelixPitch# NumSc#('1')
ELSE
DoArc
END
END
END
RETURN

ckCRC:
IF LastFeat?
CRCOffC
ELSE
IF NOT ZMove?
CRCOnC
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLab MoveSXYC EOL
SeqLab ' G14' ' J1' ' N1=Å‚' Tag# ' N2=²' Tag# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLab ' G79' DoDrillAbsOrInc MoveSXYC
IF FirstFeat?
' Y' CalcZSurf#
END
EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
SeqLab ckCRC EOL
SeqLab DoAbsOrInc EOL
SeqLab RapidC MoveXYZC EOL
END
ELSE
IF LineFeat?
IF XMove? OR YMove? OR ZMove?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLab ckCRC EOL
SeqLab DoAbsOrInc EOL
SeqLab FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqLab ckCRC EOL
SeqLab DoAbsOrInc EOL
SeqLab FeedC MoveXYZC DecelFeed EOL
ELSE
SeqLab ckCRC EOL
SeqLab DoAbsOrInc EOL
SeqLab FeedC MoveXYZC FeedRateC EOL
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 ArcFeedC EOL
DecelMove2
END
SeqLab DoAbsOrInc EOL
SeqLab FormatArc DecelFeed EOL
ELSE
SeqLab DoAbsOrInc EOL
SeqLab FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RestoreAbsOrInc
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 FeedEntC EOL
ELSE
SeqLab RapidC ZCP2 EOL
END
END
'<' Tag# EOL
CloseSub
SetSRSubXY {restore SR to 1st position value}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after TagInc for correct sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
TagUp TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
TagDown
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
TagUp TagInc
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLab IncValue EOL
SeqLab Feed StrtPosC EOL
SeqLab AbsOrInc
ELSE
SeqLab Feed
END
ELSE
SeqLab Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLab IncValue EOL
SeqLab Rapid 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 ' G14' ' J1' ' N1=Å‚' Tag# ' N2=²' Tag# EOL
NextCycle
SetStatusOn
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
IF FeedConnect? {there is no Z up in the sub}
IF FIFO?
SeqLab Feed ZCP2 FeedEnt EOL
ELSE
SeqLab Rapid ZCP2 EOL
END
END
TagDown
'<' Tag# EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLab Connect StrtPos EOL
END
IF FeedConnect?
SeqLab FeedC ZInPlusInc FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLab RapidC ZCP2PlusIncC EOL
END
SeqLab Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLab RapidC ZInPlusInc EOL
END
END
SeqLab ' G14 J1 N1=Å‚' Tag# ' N2=²' Tag# EOL
NextCycle
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
'<' Tag# EOL
TagDown
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

OpGuts:
RapidF# { To force FeedRate }
IF Milling?
SeqLab ZCP2C EOL
IF Repeats?
TagUp TagInc
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?
SeqLab ZCP3C EOL
ELSE
SeqLab CRCOffC EOL
IF FIFO?
SeqLab FeedC ZCP3C FeedEntC EOL
ELSE
SeqLab RapidC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
TagUp TagInc
StdSub
SeqLab Rapid StrtPos EOL
END
SeqLab DrillCP EOL
GetCycle
SeqLab Cycle
IF Dwell?
' X' Dwell#
END
' Y' CalcCP2FmSurf#
' Z' CalcZFmSurf#
IF RetractToCP1?
' B' CP1LessCP2#
END
IF Peck?
' I' MUL# Peck# NumSc#('.25') ' J'
IF PeckChipBreaker?
Retract#
ELSE { PeckFullRetract }
'0'
END
' K' Peck#
END
FeedEnt EOL
IF CallMasterOp?
SeqLab ' G14 J1 N1=Å‚' CallMasterNum# ' N2=²' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
SetFlag('1') {std sep sub Zreps in effect}
TagUp NewMasterTag
SeqLab ' G14 J1 N1=Å‚' Tag# ' N2=²' Tag# EOL
StartSub
ToolPath
'<' Tag# EOL
TagDown
CloseSub
SetFlagF('1') {not std sep sub Zreps in effect}
ELSE
ToolPath
END
END
SetDrillEndOpZ
SeqLab Rapid ZCP3 EOL
IF Repeats?
FinishSubG92
END
END
END
RETURN

ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('500')
SetFlagF('1') { Milling ZShiftOnly SepSubs }
SetFlagF('2') { WFOStuff }
SetFlag('3') { True = incrementing WFO numbers for MP. False = decrementing WFO numebrs for MP }
SetFlag('4') { True = toggle between incrementing/decrementing WFO's }
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
END

IF MultipleParts?
IF WorkFixtureOffsets?
IF LTEqual? MUL# Parts# NumOfCS# Num#('6')
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of parts [ ' Parts# ' ] times CSs [ ' NumOfCS# ' ] )' EOL
'( exceeds the machine limit. Switching to non-WFO output. )' EOL
END
END
END
ELSE
IF LTEqual? NumOfCS# Num#('6') {****}
SetWFOCS { use WFO for CS changes }
ELSE
IF UseComments?
'( Not enough Work Fixture Offsets to handle this part. )' EOL
'( Number of CSs [ ' NumOfCS# ' ] exceeds the machine limit. )' EOL
'( Switching to non-WFO output. )' EOL
END
END
END
RETURN

InitOp:
EOR 'PM' EOL
'N' ProgramName$ 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$ ' MILLIMETERS )' EOL
END
IF PartsComment?
SeqLab '( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
SeqLab '( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
RETURN

FirstOp1:
SeqLab Plane EOL
SeqLab OpToolID ToolChng EOL
DoOpComments
DoPostScript
RETURN

FirstOp2:
SeqLab WFOStuff EOL
G52Stuff
CheckPass
SeqLab Rapid StrtPos CSAngleA CSAngleB ZCP1 Speed SpinOn EOL
RETURN

FirstOp3:
{SeqLab CoolOn EOL}
RETURN

NewToolOp1:
{SeqLab CoolOff EOL}
RETURN

NewToolOp2:
DoEndOpPS
IF ToolChangeAtHome?
SeqLab Rapid Home EOL
END
RETURN

NewToolOp3: {Start new Operation}
SeqLab PlaneC EOL
SeqLab OpToolID ToolChng EOL
IF LAST ProgStop?
SeqLab ' M0' EOL
ELSE
SeqLab ProgStop EOL
END
DoOpComments
DoPostScript
RETURN

NewToolOp4:
SeqLab WFOStuff EOL
G52Stuff
CheckPass
SeqLab Rapid StrtPos CSAngleA CSAngleB ZCP1 Speed SpinOn EOL
RETURN

NewToolOp5:
{SeqLab CoolOn EOL}
RETURN

SameToolOp1:
DoEndOpPS
IF LAST ProgStop?
{SeqLab CoolOff EOL}
SeqLab ' M0' EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
{SeqLab CoolOff EOL}
END
IF NewToolOffset? OR ChangeCS?
{SeqLab IncValue OfstOff EOL}
END
END
RETURN

SameToolOp2: {Start new Operation}
SeqLab PlaneC EOL
DoOpComments
DoPostScript
CheckPass
RETURN

SameToolOp3: {Start new Operation}
SeqLab WFOStuff EOL
G52Stuff
IF NewToolOffset? OR ChangeCS?
{SeqLab AbsOrInc EOL}
END
IF LAST ProgStop?
SeqLab Rapid StrtPos CSAngleAC CSAngleBC ZCP1 SpeedC SpinOn EOL
{SeqLab CoolOn EOL}
ELSE
SeqLab Rapid StrtPos CSAngleAC CSAngleBC SpeedC EOL
IF NewToolOffset? OR ChangeCS?
{SeqLab OfstOn EOL}
END
IF NOT CoolOff? AND LAST CoolOff?
{SeqLab CoolOn EOL}
END
END
RETURN

End1:
{SeqLab CoolOff EOL}
RETURN

End2:
DoEndOpPS
IF FIRST ToolChangeAtHome? {added FIRST modifier}
SeqLab Rapid FirstHome EOL
END
IF ProgStop?
SeqLab ' M0' EOL
END
RETURN

End3:
SeqLab EOP EOL
CloseSub
Post2 {organize Subs into one program}
IF UseComments?
SetScale('1') {restore scale for comments}
IF FileBytesComment?
SeqLab '( FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
SeqLab '( FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
SeqLab '( FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
ASCII('04') EOL
Close
Retag
RETURN

MPallTools1P: {Multiple Parts, All Tools 1 Part}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
OpenMP
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2 {to tool change, CS problem}
SubCSMP
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
CloseMP
End3
RETURN

MP1ToollAllPfu: {Multiple Parts, 1 Tool all Parts, full up}
EachOp {Start of post processing}
IF EquallySpacedOffsets?
SetFlag('2')
END
IF FirstOperation?
InitOp
FirstOp1
OpenMP
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
CloseMP
NewToolOp2 {to tool change, CS problem}
NewToolOp3
OpenMP
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
CloseMP
End2
End3
RETURN

MP1ToollAllPXcp: {Multiple Parts, 1 Tool all Parts, exit Clearance plane}
EachOp {Start of post processing}
SetFlag('2')
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
OpenMP
FirstOp2 {need StrtPos in Sub}
ELSE
IF NewTool?
CloseMP
NewToolOp1
NewToolOp2 {to tool change, CS problem}
NewToolOp3
NewToolOp4
NewToolOp5
OpenMP
NewToolOp4 {need StrtPos in Sub}
ELSE {implied SameTool?}
SameToolOp1
SubCSMP
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
CloseMP {End of program}
End1
End2
End3
RETURN

NoMPs: {no multiple parts}
EachOp {Start of post processing}
SetFlag('2') { WFOStuff }
IF FirstOperation?
InitOp
FirstOp1
FirstOp2
FirstOp3
ELSE
IF NewTool?
NewToolOp1
NewToolOp2
NewToolOp3
NewToolOp4
NewToolOp5
ELSE {implied SameTool?}
SameToolOp1
SameToolOp2
SameToolOp3
END
END {common point for all operations}
OpGuts
NextOp {loops back to EachOP until last Operation}
End1 {End of program}
End2
End3
RETURN

{Start of executable Prog, Top Level ****}

ProgStart {setup and initializations}

IF MultipleParts?
IF AllToolsOnePart?
MPallTools1P
ELSE {implied OneToolAllParts?}
IF FullUp?
MP1ToollAllPfu
ELSE {implied ExitClearancePlane?}
MP1ToollAllPXcp
END
END
ELSE
NoMPs
END


Wyszukiwarka

Podobne podstrony:
Maho VCNC 432 [E&M] MQ50 89m
Maho VCNC 432 [IC] M505 81 3m
Maho VCNC 432 [MS] M489 89
Maho VCNC 432 [NOAO] C914 12
Maho VCNC 432 [DF] MZ50 89
Maho VCNC 432 [PC] MU02 89 1
Maho HCNC 432 [MS] M491 89
Maho HCNC 432 [REI] C763 12 3
Maho HCNC 432 [NOAO] C722 12
Maho CNC 432 M194 89
Deckel Maho Indramat MY97 15 5m
429 432

więcej podobnych podstron