Micro Swinc Series 30 DV37 15


{5/24/93
created initial NoSubs Processor to .81 format
FIFO stuff not supported
variables: 1 = tools 1st op; 2 = tools last op; 3 = ncCAMs last op
Jim Radcliffe}

{7/29/93, v.81.1, added FIFO handling, JR}
{8/3/93, v.81.2, SameTool WFO, RapidF#, additional FIFO handling, JR}
{9/12/95, v.81.3, FIFO? queries changed to ExitType & ExitFeed calls, WFO MultipleParts, JR}
{5/8/96, v.89, Return to the StrtPos before next iteration of CutAutoCycle Repeats ZshiftOnly, JR}
{6/4/96, v.89.1, minor corrections SeqC, CRCOff & SameTool, JR}

{3/14/97
Initial: Fanuc 6M NoSubs M877.89.1
Created: Fanuc 6M NoSubs D877.15
Develop: ComPost2 68K 1.0b11, Virtual Gibbs 3.31 PPC
Comment: Created Advanced Mill version of this popular NoSubs processor!
Maintained the .89 prog format to simplify creating.
Do not know if we can use the .15 prog format with NoSubs output!
Cannot use Toggling WFO Multiple Parts!
Jim Radcliffe}

{4/25/97
Initial: Fanuc 6M NoSubs D877.15
Created: Fanuc 6M NoSubs D877.15.1
Develop: ComPost2 68K 1.0b11. CatalystPPC v3.33C
Comment: Added format for Tag#. Deleted CallMasterNum# format.
Jim Radcliffe}

{4/25/97
Initial: Fanuc 6M NoSubs D877.15.1
Created: Micro Swinc M1 OM1 DY91.15
ForUser: Braden Engineering / Ramsey Winch
Control: Micro Swinc M1
Machine: White-Sunstrand Omni-1
Develop: ComPost2 68K 1.0b11, CatalystPPC v3.33C
Comment: New processor per manual and sample program.
Only one Work Fixture Offset.
No Rapid command. Uses G1 and F0.
Moachine takes shortest path to absolute B axis command 0 thru 360.
Arc output in absolute have signed absolute arc centers an no quad stopping.
Arc output in incremental have unsigned incremental arc centers and stops on quads!
GearRange: M40 0 thru 599 RPM; M41 600 thru 3200.
Jim Radcliffe}

{3/17/98
Initial: Micro Swinc M1 OM1 DY91.15
Created: Micro Swinc Series 30 Dxxx.15
ForUser: Shepard Niles Inc
Control: Micro-Swinc
Machine: Sunstrand Series 30 Horizontal Machining Center
Develop: ComPost2 1.1b3, Virtual Gibbs 4.24
Comment: New processor per sample program from Brian McLean
Tool change at beginning of operation. No PreTool.
Deleted GearRanges from Form.
Spaces between codes.
Literal preset at beginning of program with same value positioning at end of program.
Updated per Fanuc 6M NoSubs D877.15.2
Other changes so output is closer to sample program to get a rough draft processor
to the customer so he can put together a marked up readout from!
Jim Radcliffe}

{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(CSOffsetA#,2)
FORMAT(CSOffsetB#,2)
FORMAT(SUB#,2)
FORMAT(ToolDiameter#,3)
FORMAT(TrackZNO#,4)
FORMAT(TCZ#,4)
FORMAT(ABS#,4)
FORMAT(ADD#,5)
FORMAT(CS#,5)
FORMAT(Tag#,5)
FORMAT(Program#,5)
FORMAT(Operation#,5)
FORMAT(Tool#,5)
FORMAT(Parts#,5)
FORMAT(Dwell#,6)
FORMAT(RapidF#,6)
FORMAT(DIV#,7)
FORMAT(Peck#,7)

{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

WFONum:
' G' NewWFO#
RETURN

WFOStuff:
IF NewWFO?
WFONum
ELSE
IF NOT SameTool?
IF NeedWFO1?
WFONum
END
END
END
RETURN

DoSubComment:
IF UseComments? AND SubComment?
SeqC '(PP CYCLE START )' EOL
END
RETURN

DoCSComment:
IF AAxisAvail? OR BAxisAvail?
SeqC '(PP CS#' CS# ' - ' CSComment$ ' )' EOL
END
RETURN

CSComments:
IF FirstOperation? OR NewTool? OR ChangeCS?
DoCSComment
END
RETURN

DoOpComments:
IF UseComments?
SetScale('1')
IF MultipleParts? AND SubComment?
SeqC '(PP PART ' Tag# ' )' EOL
END
IF OperationIDComment?
SeqC '(PP OPERATION ' Operation# ': ' OperationType$ ' )' EOL
END
IF OperationComment?
SeqC '(PP ' OperationComment$ ' )' EOL
END
IF WorkGroupComment?
SeqC '(PP ' WorkGroupComment$ ' )' EOL
END
IF ToolTypeComment?
SeqC '(PP TOOL ' Tool# ': ' ToolDiameter# ' ' ToolType$ ' )' EOL
END
IF ToolComment?
SeqC '(PP ' ToolComment$ ' )' EOL
END
RestoreScale
END
CSComments
RETURN

CSAngleA:
IF AAxisAvail?
' A'
Save# Num#('4') TRUNC# DIV# CSOffsetA# Num#('360')
IF LessThan? CSOffsetA# Num#('0')
Save# Num#('4') SUB# Recall# Num#('4') Num#('1')
END
SUB# CSOffsetA# MUL# Recall# Num#('4') Num#('360')
END
RETURN

CSAngleAC:
IF AChange?
CSAngleA
END
RETURN

CSAngleB:
IF BAxisAvail?
' B'
Save# Num#('4') TRUNC# DIV# CSOffsetB# Num#('360')
IF LessThan? CSOffsetB# Num#('0')
Save# Num#('4') SUB# Recall# Num#('4') Num#('1')
END
SUB# CSOffsetB# MUL# Recall# Num#('4') Num#('360')
END
RETURN

CSAngleBC:
IF BChange?
CSAngleB
END
RETURN

PSInit:
NewWFOF
RotateF
OptCyc1F
MasterOpF
CallMasterOpF
RETURN

PSStuff:
IF FourthCW?
FORMAT(FourthDegree#,2)
SeqC ' A' FourthDegree# EOL
FourthCWF
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
SeqC ' A' FourthDegree# EOL
FourthCCWF
END
IF FifthCW?
FORMAT(FifthDegree#,2)
SeqC ' B' FifthDegree# EOL
FifthCWF
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
SeqC ' B' FifthDegree# EOL
FifthCCWF
END
RETURN

DoPostScript:
PSInit
EachPS
SeqC PostScript EOL
PSStuff
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
SeqC EndOpPS EOL
PSStuff
NextPS
RETURN

ExitType:
IF FIFO?
FeedC
ELSE
FeedC
END
RETURN

ExitFeed:
IF FIFO?
FeedEntC
ELSE
RapidFC
END
RETURN

FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
IF XYPlane?
MoveX MoveY MoveZC
IF AbsValue?
ArcIJ
ELSE
' I' ABS# ArcI# ' J' ABS# ArcJ#
END
ELSE
IF XZPlane?
MoveX MoveYC MoveZ
IF AbsValue?
ArcIJ
ELSE
' I' ABS# ArcI# ' K' ABS# ArcJ#
END
ELSE
MoveXC MoveY MoveZ
IF AbsValue?
ArcIJ
ELSE
' J' ABS# ArcI# ' K' ABS# ArcJ#
END
END
END
RETURN

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

ckCRCNum:
IF NOT LastFeat? AND Equal? SPZ# EPZ#
{CRCOffsetC}
END
RETURN

StdRapid:
IF XMove? OR YMove? OR ZMove?
SeqC ckCRC FeedC MoveXYZC ckCRCNum RapidFC EOL
END
RETURN

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

StdArc:
IF AbsValue?
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqC FormatArc ArcFeedC EOL
DecelMove2
END
SeqC FormatArc DecelFeed EOL
ELSE
SeqC FormatArc ArcFeedC EOL
END
ELSE
EACHQuadrant
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
RETURN

ToolPath2: {for AutoCycle element moves}
EACHFeat
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
NEXTFeat
RETURN

EntryMove:
IF FeedEntry?
SeqC FeedC ZInC FeedEntC EOL
ELSE
SeqC FeedC ZInC RapidFC EOL
END
RETURN

CutAutoCycle:
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
SetSRXYtoSP
SeqC IncValue EOL
IF Repeats? AND ZshiftOnly?
EachRep
IF NOT FirstCycle?
IF SPXMove? OR SPYMove?
IF FeedConnect?
SeqC FeedC StrtPosC EOL
ELSE
SeqC FeedC StrtPosC RapidFC EOL
END
END
END
EntryMove
ToolPath2
IF NOT FeedConnect?
SeqC ExitType PRIME ZCP2 ExitFeed EOL
END
NextRep
ELSE
EntryMove
ToolPath2
END
SeqC AbsOrInc ExitType ZCP2 ExitFeed EOL
SetSRSubXY {restore tool position}
SetSRSubMove
ReSetPass2 {restore for positioning moves}
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
IF FIFO? AND NOT FirstFeat?
SeqC Feed MoveSXYC RapidF EOL
ELSE
SeqC MoveSXYC EOL
END
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
CutAutoCycle
ELSE
IF RetractToCP1?
IF NOT FirstFeat?
SeqC DrillOff ZCP1 RapidF EOL
SeqC
IF FIFO? AND Dwell?
' G89'
ELSE
Cycle
END
MoveSX MoveSY MoveSZ RLevel Dwell FeedEnt EOL
END
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
END
ELSE
IF RapidFeat?
StdRapid
ELSE
IF LineFeat?
StdLine
ELSE
IF ArcFeat?
StdArc
END
END
END
END
NEXTFeat
RETURN

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

ProgStart:
InitProg
TagInit
ReverseXZArcs
InitWFONum
SetFlood
SetFlagF('1') {done flag}
SetTCZ('28.')
Save# Num#('1') Num#('0') {tools 1st op}
Save# Num#('2') Num#('0') {tools last op}
Save# Num#('3') Num#('0') {ncCAMs last op}
Save# Num#('4') Num#('0') { CSAngleA and CSAngleB }
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
' NewWFO(56), NWFO(56) -' EOL
' The Work Fixture Offset # you specify will be used for all following operations.' EOL
' Do not use with the multiple part work fixture offset option.' 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
' TCZ(), TOOLCHANGEZ() -' EOL
' Set the Toolchange Z value. Modal, changes all following OPs.' EOL
' Value is set to Z28.0000 as a default.' EOL
END
EachOp
IF FirstOperation?
EOR EOL
SeqC '(ID ' ProgramName$ ' )' EOL
IF ToolChangeAtHome?
SetHome
END
IF UseComments?
IF ProgramComment?
SeqC '(PP ' ProgramComment$ ' )' EOL
END
IF FormatNameComment?
SeqC '(PP FORMAT: ' FormatName$ ' )' EOL
END
IF TimeComment?
SeqC '(PP ' Date$ ' AT ' Time$ ' )' EOL
END
IF MovesComment?
SeqC '(PP OUTPUT IN ' MoveType$ ' INCHES )' EOL
END
IF PartsComment?
SeqC '(PP PARTS PROGRAMMED: ' Parts# ' )' EOL
END
IF StartToolComment?
SeqC '(PP FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
SeqC AbsOrInc ' G94' EOL
SeqC Preset ' X18. Y24.5 Z20.25' EOL
END
NextOp
RETURN

DoOfstOn:
' G28' ZCP1
RETURN

DoOfstOff:
' G27' ' Z' TCZ#
RETURN

DoOp:
IF FirstOperation?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC FeedC DoOfstOff RapidFC EOL
END
DoOpComments
CheckPass
SeqC Feed StrtPos CSAngleA CSAngleB RapidF EOL
IF FullUp?
SeqC DoOfstOn EOL
END
ELSE
Seq OpToolID ToolChng EOL
DoOpComments
SeqC Speed SpinOn GearRange EOL
DoPostScript
CheckPass
SeqC Feed Plane WFOStuff StrtPos CSAngleA CSAngleB RapidF EOL
SeqC DoOfstOn CoolOn EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
{only need to set up for tool change on 1st part}
ELSE
DoEndOpPS
SeqC FeedC DoOfstOff RapidFC
IF ToolChangeAtHome?
EOL
SeqC WFOOff Home
END
IF LAST ProgStop?
' M0'
ELSE
ProgStop
END
ASCII('13') EOL
END

{Start new Operation}

IF MultipleParts? AND OneToolAllParts? AND NOT FirstPart?
IF FullUp?
SeqC FeedC DoOfstOff RapidFC EOL
END
DoOpComments
CheckPass
SeqC Feed StrtPos CSAngleA CSAngleB RapidF EOL
IF FullUp?
SeqC DoOfstOn EOL
END
ELSE
Seq OpToolID ToolChng EOL
DoOpComments
SeqC Speed SpinOn GearRange EOL
DoPostScript
CheckPass
SeqC Feed Plane WFOStuff StrtPos CSAngleA CSAngleB RapidF EOL
SeqC DoOfstOn CoolOn EOL
END
ELSE
IF SameTool?

{Finish off last Operation}

SeqC
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
FeedC DoOfstOff RapidFC
END
IF LAST ProgStop?
SpinOff CoolOff
ELSE
IF NewGear?
SpinOff
END
IF CoolOff? AND LAST NOT CoolOff?
CoolOff
END
END
EOL
DoEndOpPS
IF LAST ProgStop?
SeqC ' M0' EOL
END

{Start new Operation}

DoOpComments
DoPostScript
CheckPass
SeqC Feed PlaneC WFOStuff StrtPos CSAngleA CSAngleB RapidF SpeedC
IF LAST ProgStop?
SpinOn
ELSE
IF NewGear?
SpinOn GearRange
END
END
EOL
SeqC
IF LAST ProgStop? OR NewToolOffset? OR ChangeCS?
DoOfstOn
END
IF LAST ProgStop?
CoolOn
ELSE
IF NOT CoolOff? AND LAST CoolOff?
CoolOn
END
END
EOL
END
END
END

{ Common Point for All Operations }

ResetCRCNum {call here to reset for each new operation only, call in tool path to reset for each repeat in an operation}

IF Milling?
SeqC ZCP2C EOL
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
EACHRep
DoSubComment
IF NOT FirstCycle?
SeqC Connect StrtPos EOL
IF NOT FeedConnect?
SeqC ZCP2C EOL
END
END
END
END
IF NOT AutoCycle?
EntryMove
END
ToolPath
IF Repeats?
IF ZshiftOnly? AND AutoCycle?
{done in CutAutoCycle called from ToolPath}
ELSE
SeqC CRCOffC
IF NOT FeedConnect?
ExitType PRIME ZCP3C
END
ExitFeed EOL
NEXTRep
END
END
IF AutoCycle?
SeqC ZCP3C EOL
ELSE
SeqC CRCOffC ExitType ZCP3C ExitFeed EOL
END
ELSE
IF Drilling?
IF Repeats?
EACHRep
DoSubComment
END
GetCycle
IF Peck?
IF PeckChipBreaker?
SeqC '(FI ' Peck# ')' EOL
ELSE
SeqC '(TD ' DIV# Peck# Num#('6') ')' EOL { the first peck depth = TD X 6 }
END
END
SeqC
IF FIFO? AND Dwell?
' G89'
ELSE
Cycle
END
StrtPos ZDepth RLevel Dwell FeedEnt EOL
TrackZNO# FIRST SPZ#
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqC DrillOff ZCP3 RapidF EOL
IF Repeats?
NEXTRep
SeqC ZCP3C EOL
END
END
END
RETURN

FinishLastOp:
DoEndOpPS
SeqC FeedC DoOfstOff RapidFC
IF MultipleParts? AND AllToolsOnePart? AND NOT LastPart? {no tool change after doing last part}
IF FIRST ToolChangeAtHome?
EOL
SeqC WFOOff FirstHome
END
IF ProgStop?
' M0'
ELSE
ProgStop
END
ASCII('13') EOL
ELSE
EOL
SeqC FeedC ' X18. Y24.5 Z20.25' RapidFC EOL
SeqC EOP EOL
END
RETURN

DoToolsOps:
EachOp
IF GTEqual? Operation# Recall# Num#('1') AND LTEqual? Operation# Recall# Num#('2')
{Tools1stOp ² op ² ToolsLastOp}
DoOp
END
NextOp
RETURN

NextTools1stOp:
SetNextToolOp Operation#
RETURN

GetToolsOps:
EachOp
IF Equal? Operation# Recall# Num#('1') {if op = Tools1stOp}
IF GreaterThan? NextTools1stOp Recall# Num#('1') {if NextTools1stOp is greater Tools1stOp}
Save# Num#('2') SUB# NextTools1stOp Num#('1') {ToolsLastOp becomes NextTools1stOp less 1}
ELSE {else}
Save# Num#('2') Recall# Num#('3') {ToolsLastOp becomes ncCAMsLastOp}
END
END
NextOp
RETURN

DoTool:
IF NOT Flag?('1')
GetToolsOps
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
DoToolsOps
IncWFO
NextWFO
ELSE
EachPart
TagInc
DoToolsOps
NextPart
END
IF LessThan? Recall# Num#('2') Recall# Num#('3') {if ToolsLastOp < ncCAMsLastOp}
Save# Num#('1') ADD# Recall# Num#('2') Num#('1') {Tools1stOp becomes NextTools1stOp}
ELSE {else}
SetFlag('1') {set DoneFlag}
END
TagInit
END
RETURN

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

ProgStart {setup and initializations}

IF MultipleParts?
IF WorkFixtureOffsets?
ASCII('13') EOL
ASCII('13') EOL
'This processor does not support' EOL
'work fixture offsets!' EOL
ASCII('13') EOL
'Change to Equally Spaced Offsets' EOL
'and re-process!' EOL
ASCII('13') EOL
ASCII('13') EOL
ELSE
IF AllToolsOnePart?
IF WorkFixtureOffsets?
NewWFO
EachWFO
TagInc
EachOp
DoOp
NextOp
FinishLastOp
IncWFO
NextWFO
ELSE
EachPart
TagInc
EachOp
DoOp
NextOp
FinishLastOp
NextPart
END
ELSE
IF OneToolAllParts?
EachOp
IF FirstOperation?
Save# Num#('1') Operation# {ncCAMs1stOp becomes Tools1stOp}
END
IF LastOp?
Save# Num#('3') Operation# {save ncCAMsLastOp}
END
NextOp
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool DoTool
FinishLastOp
END
END
END
ELSE
EachOp
DoOp
NextOp
FinishLastOp
END
IF UseComments?
SetScale('1')
IF FileBytesComment?
SeqC '(PP FILE LENGTH: ' FileBytes# ' CHARACTERS )' EOL
END
IF FileFeetComment?
SeqC '(PP FILE LENGTH: ' FileFeet# ' FEET )' EOL
END
IF FileMetersComment?
SeqC '(PP FILE LENGTH: ' FileMeters# ' METERS )' EOL
END
END
EOR EOL
CloseSub
Post2
Close


Wyszukiwarka

Podobne podstrony:
Robotool Micro 1000 MX45 15 2
10 15 30
30 15 Grudzień 1994 Zwrot w sprawie Czeczenii
30 9 15 notka

więcej podobnych podstron