{Change Comments ***********************************************************}
{9/27/89, added PostScript to: Okuma OSP5000M-G M101.51, JR}
{10/25/89
Copied & modified: Okuma OSP5000M-G M101.52
For: Mike Kenney Tool
Modified per customer requests (marked-up readout) & updated per general stuff.
Special 1st block for DNC.
CRCOn at ZCP2.
Deleted literal 'G53'.
Use Rapid ZCP3 to cancel Drill Cycle.
Using literal 'G85' for tapping cycle with literals 'G95' & ' F' FeedTapIPR# ('1')
Using literal 'G89' for FIFO with Dwell, corrected Dwell FORMAT.
Block delete SubCalls with WorkFixtureOffsets > WFO1.
Using ReTag, needed to increment the SeqLabuence number and get the literal slash '/'
on the same line before the SeqLab.
Special last blocks for customer file info and DNC.
JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{4/26/91,
Modified: Okuma 5000M-G [MK] M273.62
For: Gibbs & Associates
Updated to new 4.0 Version per Fanuc 6M M001.80
DWB}
{2/1/94, Updated: Okuma 5000M-G [MK] M273.79 to .81.2 format, JR}
{2/1/94
Copied & modified: Okuma 5000M-G [MK] M273.81.2
For: Braden Eng / O&F Machine Co., per Mike Cowen
Control: OSP 5000M-G & OSP 500M-G
Machine: Okuma MC-4 VA & Okuma MC-30 VA
Deleted saftey start blocks, G94/G95 also not needed.
Changed Plane to DoPlane sub to suppress output of control defaulted G17.
Changed to First Tool Not In Spindle.
Added M0 to FirstOperation after ToolChng.
Changed EOP from M30 to M2.
Moved WFOStuff to tool changed block and added Rapid.
Moved Speed, SpinOn & PreTool to StrtPos line.
Moved OfstOn to line preceding StrtPos, it gets output without the ZCP1.
Added ZCP1 to StrtPos line.
Moved CoolOn to OfstOn line.
Forced output to Absolute and deleted redundant AbsOrInc commands.
Changed colon in comments to equal sign.
Added literal 'GOTO N1' before EOP.
Changed Tap Cycle to G84.
Deleted M53 and M54 from Drilling for RetractToCP1 true or false respectivley.
Changed to Arcs Stop On Quads and unconditional R instead of IJ output.
Jim Radcliffe}
{2/9/96, Updated .81 version to .84, MPK}
{3/22/96, Tested ZOnlyRepAutoCycle, Incremented number to .87, MPK}
{11/4/97
Initial: Okuma 500M-G [O&F] M639.87
Created: Okuma 500M-G [O&F] M639.87.1
ForUser: Gibbs & Associates / JRK
Develop: ComPost2 1.1b2, Virtual Gibbs 4.21.09
Comment: Modified per Brain Martin at O&F Machine.
Changed SubID label from M to O.
Jim Radcliffe}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###0'
#3 = '##.####;0.'
#4 = '####.##;0.'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Program#,2)
FORMAT(Parts#,2)
FORMAT(Repeats#,2)
FORMAT(Operation#,2) {.81.2}
FORMAT(Tool#,2) {.81.2}
FORMAT(NewWFO#,2) {.81.2}
FORMAT(FeedTapIPR#,3)
FORMAT(ToolDiameter#,3) {.81.2}
FORMAT(FeedEntry#,4)
FORMAT(Dwell#,4)
{Prog Subroutines **********************************************************}
RestoreScale:
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
ELSE
SetScale('1') { to insure proper scale after RestoreScale is called }
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}
NewWFOF
RETURN
PSStuff: {revised.72}
RETURN
DoPostScript:
PSInit
EachPS
SeqLabC PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
SeqLabC EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
CheckSeqLabuence:
IF FirstPart?
SeqLabC
ELSE
IF MinimizeSequencing?
'/'
ELSE
'/N?'
END
END
RETURN
CheckCRC:
IF CutterRadiusCompensation?
SeqLabC CRCOn MoveXYC CRCOfst EOL
END
RETURN
EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
'O' 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:
SeqLabC ' CALL O' Program# ' Q' Repeats# EOL
StartSub
RETURN
FinishSub1: {part 1}
SeqLabC 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}
IF Milling? AND UseSeparateSubCalls? AND CyclesLessThanMaxSubCalls? AND ZshiftOnly? AND NoZMoves?
'RTS' EOL
CloseSub
ELSE
SeqLabC Preset ShiftRC EOL
'RTS' EOL
CloseSub
SeqLabC Preset UnshftRC EOL
END
RETURN
OpenMP:
NewProg
IF WorkFixtureOffsets?
NewWFO
EachWFO
CheckSeqLabuence ' G15' SetWFO EOL
CheckSeqLabuence ' CALL O' Program# EOL
IncWFO
NextWFO
ELSE
SeqLabC ' CALL O' Program# ' Q' Parts# EOL
END
StartSub
RETURN
CloseMP:
IF WorkFixtureOffsets?
'RTS' EOL
CloseSub
IF MinimizeSequencing?
'/'
ELSE
'/N?'
END
' G15' WFO1 EOL
ELSE
SeqLabC Preset ShiftPC EOL
'RTS' EOL
CloseSub
SeqLabC Preset UnshftPC EOL
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcR
END
RETURN
StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC FeedC MoveXYZC FeedRateC EOL
DecelMove2
END
SeqLabC MoveXYZC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC FeedC MoveXYZC FeedRateC EOL
END
END
RETURN
ToolPath:
EACHFeat
IF Milling? AND CutterRadiusCompensation? AND FirstFeat?
{skip first feature}
ELSE
IF PointFeat?
IF AutoCycle?
SeqC MoveSXYC EOL
SeqLabC ' CALL O' Program# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqC MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF LastFeat? AND AutoCycle? {.70}
SeqLabC CRCOffC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC RapidC MoveXYZC EOL
END
END
ELSE
IF LineFeat?
IF AutoCycle? {.70}
IF LastFeat?
SeqLabC CRCOffC FeedC MoveXYZC FeedRateC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLabC 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
SeqLabC FormatArc ArcFeedC EOL
DecelMove2
END
SeqLabC FormatArc DecelFeed EOL
ELSE
SeqLabC FormatArc ArcFeedC EOL
END
NEXTQuadrant
END
END
END
END
END
NEXTFeat
RETURN
WFOStuff:
IF NewWFO?
IF MultipleParts?
'*** WARNING *** DO NOT USE NEWWFO() WITH NCPOST MULTIPLE PARTS' EOL
ELSE
' G15 H' NewWFO#
END
ELSE
IF NOT SameTool?
IF NeedWFO1?
' G15 H' NewWFO#
END
END
END
RETURN
AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
SetSRXYtoSP
SeqLab 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
SeqLabC AbsOrInc
IF FIFO? {.81}
FeedC ZCP2 FeedEntC EOL
ELSE
RapidC ZCP2 EOL
END
END
SeqLabC 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
CheckCRC
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
CheckCRC
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
SeqLabC 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 ' CALL O' Program# 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}
SeqLabC Feed ZCP2 FeedEnt EOL {.69}
ELSE
SeqLabC Rapid ZCP2 EOL {.69}
END
END {.69}
SeqLabC EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
SeqLabC Connect StrtPos EOL {.71.2, added Connect}
END
CheckCRC
IF FeedConnect?
SeqLabC FeedC ZInPlusInc FeedEnt 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 Feed ZInPlusInc FeedEnt EOL
ELSE
SeqLabC RapidC ZInPlusInc EOL {.69 added Rapid, reads better} {.71.2, changed to RapidC, reads better}
END
END
SeqLabC ' CALL O' Program# EOL
NextCycle
StartSub
SkipZ
ToolPath
UnSkipZ
FinishSub1
SeqLabC EndSub EOL
CloseSub
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
GetStartOfSameTool:
DoOpComments
DoPostScript
WFOStuff
CheckPass
RETURN
DoPlane:
Plane { no output }
IF XYPlane?
IF FirstOperation? OR LAST XYPlane?
{ G17 not needed, its the defaulted plane }
ELSE
'G17'
END
ELSE
IF XZPlane?
'G18'
ELSE
'G19'
END
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
InitWFONum
SetFlood
SetAbs
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
'$' ProgID1 '.MIN' '%'
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
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 ABSOLUTE INCHES )' EOL
END
IF PartsComment?
' ( PARTS PROGRAMMED= ' Parts# ' )' EOL
END
IF StartToolComment?
' ( FIRST TOOL NOT IN SPINDLE )' EOL
END
END
OpenSub
RestoreScale
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Rapid WFOStuff OpToolID ToolChng EOL
SeqLabC ' M0' EOL
DoOpComments
DoPostScript
SeqLabC DoPlane EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC OfstOn CoolOn EOL
SeqLabC Rapid StrtPos ZCP1 Speed
IF NOT LastTool?
PreTool
END
SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF ToolChangeAtHome?
SeqLabC Rapid Home EOL
END
IF LAST ProgStop?
SeqLabC ' M0' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLabC Rapid WFOStuff ToolChng EOL
DoOpComments
DoPostScript
SeqLab DoPlane EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SeqLabC OfstOn CoolOn EOL
SeqLabC Rapid StrtPos ZCP1 Speed
IF NOT LastTool?
PreTool
END
SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
SeqLabC StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
SeqLabC CoolOff EOL
SeqLabC SpinOff EOL
SeqLabC ' M0' EOL
{Start new Operation}
GetStartOfSameTool
SeqLabC OfstOn CoolOn EOL
SeqLabC DoPlane Rapid StrtPos ZCP1 SpeedC SpinOn EOL
ELSE
IF CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
IF NewToolOffset?
{Start new Operation}
GetStartOfSameTool
SeqLabC OfstOn EOL
SeqLabC DoPlane Rapid StrtPos ZCP1 SpeedC EOL
ELSE
{Start new Operation}
GetStartOfSameTool
SeqLabC DoPlane Rapid StrtPos SpeedC EOL
END
IF NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
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?
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?
SeqLabC ZCP3C EOL
ELSE
IF FIFO? {.81}
SeqLabC FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
SeqLabC RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
SeqLabC Rapid StrtPos EOL
END
IF RetractToCP1?
SeqLabC ' G71' ZCP1 EOL
END
GetCycle
SeqLabC
IF FIFO? AND Dwell?
' G89'
ELSE
Cycle
END
StrtPos ZDepth RLevel
IF Dwell?
' P' Dwell#
END
Peck Retract
IF Tap?
' F' FeedTapIPR# ('1')
ELSE
FeedEnt
IF FIFO?
IF NOT Metric?
SetScale('2')
ELSE
SetScale('.07874015748')
END
' FA=' FeedEntry#
RestoreScale
END
END
EOL
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
SeqLabC Rapid ZCP3 EOL
IF Repeats?
FinishSubG92
END
SeqLabC 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
SeqLabC CoolOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
IF FIRST ToolChangeAtHome? {.71.2 added FIRST modifier}
SeqLabC Rapid FirstHome EOL
END
IF ProgStop?
SeqLabC ' M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLabC 'GOTO N1' EOL
SeqLabC EOP EOL
Post
'( MACHINE CYCLE TIME = )' EOL
'( PART TO PART TIME = )' EOL
'( PARTS PER HOUR = )' EOL
'%'
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00') ASCII ('00')
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:
Fanuc 11M Okuma [AI] MY86 87Fanuc 11M Okuma 5 WB M638 87Fanuc 11M Okuma M124 87Okuma OSP 5020M [GSI] M648 87Okuma 5000M G [KC] M378 87Okuma 5000M G [KC] M378 87Fanuc 10M MVJr[G43r] M192 87Tosnuc 600M BMC 40 M440 87Fanuc 6M [MC] M710 87Okuma OSP 5020L [PB] L604 85 1G&L Numeripath 800M M713 87 1Okuma OSP 500L GTR L290 82 2pref 87więcej podobnych podstron