DCI 8000 [LF] M787 81 4


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

{2/26/91
Copied & modified: Fanuc 6M M001.76.1
For: LaserFab
Machine: Anorad 6 CO2 Laser
Control: Anomatic II Level III
2 Axis with Z Rotary Table.
Turn Laser on to cut, off to position.
All Comments start with literal 'G69'.
WFO's by request only, activated by MP or PS.
FeedRates are inches per second, taken directly from CAM.
FullUp & ExitClearancePlane in ncPost will have the same effect.
No CRC.
Feeds called on line prior to axis move.
2 G codes per line maximum?
G0 & F200 for Rapid moves.
M Codes Prog Command Effect
106 SpinOn Laser On
107 SpinOff Laser Off
108 ------ Shutter Open (allows laser thru)
109 ------ Shutter Closed
110 ------ Optional Gas On
111 ------ Optional Gas Off
114 CoolOn Gas On
115 CoolOff Gas Off
JR}

{3/23/93
Updated: Anomatic II Anorad M406.76.1
For: Gibbs & Associates/Quasar Industries
Updated to Version 4.1 per Fanuc 6M M001.81.2 Format.
Added NewProg at DoSubComment to Update Program#.
DWB}

{6/16/93
Updated: Anomatic II Anorad M406.81.2
For: Gibbs & Associates/Quasar Industries
Made minor cleanup changes.
DWB}

{5/5/95
Copied and Modified: Anomatic II Anorad M406.81.2
For: LASERFAB INC.
To Make processor for:DCI 8000
Modified per supplied output and Manual:
Changed all comments to start with literal 'P'.
Since Incremental/Absolute is not modal I tested
for AbsoluteMoves? and added literals for incremental moves,
also added format #7 for the same.
Change LaserOn and LaserOff to ElectronBeamOn
and ElectronBeamOff respectively.
Removed OpenShutter: and CloseShutter: (Not Needed).
Removed OptGasOn: (Not Used Anyway).
Removed GasOn: and GasOff: (Not Needed).
Disabled Coolant Calls (No coolant per James Noble at LASERFAB).
Removed WFOStuff Calls.
Created Sub 'DoStartPos' to output absolute and incremental
start positions with the correct label.
Added Flag('1') to determine if the beam is on so we can turn it off
for Rapid Features while milling.
Created ContinuousPathOn: '[' and ContinuousPathOff: ']'
and Added Flag('2') to track condition.
Created DoSetInc: and DoAbsOrInc:
and Added Flag('3') to track condition for correct axis address labels.

MPS}

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

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

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
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(EPX#,7) {MPS}
FORMAT(EPY#,7) {MPS}
FORMAT(SPX#,7) {MPS}
FORMAT(SPY#,7) {MPS}
FORMAT(StartPosX#,7) {MPS}
FORMAT(StartPosY#,7) {MPS}
FORMAT(HomeX#,7) {MPS}
FORMAT(HomeY#,7) {MPS}
FORMAT(OriginShiftRX#,7) {MPS}
FORMAT(OriginShiftRY#,7) {MPS}
FORMAT(OriginShiftPX#,7) {MPS}
FORMAT(OriginShiftPY#,7) {MPS}
FORMAT(OriginUSPXCTP#,7) {MPS}
FORMAT(OriginUSPYCTP#,7) {MPS}
FORMAT(Repeats#,5) {MPS}
FORMAT(Parts#,5) {MPS}
FORMAT(Recall#,5) {MPS}


{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:
NewProg { Update Program# }
ASCII('13') ASCII('13') 'P"SAVE THIS SUB AS: ' Program# '"' EOL
RETURN

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

PSInit: {reset flags}
NewWFOF
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqLabC 'Z' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqLabC 'Z' FourthDegree# EOL
FourthCCWF {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

ElectronBeamOn:
IF NOT Flag?('1')
'O1;1'
SetFlag('1')
END
RETURN

ElectronBeamOff:
IF Flag?('1')
'O1;0'
SetFlagF('1')
END
RETURN

ContinuousPathOn:
IF NOT Flag?('2')
'['
SetFlag('2')
END
RETURN

ContinuousPathOff:
IF Flag?('2')
']'
SetFlagF('2')
END
RETURN

EntryMove: {Not used in this prog}
SeqLabC ElectronBeamOn EOL
RETURN

ExitMove:
SeqLabC ElectronBeamOff EOL
RETURN

StartSub:
OpenSub
DoSubComment
RETURN

SubWarning:
{ NOT Needed }
RETURN

StdSub:
SeqLabC '.' Program# '#' Repeats# EOL
StartSub
RETURN

FinishSub1: {part 1}
IF NOT FeedConnect?
IF NOT AutoCycle?
ExitMove
END
END
RETURN

FinishSubG92: {part 2}
SeqLabC 'XP' OriginShiftRX# ' YP' OriginShiftRY# EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC 'XP' OriginUSRXCTP#('1') ' YP' OriginUSRYCTP#('1') EOL
RETURN

OpenMP:
TagInc
IF WorkFixtureOffsets?
NewWFO
EachWFO
SeqLabC SetWFO EOL
SeqLabC '.' Program# '#1' EOL
IncWFO
NextWFO
ELSE
SeqLabC '.' Program# '#' Parts# EOL
END
StartSub
RETURN

CloseMP:
IF WorkFixtureOffsets?
SeqLabC EndSub EOL
CloseSub
SeqLabC WFO1 EOL
ELSE
SeqLabC 'XP' OriginShiftPX# ' YP' OriginShiftPY# EOL
SeqLabC EndSub EOL
CloseSub
SeqLabC 'XP' OriginUSPXCTP# ' YP' OriginUSPYCTP# EOL
END
RETURN

FormatArc:
IF ArcCW?
'CW'
ELSE
'CCW'
END
RETURN

FormatArc2:
'(' ArcI ' ' ArcJ ')'
IF Flag?('3') OR NOT AbsoluteMoves?
'(XM' EPX# ' YM' EPY# ')'
ELSE
'(' MoveX ' ' MoveY ')'
END
RETURN

FormatLinear:
'LI'
IF Flag?('3') OR NOT AbsoluteMoves?
'(XM' EPX# ' YM' EPY# ')'
ELSE
'(' MoveX ' ' MoveY ')'
END
RETURN

FormatRapidMove:
IF Flag?('3') OR NOT AbsoluteMoves?
'XM' EPX# ' YM' EPY#
ELSE
'XA' EPX# ' YA' EPY#
END
RETURN

FormatPoint:
IF Flag?('3') OR NOT AbsoluteMoves?
'XM' SPX# ' YM' SPY#
ELSE
MoveSX ' ' MoveSY
END
RETURN

DoStartPos:
IF Flag?('3') OR NOT AbsoluteMoves?
'XM' StartPosX# ' YM' StartPosY#
ELSE
'XA' StartPosX# ' YA' StartPosY#
END
RETURN

StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC ElectronBeamOn EOL
SeqLabC FeedRateC EOL
SeqLabC ContinuousPathOn FormatLinear EOL
DecelMove2
END
SeqLabC DecelFeed EOL
SeqLabC ContinuousPathOn FormatLinear EOL
ELSE
IF XMove? OR YMove?
SeqLabC ElectronBeamOn EOL
SeqLabC FeedRateC EOL
SeqLabC ContinuousPathOn FormatLinear EOL
END
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC FormatPoint EOL
SeqLabC '.' Program# '#1' EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC FormatPoint EOL
SeqLabC ElectronBeamOn EOL
IF Dwell?
SeqLabC 'D' Dwell# EOL
ELSE
SeqLabC 'D0100' EOL {Give it 1/10 Second Minimum Dwell}
END
SeqLabC ElectronBeamOff EOL
END
ELSE
IF RapidFeat?
IF XMove? OR YMove?
SeqLabC ContinuousPathOff EOL
SeqLabC ElectronBeamOff EOL
SeqLabC FormatRapidMove EOL
END
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
SeqLabC ElectronBeamOn EOL
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC ArcFeedC EOL
SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL
DecelMove2
END
SeqLabC DecelFeed EOL
SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL
ELSE
SeqLabC ArcFeedC EOL
SeqLabC ContinuousPathOn FormatArc FormatArc2 EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

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

DoSetInc:
SetFlag('3') {IF Flag?('3') Output is Incremental}
SetInc
SeqLabC IncValue EOL {No Output}
RETURN

DoAbsOrInc:
IF AbsoluteMoves?
SetFlagF('3') {IF NOT Flag?('3') Output is Absolute}
SetAbs
SeqLabC AbsValue EOL {No Output}
ELSE
DoSetInc
END
RETURN

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

AutoCycCutSub2: {part 2}
ToolPath
DoAbsOrInc
ExitMove
SeqLabC EndSub 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?
AutoCycCutSub1
AutoCycCutSub2
AutoCycPat
ELSE
ToolPath
END
RETURN

G92Sub:
StdSub
SeqLabC
IF FeedConnect?
'LI(' DoStartPos ')'
ELSE
DoStartPos
END
EOL
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
{ NOT Needed }
RETURN

ZonlyRep:
{ NOT Needed }
RETURN

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

GetStartOfSameTool:
DoOpComments
DoPostScript
CheckPass
RETURN

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

{setup and initializations}
InitProg

SetFlag('1') {Set Electron beam On, allows Turn off at program beginning}
SetFlagF('2') {Set Continuous Path Off}

{TagInit}
{InitWFONum}
{SetFlood}

SkipZ
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
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 + Z move of the value you specify' EOL
' 4thAxisCCW(22.5), 4ACCW(22.5) -' EOL
' generates a - Z move of the value you specify' EOL
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramNameComment?
'P"' ProgramName$ '"' EOL
END
IF ProgramComment?
'P"' ProgramComment$ '"' EOL
END
IF FormatNameComment?
'P"FORMAT: ' FormatName$ '"' EOL
END
IF TimeComment?
'P"' Date$ ' AT ' Time$ '"' EOL
END
IF MovesComment?
'P"OUTPUT IN ' MoveType$ ' INCHES"' EOL
END
IF PartsComment?
'P"PARTS PROGRAMMED: ' Parts# '"' EOL
END
IF StartToolComment?
'P"FIRST TOOL NOT IN SPINDLE"' EOL
END
END
RestoreScale
OpenSub
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Plane { no output }
DoAbsOrInc { no output }
Save# Num#('1') Sequence#
SeqLab ' ' ElectronBeamOff EOL
DoOpComments
DoPostScript
CheckPass
SeqLabC DoStartPos EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLabC DoStartPos EOL
END
ELSE
IF NewTool?

{Finish off last Operation}

IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC ContinuousPathOff EOL
IF ToolChangeAtHome?
SeqLabC
IF Flag?('3') OR NOT AbsoluteMoves?
'XM' HomeX# ' YM' HomeY#
ELSE
'XA' HomeX# ' YA' HomeY#
END
EOL
END
SeqLabC 'START1' EOL { Forced ProgStop }

{Start new Operation}

Plane { no output }
DoOpComments
DoPostScript
CheckPass
SeqLabC DoStartPos EOL
IF MultipleParts? AND OneToolAllParts?
OpenMP
SeqLabC DoStartPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
SeqLabC ContinuousPathOff EOL
IF LAST ProgStop?
SeqLabC EOL
SeqLabC 'START1' EOL

{Start new Operation}

GetStartOfSameTool
SeqLabC DoStartPos EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC EOL
END

{Start new Operation}

GetStartOfSameTool
SeqLabC DoStartPos EOL
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC EOL
END
END
END
END
END {common point for all operations}
IF Milling?
IF Repeats?
TagInc
G92Sub
IF FeedConnect?
ExitMove
END
ELSE {no repeat OPs}
Milling
IF NOT AutoCycle?
ExitMove
END
END
ELSE
IF Drilling?
IF Repeats?
TagInc
StdSub
SeqLabC DoStartPos EOL
END
ToolPath
IF Repeats?
FinishSubG92
END
END
END
NextOp {loops back to EachOP until last Operation}

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

{finish last operation}
IF MultipleParts? AND OneToolAllParts?
CloseMP
END
DoEndOpPS
SeqLabC ContinuousPathOff EOL
IF FIRST ToolChangeAtHome?
SeqLabC
IF Flag?('3') OR NOT AbsoluteMoves?
'XM' HomeX# ' YM' HomeY#
ELSE
'XA' HomeX# ' YA' HomeY#
END
EOL
END
SeqLabC 'START1' EOL { Forced ProgStop }
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END

'JP' Recall# Num#('1') EOL { Jumps Control Back to Beginning }
CloseSub
Post2 {organize Subs into one program}
Close
ReSeq
IF UseComments?
SetScale('1') {restore scale for comments}
Reopen
IF FileBytesComment?
'P"FILE LENGTH: ' FileBytes# ' CHARACTERS"' EOL
END
IF FileFeetComment?
'P"FILE LENGTH: ' FileFeet# ' FEET"' EOL
END
IF FileMetersComment?
'P"FILE LENGTH: ' FileMeters# ' METERS"' EOL
END
Close
END


Wyszukiwarka