{Change Comments ***********************************************************}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{11/20/90, Updated: Yasnac 3000G Mat M016.55 to .76.1 format, JR}
{4/3/91
Modified: Yasnac 3000G Mat M016.76.1
For: Gibbs & Associates
Updated to Version 4.0 per Fanuc 6M M001.80 Format.
DWB}
{6/16/92
Modified: Yasnac 3000G Mat M016.79
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 6M M001.81 Format.
DWB}
{8/10/95
Initial: Yasnac 3000G Mat M016.81
Created: Yasnac 3000G [JD] M837.81
ForUser: Murtaugh / JD Engineering
Control: Yasnac 3000G
Machine: Matsuura 500 VMC
Develop: ComPost 4.21.32, Virtual v.2.20
Comment: New Processor per marked up readout from Brian Bradshaw. Highlights:
Reformated output to match sample readout.
Custom sequence numbers for subroutines.
Jim Radcliffe}
{10/26/95
Initial: Yasnac 3000G [JD] M837.81
Created: Yasnac 3000G [JD] M837.85
ForUser: Murtaugh / JD Engineering
Control: Yasnac 3000G
Machine: Matsuura 500 VMC
Develop: ComPost 4.21.33, Catalyst68K v2.30.14
Comment: Updated to .85 and IncSubs format per Fanuc 6M IncSubs M001.85
Jim Radcliffe}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '####^##0'
#7 = '#'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(ClearancePlane1#,4)
FORMAT(SUB#,4)
FORMAT(Tag#,5)
FORMAT(CallMasterNum#,5)
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}
FORMAT(Recall#,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
DoSubComment:
IF UseComments? AND SubComment?
'( SUB NUMBER: ' Tag# ' )' 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
CheckAbsOrInc:
IF Flag?('1') {we are in a MultipleParts sub}
IncValue
ELSE
IF Flag?('2') {we are in a Repeats sub}
IncValue
ELSE {we are not in a sub}
AbsOrInc
END
END
RETURN
EntryMove:
IF FeedEntry?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC RapidC ZIn EOL
END
RETURN
StartSub:
OpenSub
DoSubComment
Save# Num#('1') SUB# Recall# Num#('1') Num#('1') {decrement subroutine number}
'Ś' Recall# Num#('1') EOL {set sequence number to decremented subroutine number}
'>' Tag# EOL
SeqLab {drop unconditional for proper tagging}
RETURN
SubWarning:
IF NOT FeedConnect?
IF AnyZshift?
' ' EOL
'( WARNING Z CLEARANCE WILL CHANGE WITH EACH CYCLE OF SUB REPEAT )' EOL
' ' EOL
END
END
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
HomeOrStrtPos:
IF AllToolsOnePart?
Home
ELSE {OneToolAllParts}
StrtPos
END
RETURN
DrillClearancePlane:
IF RetractToCP1?
IF SameTool?
IF NotEqual? LAST ClearancePlane3# ClearancePlane1#
SeqLabC 'Z' ClearancePlane1# EOL {ZCP1 does not output in incremental}
END
END
ELSE
SeqLabC ZCP2C EOL
END
RETURN
ECPZmove:
IF OneToolAllParts? AND ExitClearancePlane?
IF Milling?
SeqLabC ZCP2 EOL
ELSE {Drilling}
IF RetractToCP1?
SeqLabC ZCP1 EOL
ELSE
SeqLabC ZCP2 EOL
END
END
END
RETURN
OpenMP:
IF EquallySpacedOffsets?
TagInc
EachPart
SeqLabC AbsOrInc Rapid HomeOrStrtPos EOL
ECPZmove
SeqLabC SubCall CallLabB 'ł' Tag# EOL
IF FirstPart?
SetStatusOff
END
NextPart
SetStatusOn
StartSub
SeqLabC IncValue EOL
SetFlag('1') {set true, we are in a MP sub}
END
RETURN
CloseMP:
IF EquallySpacedOffsets?
SeqLabC EndSub EOL
CloseSub
SetFlagF('1')
SeqLabC AbsOrInc EOL
END
RETURN
FormatArc:
IF ArcCW?
CWArcC
ELSE
CCWArcC
END
MoveXYZC
IF ArcIJFormat?
ArcIJC
ELSE
ArcRC
END
RETURN
ToolPath:
ResetCRCNum {.72}
EACHFeat
IF PointFeat?
IF AutoCycle?
SeqLabC MoveSXYC EOL
SeqLabC SubCall CallLabB 'ł' Tag# EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
SeqLabC MoveSXYZC EOL {.80.01}
END
ELSE
IF RapidFeat?
IF LastFeat?
SeqLabC CRCOffC RapidC MoveXYZC EOL
ELSE
IF ZMove? {skip CRCOn until first non-Z move line, skipping ramps}
SeqLabC RapidC MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC CRCOnC RapidC MoveXYZC CRCOffsetC EOL
END
END
END
ELSE
IF LineFeat?
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
IF Decelerate?
IF RoomToDecel?
DecelMove1
SeqLabC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
DecelMove2
END
SeqLabC CRCOnC FeedC MoveXYZC DecelFeed CRCOffsetC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
SeqLabC CRCOnC FeedC MoveXYZC FeedRateC CRCOffsetC EOL
END
END
END
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
NEXTFeat
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
SeqLabC CheckAbsOrInc
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
IF FIFO? {.81}
FeedC ZCP2 FeedEntC
ELSE
RapidC ZCP2
END
END
EOL
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
NoReps:
IF AutoCycle?
TagInc
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN
RepAutoCycle:
EachRep
IF FirstCycle?
SeqLabC SubCall CallLabB 'ł' Tag# EOL
Save# Num#('2') Tag#
StartSub
SetFlag('2') {set true, we are in a Repeats sub}
SeqLabC IncValue EOL
NewProg
AutoCycPat
AutoCycCutSub1
EntryMove
AutoCycCutSub2
SeqLabC EndSub EOL
CloseSub
SetFlagF('2')
ELSE
ResetPass2
SeqLabC CheckAbsOrInc StrtPos EOL
SeqLabC SubCall CallLabB 'ł' Recall# Num#('2') EOL
SetSRSubXYRC
END
NextRep
RETURN
RepZOnlyAutoCycle:
AutoCycPat
StartSub
SetFlag('2') {set true, we are in a Repeats sub}
SeqLabC IncValue EOL
NewProg
EachRep
IF FeedConnect?
SeqLabC Feed ZIn FeedEnt EOL
ELSE
IF FeedEntry?
SeqLabC ZCP2C EOL
SeqLabC Feed ZIn FeedEnt EOL
ELSE
SeqLabC ZIn EOL
END
END
SeqLabC SubCall CallLabB 'ł' Tag# EOL
IF FirstCycle?
AutoCycCutSub1 {save substatus at Z depth}
AutoCycCutSub2 {goes to ZCP2}
ELSE
IF NOT FeedConnect?
TrackZNo# ClearancePlane2#
END
END
NextRep
SeqLabC
IF NOT MultipleParts?
AbsOrInc
END
RapidC ZCP2C EOL
SeqLabC EndSub EOL
CloseSub
SetFlagF('2')
IF NOT FeedConnect?
SetStatusRapid
END
RETURN
SetDrillEndOpZ:
IF RetractToCP1?
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
RETURN
SkipToLastFeat:
EachFeat
IF LastFeat?
TrackXNO# SPX#
TrackYNO# SPY#
END
NextFeat
RETURN
DrillStuff:
GetCycle
SeqLabC Cycle FromCP
{ZDepth outputs incorrectly when in incremental and retract from 1st clearance plane}
{ZDepth# will only output absolute values}
IF MultipleParts? OR Repeats?
SetAbs
'Z' SUB# ZDepth# ClearancePlane2# {calculate incremental depth}
SetInc
ELSE
ZDepth
END
RLevel Dwell Peck Retract FeedEnt EOL
IF CallMasterOp?
SeqLabC SubCall CallLabB 'ł' CallMasterNum# EOL
SkipToLastFeat
ELSE
TrackZNO# FIRST SPZ#
IF MasterOp?
NewMasterTag
SeqLabC SubCall CallLabB 'ł' Tag# EOL
StartSub
SeqLabC IncValue EOL
ToolPath
IF NOT Repeats? AND NOT MultipleParts?
SeqLabC AbsOrInc EOL
END
SeqLabC EndSub EOL
CloseSub
ELSE
ToolPath
END
END
SetDrillEndOpZ
RETURN
StdRep:
EachRep
IF FirstCycle?
SubWarning
EntryMove
SeqLabC SubCall CallLabB 'ł' Tag# EOL
StartSub
SetFlag('2') {set true, we are in a Repeats sub}
SeqLabC IncValue EOL
ToolPath
FinishSub1
SaveSubStatus
SeqLabC EndSub EOL
CloseSub
SetFlagF('2')
ELSE
SeqLabC CheckAbsOrInc Connect StrtPos EOL
IF FeedConnect?
SeqLabC ZinC EOL {takes care of different tool path start and end Z values}
ELSE
IF NOT Equal? ClearancePlane2# ClearancePlane3#
SeqLabC ZCP2 EOL
END
EntryMove
END
SeqLabC SubCall CallLabB 'ł' Tag# EOL
SetSRSubXYRC
SetSRSubZRC
END
NextRep
RETURN
CheckPass:
IF AutoCycle? {use the correct StrtPos}
SetPass2
ELSE
SetPass1
END
RETURN
{Start of executable Prog **************************************************}
{setup and initializations}
InitProg
TagInit
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls('50')
SetMaxRPM('10000')
SetMaxFeed('500')
Save# Num#('1') Num#('9999') {first subroutine number}
Save# Num#('2') Num#('0') {Tag number for repeated AutoCycles}
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
EOR 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
CheckPass
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
SeqLab Rapid Plane CRCOff 'G49' DrillOff CheckAbsOrInc EOL
SeqLabC
IF ToolChangeAtHome?
Home
END
OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
DoPostScript
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
ELSE
SeqLabC StrtPos EOL
END
SeqLabC CoolOn EOL
SeqLabC OfstOn Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
SeqLabC CoolOff EOL
SeqLabC Rapid OfstOff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EOL
CloseMP
SeqLabC
END
'M19' EOL
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
{Start new Operation}
SeqLab Rapid Plane CRCOff 'G49' DrillOff CheckAbsOrInc EOL
SeqLabC
IF ToolChangeAtHome?
Home
END
OpToolID EOL
SeqLabC ToolChng EOL
DoOpComments
DoPostScript
CheckPass
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
ELSE
SeqLabC StrtPos EOL
END
SeqLabC CoolOn EOL
SeqLabC OfstOn Speed SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
END
ELSE
IF SameTool?
{Finish off last Operation}
IF LAST ProgStop? OR CoolOff? AND LAST NOT CoolOff?
SeqLabC CoolOff EOL
END
SeqLabC
IF LAST ProgStop? OR NewToolOffset?
Rapid OfstOff
END
IF LAST ProgStop?
SpinOff
END
EOL
DoEndOpPS
IF LAST ProgStop?
SeqLabC 'M0' EOL
END
{Start new Operation}
DoOpComments
DoPostScript
CheckPass
SeqLabC PlaneC Rapid StrtPos EOL
IF LAST ProgStop? OR NOT CoolOff? AND LAST CoolOff?
SeqLabC CoolOn EOL
END
SeqLabC
IF LAST ProgStop? OR NewToolOffset?
OfstOn
END
SpeedC
IF LAST ProgStop?
SpinOn
END
EOL
END
END
END {common point for all operations}
IF Milling?
SeqLabC ZCP2C EOL
IF Repeats?
TagInc
IF AutoCycle?
IF ZshiftOnly?
RepZOnlyAutoCycle
ELSE
RepAutoCycle
END
ELSE {not AutoCycle}
StdRep
END {end Auto Cycle IF}
ELSE {no repeat OPs}
NoReps
END
SeqLabC CheckAbsOrInc
IF AutoCycle?
ZCP3C EOL
ELSE
IF FIFO? {.81}
FeedC CRCOffC ZCP3C FeedEntC EOL
ELSE
RapidC CRCOffC ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
TagInc
EachRep
IF FirstCycle?
DrillClearancePlane
SeqLabC SubCall CallLabB 'ł' Tag# EOL
StartSub
SetFlag('2') {set true, we are in a Repeats sub}
SeqLabC IncValue EOL
DrillStuff
SeqLabC
IF NOT MultipleParts?
AbsOrInc
END
DrillOff ZCP3 EOL
SaveSubStatus
SeqLabC EndSub EOL
CloseSub
SetFlagF('2')
ELSE
SeqLabC Rapid StrtPos EOL
IF RetractToCP1?
IF NOT Equal? ClearancePlane3# ClearancePlane1#
SeqLabC 'Z' ClearancePlane1# EOL {ZCP1 does not output in incremental}
END
ELSE
SeqLabC ZCP2C EOL
END
SeqLabC SubCall CallLab EOL
SetSRSubXYRC
SetSRSubZRC
END
NextRep
ELSE
DrillClearancePlane
DrillStuff
SeqLabC DrillOff ZCP3 EOL
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
SeqLabC Rapid OfstOff
IF MultipleParts? AND OneToolAllParts? AND FullUp?
EOL
CloseMP
SeqLabC
END
'M19' EOL
DoEndOpPS
IF ProgStop?
SeqLabC 'M0' EOL
ELSE
SeqLabC ProgStop EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
SeqLab Rapid Plane CRCOff 'G49' DrillOff AbsOrInc 'Z0.' EOL
SeqLabC
IF FIRST ToolChangeAtHome?
FirstHome
END
UnTool EOL
SeqLabC ToolChng EOL
SeqLabC EOP EOL
'N9999' EOL
SeqLab Rapid IncValue 'X-2.Y-2.Z-2.' EOL
SeqLabC 'G28X0.Y0.Z0.' EOL
SeqLabC Rapid 'X-0.Y-0.' EOL
SeqLabC AbsOrInc Preset 'X0.Y0.Z0.' EOL
SeqLabC EOP EOL
CloseSub
Post2 {organize Subs into one program}
EOR 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:
Yasnac 3000G [JD] M837 81Yasnac 2000B MS ( ) L061 85Yasnac 3000G [LM] M504 81 2Yasnac LX1 MS L010 85 1mYasnac LX1 HS L011 85Yasnac 3000G Mat ATT MX27 89 1Yasnac 3000G Mat [CC] M619 89Yasnac 2000B MS (3) L068 85Yasnac 3000G Mat[DTM] M650 87Yasnac 3000G Mat M016 87Yasnac LX1 HS (r) L210 85Yasnac 3000G [DM] M181 15 2W & S 2SC AB 7360 JD L380 85 1mW & S 2SC AB 7360 JD L380 85 1mYasnac 2000GII MS SL2 L032 85Yasnac LX3 MS SL 25 L277 85więcej podobnych podstron