Anilam Crusader 2[MD] M463 89


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

{10/25/91
Modified: Anilam Crusader (USS) M195.81
For: Molecular Designs
Control: Anilam Crusader 2
Changes made per conversations with Joe Florio at Molecular Designs, and sample programs.
DWB}

{4/14/93
Modified: Anilam Crusader 2 [MD] M463.81
For: Molecular Designs
Control: Anilam Crusader 2
Machine: Retrofitted Bridgeport
Minor changes to reflect .81.2 format
FeedRates need to be on a line by themselves,
most are like that already, corrected in ZonlyRepAutoCycle & ZonlyRep.
The 1st move in the sub does not have an interpolation command,
added SetStatusRapid to ZonlyRep and ZonlyRepAutoCycle to force output of G1, G2 or G3
Sequence numbers are not consecutive when output has subroutines,
changed Seq to SeqLab, N to N?, and added ReTag for consecutive sequence numbering with subs.
After returning from a subroutine, the machine feeds to the next start position
when using the same tool. Changed to use unconditional Rapid & StrtPos in SameTool.
The commands would have been suppressed with conditionals If we were allready there,
so at worst its redundant but it should work.
Jim Radcliffe}

{
Format: Anilam Crusader 2 [MD] M463.81.3
5/23/95
Fixed MasterOp to support Virtual Gibbs v2.20 specs
TH}

{8/2/95, Updated Anilam Crusader 2[MD] M463.81.3 to .85 format, MasterOp stuff already in!, JR}
{1/17/96 - Updated .85 to .86 format, MPK}

{3/22/96, Tested ZOnlyRepAutoCycle, Changed version # to .89, MPK}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Repeats#,5)
FORMAT(Recall#,5)
FORMAT(Dwell#,6)
FORMAT(Peck#,6)
FORMAT(TLNum#,7)
FORMAT(TLLength#,8)
FORMAT(FeedEntry#,9)

{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 ToolTypeComment?
'( TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
'( ' ToolComment$ ' )' EOL
END
RestoreScale
END
RETURN

PSInit: {reset flags}
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

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

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

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

EntryMove:
IF FeedEntry?
SeqLabC FeedEntC EOL
Feed
ELSE
RapidC
END
SeqLabC ZinC EOL
RETURN

StartSub:
OpenSub
SeqLabC 'G29S' Program# 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:
IF NotEqual? Repeats# Num#('1')
SeqLabC SubCall 'D' Repeats# EOL
END
SeqLabC SubCall 'C' Program# EOL
StartSub
RETURN

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

FinishSubG92: {part 2}
SeqLabC EndSub 'E' EOL
CloseSub
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?
SeqLabC AbsValue EOL
END
RETURN

FormatArc:
DoAbsOrInc
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXY MoveZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN

GetCRCOn:
IF XMove? OR YMove?
SeqLabC CRCOnC EOL
END
RETURN

StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FeedRateC EOL
GetCRCOn
SeqLabC DoAbsOrInc FeedC MoveXYZC EOL
DecelMove2
END
SeqLabC DecelFeed EOL
GetCRCOn
SeqLabC DoAbsOrInc FeedC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC FeedRateC EOL
GetCRCOn
SeqLabC DoAbsOrInc FeedC MoveXYZC EOL
END
END
RETURN

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

WFOStuff:
{ NOTE: This Post Processor does not support WorkFixtureOffsets. }
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
SeqLabC AbsOrInc EOL {.69 removed RapidC} {.71.2 removed CRCOffC, gets turned off in ToolPath}
ELSE
IF FIFO? {.81}
SeqLabC FeedEntC EOL
SeqLabC AbsOrInc FeedC ZCP2 EOL
ELSE
SeqLabC AbsOrInc RapidC ZCP2 EOL {.71.2 removed CRCOffC, gets turned off in ToolPath}
END
END
SeqLabC EndSub 'E' 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
SeqLabC AbsOrInc Connect StrtPos EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
NewProg
EachCycle
SetSRXYtoEP
IF FeedConnect?
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Feed IncValue StrtPosC EOL
SeqLabC AbsOrInc
ELSE
SeqLabC Feed
END
ELSE
SeqLabC Feed
END
ZInPlusInc FeedEnt EOL
ELSE
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
SeqLabC Rapid IncValue StrtPosC EOL
IF FeedEntry?
SeqLabC AbsOrInc ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC AbsOrInc ZInPlusInc EOL
END
ELSE
IF FeedEntry?
SeqLabC Rapid ZCP2PlusInc EOL
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
ELSE
IF FeedEntry?
SeqLabC Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC Rapid ZInPlusInc EOL
END
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
SeqLabC SubCall 'C' Program# EOL
NextCycle
SetStatusOn
SetStatusRapid {force next G1,G2,G3}
AutoCycCutSub1 {build element sub}
AutoCycCutSub2
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
IF FIFO? {.81}
SeqLabC FeedEnt EOL
SeqLabC Feed ZCP2 EOL
ELSE
SeqLabC Rapid ZCP2 EOL
END
END {.69}
SeqLabC EndSub 'E' EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL {.71.2, added Connect}
END
IF FeedConnect?
SeqLabC FeedEnt EOL
SeqLabC FeedC ZInPlusInc EOL {.71.2, changed to FeedC}
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
SeqLabC RapidC ZCP2PlusIncC EOL {can't call for cycle =1} {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
SeqLabC FeedEnt EOL
SeqLabC Feed ZInPlusInc EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqLabC SubCall 'C' Program# EOL
NextCycle
SetStatusRapid {force next G1,G2,G3}
StartSub
TrackZNO# FIRST SPZ#
ToolPath
FinishSub1
SeqLabC EndSub 'E' EOL
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:
DoOpComments
DoPostScript
Plane { No Output }
CheckPass
RETURN

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

{setup and initializations}
InitProg
ReverseXZArcs
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50')
SetMaxFeed('200')
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
' 4thAxisCW(12.5), 4ACW(12.5) -' EOL
' generates a + A move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - A move of the value you specify' EOL
' 5thAxisCW(30), 5ACW(30) -' EOL
' generates a + B move of the value you specify' EOL
' 5thAxisCCW(22.5), 5ACCW(22.5) -' EOL
' generates a - B move of the value you specify' EOL
' MasterOp(1), MOP(1) -' EOL
' IF Repeats? AND Drilling? = TRUE, will place' EOL
' Drill Points in next available Subroutine' EOL
' Minimum = MasterOp(1); Maximum = MasterOp(25)' EOL
' CallMasterOp(1), CMOP(1) -' EOL
' IF Repeats? AND Drilling? = TRUE, will call' EOL
' Subroutine created during MasterOp(1) operation' EOL
' CallMasterOp(1) operations MUST follow MasterOp(1)' EOL
' operations for output to be correct' EOL
END
IF MultipleParts?
'**** This post does not support MultipleParts ****' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
ASCII('12') EOL
' ' EOL
' ' EOL
' ' EOL
' ' EOL
' ' EOL
IF UseComments?
' ANILAM ELECTRONICS CRUSADER RS-232-C 860122' EOL
END
' ' EOL
EOR EOL
' ' EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'( PROGRAM: ' ProgramName$ ' )' EOL
END
IF ProgramComment?
'( ' ProgramComment$ ' )' EOL
END
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
OpenSub
RestoreScale
Plane { No Output }
SeqLab Rapid 'G70' AbsOrInc EOL { G70 = Inch OutPut }
EachTool
SeqLabC 'G29T1' TLNum# 'Z' TLLength# EOL
NextTool
SeqLabC 'T0' EOL
SeqLabC 'Z0' EOL
DoOpComments
IF ToolChangeAtHome?
SeqLabC Home EOL
END
SeqLabC ToolOfst EOL
CheckPass
IF Milling?
SeqLabC StrtPos EOL
END
DoPostScript
ELSE
IF NewTool?

{Finish off last Operation}

SeqLabC 'T0' EOL
SeqLabC RapidC 'Z0' EOL
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC Home EOL
END
IF LAST ProgStop?
SeqLabC 'G4' EOL
ELSE
SeqLabC ProgStop EOL
END

{Start new Operation}

Plane { No Output }
DoOpComments
SeqLab ToolOfst EOL
CheckPass
IF Milling?
SeqLabC StrtPos EOL
END
DoPostScript
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'T0' EOL
SeqLabC RapidC 'Z0' EOL
SeqLabC 'G4' EOL

{Start new Operation}

GetStartOfSameTool
IF Milling?
SeqLabC RapidC StrtPosC EOL
END
SeqLabC ToolOfst EOL
ELSE
IF NewToolOffset?
SeqLabC 'T0' EOL
SeqLabC RapidC 'Z0' EOL

{Start new Operation}

GetStartOfSameTool
IF Milling?
SeqLabC RapidC StrtPosC EOL
END
SeqLabC ToolOfst EOL
ELSE
IF LAST AutoCycle? OR LAST Drilling?
SeqLabC LAST ZCP3C EOL
ELSE
IF LAST FIFO? {.81}
SeqLabC LAST FeedEntC EOL
SeqLabC FeedC LAST ZCP3C EOL
ELSE
SeqLabC RapidC LAST ZCP3C EOL
END
END

{Start new Operation}

GetStartOfSameTool
IF Milling?
SeqLabC Rapid StrtPos EOL
END
END
END
END
END
END {common point for all operations}
IF Milling?
SeqLabC 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
SeqLabC CRCOffC EOL
ELSE
IF Drilling? { No Drilling is done on this Machine. JR 3/30/89}
GetCycle
SeqLabC 'G29LV20 ' FeedEntry# EOL
SeqLabC 'G29LV21 ' DrillCPValue EOL
IF FIDRO? OR FIFO?
IF Dwell?
SeqLabC 'G29LV22 ' Dwell# EOL
END
ELSE
IF Peck?
SeqLabC 'G29LV23 ' Peck# EOL
END
END
SeqLabC Cycle EOL
IF CallMasterOp?
SeqLabC ZDepth EOL
TrackZNO# ZDepth# {.81}
SeqLabC SubCall 'C' CallMasterNum# EOL
ELSE
IF Repeats?
SeqLabC ZDepth EOL
TrackZNO# ZDepth# {.81}
NewMasterProg
StdSub
SeqLabC RapidC StrtPos EOL
END
ToolPath
IF Repeats?
FinishSubG92
END
END
SeqLabC 'G80' EOL
END
END
IF AutoCycle? OR Repeats?
SetFlag('1') { Need to output extra EOP at end. }
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
SeqLabC 'T0' EOL
SeqLabC RapidC 'Z0' EOL
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC FirstHome EOL
END
IF ProgStop?
SeqLabC 'G4' EOL
END
SeqLabC EOP 'E' EOL
CloseSub
Post2 {organize Subs into one program}
IF Flag?('1') { There were Repeats and/or AutoCycle operations. }
SeqLabC EOP 'E' EOL
END
EOR EOL
' ' EOL
ASCII('12') EOL
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:
Anilam Crusader [USS] M195 89
Anilam Crusader II G&C M995 89
Heid TNC 351B MD M989 89 5
Anilam Crusader II SM M987 81 4
Anilam Series M [PEP] M698 89
Anilam 1100 [SU] M621 89
Anilam 1400 [MM] MX70 89
Anilam Crusader 2 M158 81m
Anilam Crusader L051 82
Anilam Series M [UPE] MY72 89
Anilam 1400 [SU] M651 89
Anilam GXM [NRC] M443 89 2

więcej podobnych podstron