Fanuc 15M LeBlond HT M704 81 5


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

{6/17/92,
Copied & modified: Fanuc 6M M001.81
For: Loveridge Machine
Machine: MC-86 Leblond Makino 5-Axis Horizontal Mill
Control: Fanuc 15M
Changes made per conversations with Ron Erickson at Loveridge Machine and manual.
Updated to Version 4.1 per Fanuc 6M A001.80.03 Format.
Changed Maximum Spindle RPM from 10000 to 5000 in Forms Numbers Dialog.
Added Address B to Polar Angle Label in Forms Strings 1 Dialog.
Changed First Work Fixture Offset from 54 to 1 in Forms Commands 5 Dialog.
Changed Last Work Fixture Offset from 59 to 48 in Forms Commands 5 Dialog.
Modified Canned Tapping Cycle to Canned Rigid Tapping Cycle.
Rigid Tapping Cycle, G84.2, synchronizes the Spindle RPMs with the FeedRate, which must equal the
pitch of the Thread.
Added G95 IPR IF Drilling AND Tap = TRUE at FirstOperation, NewTool and GetStartOfSameTool sub.
Added G94 IPM to cancel G95 at NewTool, GetStartOfSameTool sub and end of Prog.
Added FORMAT for FeedTapIPR#.
Added .2 to Canned Tapping Cycle.
Added F FeedTapIPR#('1') to Canned Tapping Cycle Line.
Deleted AngleScale sub and calls to same and RestoreScale sub.
The AngleScale sub is required for Yasnacs only.
Changed Address for FourthDegree# from A to B in PSStuff sub.
Changed SetWFO to G54.1P NewWFO# in OpenMP sub.
Changed literal G to G54.1P in WFOStuff sub.
Added Non-Conditional ArcFeat Addresses for incremental situations in FormatArc sub.
This would occur IF NOT AbsoluteMoves OR AutoCycle = TRUE.
Changed argument for SetMaxRPM from 10000 to 5000 at setup and initializations.
Added SetMinRPM('10') at setup and initializations.
Added RapidF [ F400. ] to StrtPos MoveC at StartPos Sub.
Added M11 UnClamp/M10 Clamp subs to allow for Flat WorkGroup Position of B Axis.
Machine needs to UnClamp in order to Index Rotary Table.
Added PostScript support for OptionalCycle1 at FirstOperation, NewTool and GetStartOfSameTool sub.
IF OptCyc1 = TRUE, Post Processor will output M19 Spindle Orientation.
DWB}

{6/30/92,
Modified: Fan 15M LeBlond Horiz A004.0
For: Loveridge Machine
Changes made per conversations with Ron Erickson at Loveridge Machine.
Changed RapidF value from F400. to F600. in Compost's Numbers Dialog.
Deleted FourthDegree# at PSStuff sub.
Don't need it because we now use MoveC.
Cutsomer requested non-conditional MoveC for FirstOperation and NewTool, and conditional MoveCC
for SameTool, and that it be output with WFOStuff sub.
Added CheckAngleMove sub to SetFlag(1).
Moved UnClamp, StartAng and Clamp subs to top of Prog.
Changed IF NOT RotaryMill to IF Flag(1) at Clamp and UnClamp subs.
Added calls to CheckAngleMove, UnClamp, StartAng and Clamp subs at WFOStuff sub. Deleted calls
to same everywhere else, with the exception of Clamping at the completion of all RotaryMill
Operations.
NOTE: There is a problem with outputting UnClamp, StartAng and Clamp for SameTool FlatMilling.
Added RotAng sub for RotaryMill Repeat Operations.
Changed MoveC to MoveCC at StartPos sub.
Deleted RapidF at StartPos sub.
Added DoEdgeMove sub, and moved related logic from RotaryMove sub.
Was causing G00/G01 on block by itself.
Added RotaryPath sub to handle RotaryMill ToolPath.
This sub is called at beginning of ToolPath, and all calls to RotaryMove were moved here.
Changed SetMaxFeed value from 500 to 600 at setup and initializations.
Added PreTool at FirstOperation and NewTool.
Replaced FIRST ToolChangeAtHome logic at end of Prog with the following output:
G91G28X0Y0M5
G90
M11
B0G54.1P1F600.
M10
DWB}

{8/21/92,
Modified: Fan 15M LeBlond Horiz A004.01
For: Loveridge Machine
Changes made per conversation with Ron Erickson at Loveridge Machine.
Changed CWArcC/CCWArcC to CWArc/CCWArc for Unconditional G02/G03s.
Added literal 'G90G10L20P1X0Y0Z0B0' at FirstOperation to Reset the WorkFixtureOffsets.
Changed all occurances of OpToolID to 'T' ToolComment$.
Changed all occurances of PreTool to 'T' PreToolComment$.
Both changes were copied from the customer's K & T 180 Gemini D M507.81 Post Processor.
Moved CoolOn to before StrtPos to allow coolant pump time to start up.
Moved literal 'G95' IPR code to before output of G84.2 Rigid Tapping Cycle.
DWB}

{3/4/93
Modified: Fan 15M LeBlond Horiz A004.02
For: Loveridge Machine
Changes made per conversation with Mark Jenson at Loveridge Machine.
Updated to Version 4.1 per Fanuc 6M A001.81.2 Format.
Added WFOOutPut sub to output WFOStuff.
Added a blank line in front of all subroutines at StartSub.
Added ResetWFOS manual loop sub.
Outputs 48 WFO clear blocks.
Changed all occurances of MoveC RapidF to Rapid MoveC.
Deleted Clamp Sub and all calls to same.
Deleted UnClamp, Index, Clamp sequence at end of Prog.
Deleted FIRST ToolChangeAtHome stuff at end of Prog.
NOTE: Need to be able to determine if MoveCC will output anything so that we may call UnClamp.
DWB}

{3/8/93
Modified: Fan 15M LeBlond Horiz A004.03
For: Loveridge Machine
Changes made per conversation with Mark Jenson at Loveridge Machine.
Added literal 'M870' command following all CoolOn commands.
This is to aim programmable collant nozzles, and is dependant upon status of Coolant checkbox.
DWB}

{7/8/94
Modified: Fan 15M LeBlond Horiz A004.04
For: Loveridge Machine
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per conversations with Mark Jenson at Loveridge Machine, sample Cam file, sample
editted printouts and text files.
Customer requested modifications to support current control, and new, true 4th axis MC-86 control
they have recently purchased.
Updated to Version 4.2 per Fanuc 6M A001.81.2d Format.
Added SetScale('1') at RestoreScale sub.
Added CRCOffC per version 4.2.
CutterRadiusCompensation ExitLength will output G40 on LastFeat AND LineFeat at StdLine sub.
Modified Rotary PointFeat to support AutoCycles and Drilling better at ToolPath.
Changed order of RapidFeat and LineFeat handling.
Checks for RotaryMill before other types.
Added SetOpArcSegAcc at FirstOperation per Yasnac MX3 4A Mat A001.81.4.

Added support of ThruSpindleCoolant PostScript command.
When processor encounters ThruSpindleCoolant, or TSCool, processor will out literal 'M26'.
All other CoolOn Operations are per 3/8/93 developer comments.
Added GetCoolOn sub at Added Prog Subroutines.
Added ResetCool at PSInit sub.
Moved ProgramComment$ to SubID block at StartSub sub.
Moved ProgramName$ from ProgID1 to block by itself prior to ProgID1 at FirstOperation.
Moved ProgramComment$ to ProgID1 block at FirstOperation.
Added literal '(PROGRAM REVISION #0)' prior to OpenSub at FirstOperation.
Added literal '#3002=0' prior to OpenSub at FirstOperation.
Changed ToolChng command to literal 'M661' at FirstOperation and NewTool.
Moved call to CheckPass back where it belongs at FirstOperation.
Deleted StartPos output at WFOOutPut sub.
Moved Speed SpinOn to StartPos block for non-Tapping Operations at FirstOperation and NewTool.
Added Speed SpinOn to Drilling Cycle block for Tapping Operations.
Deleted SpinOff at NewTool, SameTool and end of Prog.
Added literal 'G43', Tool Length Enable, to StartPos block at FirstOperation, NewTool and SameTool.
Added ZCP1 ToolOfst to StartPos block at FirstOperation, NewTool and SameTool.
Deleted OfstOn block at FirstOperation, NewTool and SameTool.
Deleted CoolOff at NewTool, SameTool ProgStop, and end of Prog.
Changed OfstOff to literal 'G28Y0Z0M319' at NewTool and SameTool.
M319 = Simoultaneous Keylock Spindle with axis move
Changed OfstOff to literal 'G28X0Y0Z0M319' at end of Prog.
Added literal '#549=#3002+.01' prior to EOP at end of Prog.
Deleted AbsOrInc at StartPos block at SameTool, 3rd option.
Added ZCP1C for Milling Operations at StartPos block at SameTool, 3rd option.
Added Rapid PRIME ZCP1 for EntryExit SepSubs at ZonlyRep and ZonlyRepAutoCycle sub.
Added Rapid PRIME ZCP1 and ZCP2C for EntryExit SepSubs for ToolPath AutoCycles PointFeat.

Corrected noted problem of 6/30/92 with outputting UnClamp, StartAng and Clamp for SameTool
FlatMilling and customers request to support special work fixture offsets similar to proposed
coordinate system management in Virtual Advanced Milling.
Modifications required replacing CheckAngleMove, UnClamp, WFOOutPut, RWFO and ResetWFOS subs with
DoClear, ClearParams, Report, ckParam, ParamScan, ckWFO, WFOInits, ckMoveC, DoParam, GetParam and
GetIndexDirection subs.
Prior to normal EachOp/NextOp loop, processor calls ParamScan sub which calls ClearParams to
initialize all 50 variables. RETURNing to ParamScan then scans all operations for every Flat
MoveC# value and stores each in a separate, self building variable list created in
ckParam sub. The list is compiled by checking the current MoveC# value to the contents already
stored. ckParam also sorts the list in numerical order. Var(1) always contains the highest
variable number used, Var(2) is used to assist the sorting process, and no two variables from
Var(3) to Var(50) contain the same value. Flag(1), Flag(2) and Tag# are used to aid in management.
Example: Cam file titled 'Test (A004)' outputs 270Ą, 180Ą, -90Ą, 0Ą, 270Ą, 280Ą, 90Ą, 45Ą and 0Ą.
Var(1) always starts out with 3. At FirstOperation, where MoveC# = 270, Var(3) stores 270, and
Var(1) is incremented to 4. Next MoveC# = 180, Var(4) = Var(3), Var(3) = 180 and Var(1) = 5. I
created the Report sub to output a complete trail of the manipulations. At the completion and
successful testing, this sub, and all calls to same were removed and stored in my personal
Loveridge file. It is available to anyone who asks for it.
When all Operations have been scanned, FirstOperation calls WFOInits sub which calls ckWFO sub
which outputs only the parameter blocks needed, instead of the 48 blocks we were forcing.
NOTE: Have requested definable loop command to assist in reducing the time involved to call a
sub 48 times.
WFOInits and ckWFO subs replaces ResetWFOS and RWFO subs.
Problem was corrected because MoveC? boolean had been created after problem first occured.
Test is handled at ckMoveC sub, which replaced CheckAngleMove sub.
During normal process, UnClamp and WFOOutPut subs are now handled as part of WFOStuff which also
calls GetParam sub to search table for stored MoveC# value, and outputs P parameter in the
DoParam sub. For the above MoveC# values, the P parameters would be P1, P2 and P3, respectfully.
WFOStuff also calls GetIndexDirection sub, which tests to see if incremental MoveC# value is
less than 180Ą, in which case, literal M15 is output which instructs control to Index in Minus
Direction. In our example, Var(5) stores the last MoveC# value. Var(5) is used because we have
used Var(2), (3) and (4) to store the used MoveC# values. This is accomplished by incrementing
Var(1), which equals 4, by 1, to make Var(1) equal 5, processing GetIndex, and then decrementing
Var(1) by 1 to return original value of 4, to maintain proper handling of P parameters.
Deleted Calls to UnClamp sub at FirstOperation, NewTool and GetStartOfSameTool sub.

Customer has requested support of following issues which they agreed to deal with after current
modifications have been proved to support both controls
Need to add MasterOp/CallMasterOp routine because control has limit to number of subprograms, not
size of subrograms.
Need method to reseq, customer is studying Qued Macros.
}

{7/18/94
Modified: Fan 15M LeBlond Horiz A004.81.2
For: Loveridge Machine
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per conversations with Mark Jenson at Loveridge Machine.
Changed 'T' ToolComment$ to OpToolID at FirstOperation and NewTool.
Changed 'T' PreToolComment$ to PreTool at FirstOperation and NewTool.
DWB}

{7/25/94
Modified: Fan 15M LeBlond Horiz A004.81.3
For: Loveridge Machine
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per conversations with Mark Jenson at Loveridge Machine.
Added condition to suppress ToolComment$ during SameTool Operation.
Deleted retraction to Rapid PRIME ZCP1 during Repeats per 7/8/94 modifications.
DWB}

{8/25/94
Modified: Fan 15M LeBlond Horiz A004.81.4
For: Loveridge Machine
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per conversations with Mark Jenson at Loveridge Machine.
Added support of CRC during multiple pocket dog-bone operation.
Added condition to output CRCOnC for XMove OR YMove only at CkCRC sub.
Outputs G41/G42 on First LineFeat after Z Plunge.
Modified condition to output CRCOffC for LastFeat AND AutoCycle at ToolPath RapidFeat.
Assures that G40 is not output prior to LastFeat.
Added CRCOffC to RapidFeat at ToolPath.
Outputs G40 at all Z Retract blocks.
Added Incvalue 'G28Y0Z0M319' prior to safe start block at FirstOperation.
Added literal 'M662' following 'M661' block at FirstOperation and NewTool.
Changed literal 'M870' to 'M872' at GetCoolant sub.
M870 aimed the programmable collant nozzle for short length tooling.
M872 aims the programmable coolant nozzle for intermediate length tooling.
Added Speed Command to OfstOn block for all Operations at FirstOperation, NewTool and SameTool.
Deleted Speed for non-Rigid Tap cycles only.
Changed SpinOn to literal 'M303' for non-Rigid Tap cycles at FirstOperation, NewTool and SameTool.
Controls GearChanges, SpindleOrientation in addition to SpinOn.
Added literal 'M302' block following M303 for non-Rigid Tap cycles at FirstOperation, NewTool and SameTool.
Checks M303 with simultaneous axis motion.
DWB}

{10/20/94
Copied: Fan 15M LeBlond Horiz A004.81.5
Created: Fan 15M LeBlond Horiz M704.81.5
For: Loveridge Machine
Versions: ncCad 4.33/ncCAM 4.33/ncPost 4.33.03/Compost 4.21.22
Changes made per Mark Jenson at Loveridge Machine
Converted from 4Axis to 3Axis.
Deleted StartPosX# from Prog Numeric Format Definitions.
Deleted StartPosY# from Prog Numeric Format Definitions.
Added Recall# to FORMAT#2 at Prog Numeric Format Definitions.
Replaced MoveC# with PostScript FourthDegree# for special Parameter code.
FourthCW is stored to variables as MUL# FourthDegree# Num#('1').
FourthCCW is stored to variables as MUL# FourthDegree# Num#('-1').
Replaced RotaryMill boolean with Flag(1) tests.
Deleted all occurances of SetFlatCAng.
Deleted StartPos sub, changed all calls to same to StrtPos command.
Deleted RotaryMove sub and all calls to same.
Deleted SetOpArcSegAcc from EachOP/NextOp loop.
I created a new Report sub for this processor to output a complete trail of the manipulations. At
the completion and successful testing, this sub, and all calls to same were removed and stored in
my personal Loveridge file. It is available to anyone who asks for it.
DWB}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Recall#,2)
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(Dwell#,6) {.72}
FORMAT(FeedTapIPR#,7)

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

DoClear:
TagInc
Save# Tag# Num#('0')
RETURN

ClearParams: { Called at WFOStuff }
TagInit
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear
DoClear DoClear DoClear DoClear DoClear { 50 calls total }
RETURN

ckParam:
IF Flag?('2') { Exchange Flat MoveC }
IF Equal? Tag# Recall# Num#('1') { Last Pass }
SetFlagF('2')
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
ELSE { Exchange }
Save# Recall# Num#('1') Recall# Tag#
Save# Tag# Recall# Num#('2')
Save# Num#('2') Recall# Recall# Num#('1')
TagInc
END
ELSE
IF Flag?('1')
IF Equal? Tag# Recall# Num#('1') { Last Pass }
SetFlagF('1')
IF FourthCW?
Save# Tag# MUL# FourthDegree# Num#('1')
END
IF FourthCCW?
Save# Tag# MUL# FourthDegree# Num#('-1')
END
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
ELSE
IF FourthCW?
IF Equal? MUL# FourthDegree# Num#('1') Recall# Tag# { Duplicate Flat MoveC }
SetFlagF('1')
ELSE
IF LessThan? MUL# FourthDegree# Num#('1') Recall# Tag# { Exchange }
SetFlagF('1')
SetFlag('2')
Save# Num#('2') MUL# FourthDegree# Num#('1')
Save# Recall# Num#('1') Recall# Tag#
Save# Tag# MUL# FourthDegree# Num#('1')
Save# Num#('2') Recall# Recall# Num#('1')
TagInc
ELSE
TagInc
END
END
ELSE
IF FourthCCW?
IF Equal? MUL# FourthDegree# Num#('-1') Recall# Tag# { Duplicate Flat MoveC }
SetFlagF('1')
ELSE
IF LessThan? MUL# FourthDegree# Num#('-1') Recall# Tag# { Exchange }
SetFlagF('1')
SetFlag('2')
Save# Num#('2') MUL# FourthDegree# Num#('-1')
Save# Recall# Num#('1') Recall# Tag#
Save# Tag# MUL# FourthDegree# Num#('-1')
Save# Num#('2') Recall# Recall# Num#('1')
TagInc
ELSE
TagInc
END
END
ELSE
TagInc
END
END
END
END
END
RETURN

ParamScan: { Called prior to EachOp/NextOp }
ClearParams
Save# Num#('1') Num#('3')
EachOp
SetFlagF('1')

{ PSInit }
NewWFOF
RotateF
OptCyc1F
ResetCool
FourthCWF {reset flag}
FourthCCWF {reset flag}

{ DoPostScript loop }
EachPS
SeqC PostScript EOL { literals }
{ PSStuff } { commands }
NextPS

IF Rotate?
IF FourthCW?
FORMAT(FourthDegree#,2)
SetFlag('1')
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SetFlag('1')
END
IF FifthCW?
FifthCWF {reset flag}
END
IF FifthCCW?
FifthCCWF {reset flag}
END
IF Flag?('1')
Save# Num#('2') Num#('0')
TagInit TagInc TagInc TagInc { Set Tag# to 3 }
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam ckParam ckParam
ckParam ckParam ckParam { 48 calls total }
END
ELSE { NOT Rotate }
IF FirstOperation?
{ Set Initial Index to 0Ą }
TagInit TagInc TagInc TagInc { Set Tag# to 3 }
Save# Num#('2') Num#('0')
Save# Num#('3') Num#('0')
Save# Num#('1') Num#('4')
END
END
NextOp
SetFlagF('1')
Save# Num#('1') SUB# Recall# Num#('1') Num#('1')
NewWFOF
RotateF
OptCyc1F
ResetCool
FourthCWF {reset flag}
FourthCCWF {reset flag}
RETURN

ckWFO:
TagInc
IF LTEqual? Tag# Recall# Num#('1')
SeqC 'G90G10L20P' SUB# Tag# Num#('2') 'X0Y0Z0B0' EOL
END
RETURN

WFOInits: { Called at FirstOperation }
IF GTEqual? Recall# Num#('1') Num#('3')
TagInit TagInc TagInc
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO ckWFO ckWFO
ckWFO ckWFO ckWFO { 48 calls total }
END
RETURN

ckMoveC: { Called at WFOStuff }
SetFlagF('1')
IF FourthCW?
SetFlag('1')
Save# Num#('2') MUL# FourthDegree# Num#('1')
ELSE
IF FourthCCW?
SetFlag('1')
Save# Num#('2') MUL# FourthDegree# Num#('-1')
ELSE
IF FirstOperation?
SetFlag('1')
Save# Num#('2') Num#('0')
ELSE
IF NewTool?
SetFlag('1')
END
END
END
END
RETURN

DoParam:
TagInc
IF LTEqual? Tag# Recall# Num#('1')
IF Equal? Recall# Tag# Recall# Num#('2')
'P' SUB# Tag# Num#('2')
END
END
RETURN

GetParam: { Called at WFOStuff }
TagInit TagInc TagInc
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam DoParam DoParam
DoParam DoParam DoParam { 48 calls total }
RETURN

GetIndexDirection: { Called at WFOStuff }
Save# Num#('1') ADD# Recall# Num#('1') Num#('1')
Save# Recall# Num#('1') SUB# Recall# Num#('2') Recall# Recall# Num#('1')
IF LessThan? Recall# Recall# Num#('1') Num#('0')
IF GreaterThan? Recall# Recall# Num#('1') Num#('-180')
'M15' { Indexer to position in Minus Direction }
END
END
Save# Recall# Num#('1') Recall# Num#('2')
Save# Num#('1') SUB# Recall# Num#('1') Num#('1')
RETURN

GetCoolOn:
IF NOT CoolOff?
IF ThruSpin?
SeqC 'M26' EOL { Thru Spindle Coolant }
ELSE
SeqC CoolOn EOL
SeqC 'M872' EOL { Aim programmable nozzles for Intermediate Tool Lengths }
END
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?
'( SUB NUMBER: ' Program# ' )' EOL
END
RETURN

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

PSInit: {reset flags}
NewWFOF
RotateF
OptCyc1F
ResetCool
FourthCWF {reset flag}
FourthCCWF {reset flag}
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC AbsValue Rapid 'A' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC AbsValue Rapid 'A' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

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

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
FourthCWF {reset flag}
FourthCCWF {reset flag}
RETURN

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

StartSub:
OpenSub
' ' EOL
SubID
IF UseComments? AND ProgramComment?
'( ' ProgramComment$ ' )'
END
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 SubCall CallLab RepLab RepCycs EOL
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqC Preset ShiftRC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftRC EOL
RETURN

OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqC AbsOrInc Rapid 'G54.1P' NewWFO# EOL
SeqC SubCall CallLab RepLab OnePart EOL
IncWFO
NextWFO
ELSE
SeqC SubCall CallLab RepLab Parts EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqC EndSub EOL
CloseSub
SeqC WFO1 EOL
ELSE
SeqC Preset ShiftPC EOL
SeqC EndSub EOL
CloseSub
SeqC Preset UnshftPC EOL
END
RETURN

FormatArc:
IF ArcCW?
CWArc
ELSE
CCWArc
END
IF AbsoluteMoves? AND NOT AutoCycle?
MoveXYZC ArcIJC
ELSE { Non-Conditional ArcFeat Addresses }
IF XYPlane?
MoveXY
IF ZMove?
MoveZ
END
ELSE
IF XZPlane?
MoveX
IF YMove?
MoveY
END
MoveZ
ELSE { YZPlane }
IF XMove?
MoveX
END
MoveY MoveZ
END
END
ArcIJ
END
RETURN

CkCRC: { 4.2 }
IF LastFeat? { Exit Length Feature }
CRCOffC
ELSE
IF XMove? OR YMove? { Approach Length Feature and Multiple Pockets }
CRCOnC
END
END
RETURN

StdLine: {enables CRC on first call, .82}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqC CkCRC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqC CkCRC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
END
RETURN

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

WFOStuff:
ckMoveC
IF NewWFO?
IF MultipleParts?
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
ELSE
IF FirstOperation? OR NewTool?
SeqC 'M11' EOL { UnClamp }
END
SeqC AbsOrInc Rapid 'G54.1P' NewWFO# 'B' Recall# Num#('2') GetIndexDirection EOL
END
ELSE
IF NeedWFO1?
IF Flag?('1')
IF FirstOperation? OR NewTool?
SeqC 'M11' EOL { UnClamp }
END
SeqC AbsOrInc Rapid 'G54.1' GetParam 'B' Recall# Num#('2') GetIndexDirection EOL
END
END
END
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
Seq 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
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

G92Sub:
SubWarning
StdSub
SeqC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
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
{.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}
SeqC EndSub EOL
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 SubCall CallLab EOL
NextCycle
StartSub
SkipZ
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
SeqC EndSub EOL
CloseSub
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
WFOStuff
CheckPass
IF LAST Drilling? AND LAST Tap? { G84.2 Rigid Tap Cycle }
IF Drilling? AND Tap?
ELSE
SeqC 'G94' EOL { IPM }
END
END
IF OptCyc1?
IF LAST ProgStop?
SeqC 'M19' EOL { Spindle Orientation }
ELSE
SeqC SpinOff EOL
SeqC 'M19' EOL { Spindle Orientation }
SeqC Speed SpinOn EOL
END
END
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
InitWFONum
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('5000')
SetMinRPM('10')
SetMaxFeed('600')
SetFlagF('1') { New MoveC }
Save# Num#('1') Num#('0') { WFO P Parameters }
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(5), NWFO(5) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' This argument will cause the Post Processor to output G54.1P5.' 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
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + A move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' OptionalCycle1, OPTCYC1 -' EOL
' Non-model Spindle Orientation will cause M19 to be output on M06 line.' EOL
' For Same Tool Operations, will cause:' EOL
' 1. M05 Spindle Off' EOL
' 2. M19 Spindle Orientation' EOL
' 3. S-Code Spindle On' EOL
' ThruSpindleCoolant, TSCool -' EOL
' Will cause any CoolOn Operations containing this command to output literal M26.' EOL
' Command is non-modal, which means it must appear in every operation that requires it.' EOL
END

ParamScan

EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
IF UseComments?
IF ProgramNameComment?
'( ' ProgramName$ ' )' EOL
END
END
ProgID1
IF UseComments? AND ProgramComment?
'( ' ProgramComment$ ' )'
END
EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF FormatNameComment?
'( FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
'( ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
'( OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
'( PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
'( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
'(PROGRAM REVISION #0)' EOL
'#3002=0' EOL
OpenSub
RestoreScale
WFOInits
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Seq IncValue 'G28Y0Z0M319' EOL { M319 = Spindle Keylock with Simultaneous Axis Motion }
SeqC Plane DrillOff CRCOff
IF Drilling? AND Tap? { G84.2 Rigid Tap Cycle }
ELSE
'G94' { IPM }
END
EOL
DoOpComments
DoPostScript
SeqC OpToolID EOL
IF OptCyc1?
'M19' { Spindle Orientation }
END
SeqC 'M661' EOL { ToolChng }
SeqC 'M662' EOL { Verify New Tool is loaded }
IF NOT LastTool?
SeqC PreTool EOL
END
WFOStuff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
GetCoolOn
SeqC AbsOrInc Rapid 'G43' StrtPos ZCP1 ToolOfst Speed { OfstOn }
IF Drilling? AND Tap? { G84.2 Rigid Tap Cycle }
ELSE
'M303' EOL { NewGear, SpinLock, SpinOn }
SeqC 'M302' { Verify Exact Position, NewGear, SpinLock, SpinOn, Simultaneous Axis Motion }
END
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
SeqC IncValue 'G28Y0Z0M319' EOL { OfstOff, M319 = Simoultaneous Keylock Spindle with axis move }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqC AbsOrInc Rapid Home EOL
END
IF LAST ProgStop?
SeqC 'M0' EOL
ELSE
SeqC ProgStop EOL
END

{Start new Operation}

Seq Plane DrillOff CRCOffC
IF LAST Drilling? AND LAST Tap? { G84.2 Rigid Tap Cycle }
IF Drilling? AND Tap?
ELSE
'G94' { IPM }
END
END
EOL
DoOpComments
DoPostScript
SeqC OpToolID EOL
IF OptCyc1?
'M19' { Spindle Orientation }
END
SeqC 'M661' EOL { ToolChng }
SeqC 'M662' EOL { Verify New Tool is loaded }
SeqC PreTool EOL
CheckPass
WFOStuff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
GetCoolOn
SeqC AbsOrInc Rapid 'G43' StrtPos ZCP1 ToolOfst Speed
IF Drilling? AND Tap? { G84.2 Rigid Tap Cycle }
ELSE
'M303' EOL { NewGear, SpinLock, SpinOn }
SeqC 'M302' { Verify Exact Position, NewGear, SpinLock, SpinOn, Simultaneous Axis Motion }
END
EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqC IncValue 'G28Y0Z0M319' EOL { OfstOff, M319 = Simoultaneous Keylock Spindle with axis move }
SeqC 'M0' EOL

{Start new Operation}

GetStartOfSameTool
IF NOT Flag?('1')
AbsOrInc Rapid
END
SeqC PlaneC RapidC 'G43' StrtPos ZCP1 ToolOfst SpeedC { OfstOn }
IF Drilling? AND Tap? { G84.2 Rigid Tap Cycle }
ELSE
'M303' EOL { NewGear, SpinLock, SpinOn }
SeqC 'M302' { Verify Exact Position, NewGear, SpinLock, SpinOn, Simultaneous Axis Motion }
END
EOL
GetCoolOn
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqC CoolOff EOL
END
IF NewToolOffset?
SeqC IncValue 'G28Y0Z0M319' EOL { OfstOff, M319 = Simoultaneous Keylock Spindle with axis move }

{Start new Operation}

GetStartOfSameTool
IF NOT Flag?('1')
AbsOrInc Rapid
END
SeqC PlaneC RapidC 'G43' StrtPos ZCP1 ToolOfst SpeedC EOL { OfstOn }
ELSE

{Start new Operation}

GetStartOfSameTool
IF Flag?('1')
SeqC PlaneC RapidC StrtPos ZCP1 SpeedC EOL
ELSE
SeqC PlaneC AbsOrInc Rapid StrtPos
IF Repeats? AND NOT FeedConnect?
IF ZshiftOnly? OR AutoCycle?
ZCP1
END
END
SpeedC EOL
END
END
IF NOT CoolOff? AND LAST CoolOff?
GetCoolOn
END
END
END
END
END {common point for all operations}
IF Milling?
SeqC 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?
FindAnyZMoves {for normal abs subroutine}
IF NoZMoves?
ZonlyRep
ELSE
G92Sub {pattern shift, not element}
END
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 EOL
ELSE
IF FIFO? {.81}
SeqC FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqC AbsOrInc Rapid StrtPos EOL
END
SeqC DrillCP EOL
GetCycle
IF Tap? { G84.2 Rigid Tap Cycle }
SeqC 'G95' EOL { IPR }
END
SeqC Cycle
IF Tap? { G84.2 Rigid Tap Cycle }
'.2'
END
FromCP StrtPos ZDepth RLevel Dwell Peck Retract
IF Tap? { G84.2 Rigid Tap Cycle }
'F' FeedTapIPR#('1') Speed SpinOn
ELSE
FeedEnt
END
EOL
TrackZNO# FIRST SPZ# {.81.2}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC DrillOff EOL
IF Repeats?
FinishSubG92
END
SeqC 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
SeqC IncValue 'G28X0Y0Z0M319' EOL { OfstOff, M319 = Simoultaneous Keylock Spindle with axis move }
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
SeqC AbsOrInc
IF Drilling? AND Tap? { G84.2 Rigid Tap Cycle }
'G94' { IPM }
END
EOL
IF ProgStop?
SeqC 'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
'#549=#3002+.01' EOL
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:
Fanuc 15M MTS [CP] NDU66 16 2m
Fanuc 15M Mitsui [EG] CW15 12
Fanuc 0M Wasino WM3 M525 81 2
Fanuc 15M Matsuura C695 12
Fanuc 15M [PIW] MW82 89 2
Fanuc 10M MV40 [KC] M668 81 2
Fanuc 15M Matsuura M695 87m
Fanuc 11M Mat [PM] M716 81 8
Fanuc 15M Mat [IH] B958 12
Fanuc 15M Matsuura C695 12m
Fanuc 15M [YTC] MY61 89 1m
Fanuc 11T Nak [ HT] L309 85
Fanuc 6M Mat MC1000V M474 81 1
Fanuc 15M Mat [IH] C958 12
Fanuc 15M Krk [OT] NCQ16 16 2
Fanuc Mate TC Gild L048 81 1
Fanuc 15M Krk [CGB] CT73 14 4
Fanuc 15M Matsuura C747 12

więcej podobnych podstron