{Change Comments ***********************************************************}
{12/2/88
General change to all Bandits.
Deleted CRCOnC and CRCOffsetC from ToolPath.
Added Comments.
Changed FormatArc to unconditionaly move X & Y & I & J
JR}
{6/20/89
Modified: Bandit IIIM SMax M024.55
Changed AbsValue to AbsOrInc in FirstOperation.
JR}
{7/24/90, Added InitProg globally to posts with this remark, DWB}
{10/14/91
Modified: Bandit IIIM SMax M024.57
For: Gibbs & Associates
Updated to Version 4.1 per Fanuc 6M M001.81 Format.
Due to a bug with nested subs and the MarkSub command, the second level subs, ( element cut moves ),
output for AutoCycles with Repeats is being suppressed until after all operations have been
output, and then a second EachOp/NextOp loop is handled to output the second level subs.
DWB}
{Prog Numeric Format Definitions *******************************************}
#1 = '#.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '########;0'
#6 = '*####.####;0.'
FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(Retract#,4)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(Dwell#,4) {.72}
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(NewWFO#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(SUB#,6)
{Prog Subroutines **********************************************************}
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
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
END
RETURN
PSInit: {reset flags}
RETURN
PSStuff: {revised.72}
RETURN
DoPostScript:
PSInit
EachPS
PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN
DoEndOpPS:
PSInit
EachEOPS
EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN
EntryMove:
CRCOnC EOL
Rapid { No Output }
IF FeedEntry?
Feed { No Output }
FeedEnt EOL
END
ZIn EOL
FeedRate EOL
RETURN
StartSub:
OpenSub
DoSubComment
MarkSub
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:
CallLabB EOL
RepLab RepCycs EOL
'N' EOL
StartSub
RETURN
FinishSub1: {part 1}
IF NOT FeedConnect?
Rapid { No Output }
IF NOT AutoCycle?
IF FIFO? {.81}
FeedC { No Output }
FeedRateC EOL
END
END
ZCP3C EOL
END
RETURN
FinishSubG92: {part 2}
Feed ShiftRC Preset EOL
EndSub EOL
CloseSub
Feed UnshftRC Preset EOL
RETURN
OpenMP:
NewProg
IF EquallySpacedOffsets?
CallLabB EOL
RepLab Parts EOL
'N' EOL
StartSub
EachPart
IF NOT FirstPart?
MarkSub
END
NextPart
ELSE
IF FirstOperation?
' ***** This Post Processor does not support Work Fixture Offsets. *****' EOL
' ***** Please select Equally Spaced Offsets for Multiple Parts. *****' EOL
END
END
RETURN
CloseMP:
IF EquallySpacedOffsets?
ShiftPC Preset EOL
EndSub EOL
CloseSub
UnshftPC Preset EOL
END
RETURN
FormatArc:
IF ArcCW?
CWArcC { No Output }
ELSE
CCWArcC { No Output }
END
MoveXY MoveZC ArcIJ
RETURN
StdLine: {enables CRC on first call, .70}
IF Decelerate?
IF RoomToDecel?
DecelMove1
MoveXYZC FeedRateC EOL
DecelMove2
END
MoveXYZC DecelFeed EOL
ELSE
IF XMove? OR YMove? OR ZMove?
MoveXYZC FeedRateC EOL
END
END
RETURN
ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
MoveSXYC EOL
CallLabB EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF FirstFeat?
MoveSXYC EOL {.80.01}
ELSE
IF NotEqual? SPZ# LAST SPZ#
DrillOff EOL
SetStatusOff
MoveSXYC EOL
SetStatusOn
IF NOT FIRO?
'/'
END
'Z'
IF RetractToCP1?
SUB# ClearancePlane1# SPZ#
ELSE
SUB# ClearancePlane2# SPZ#
END
Dwell Peck
IF PeckChipBreaker?
'Z' Retract#
END
Cycle EOL
FeedEnt EOL
END
MoveSXYC EOL {.80.01}
END
END
ELSE
IF RapidFeat?
RapidC { No Output }
MoveXYZC EOL
ELSE
IF LineFeat?
FeedC { No Output }
StdLine
ELSE
IF ArcFeat?
EACHQuadrant { Do not use NOT, FIRST, LAST or NEXT modifiers in this loop }
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
FormatArc ArcFeedC EOL
DecelMove2
END
FormatArc DecelFeed EOL
ELSE
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
IF NOT Repeats?
ReSetPass2
EachFeat { To control SubCall value }
IF NOT FirstFeat?
MarkSub
END
NextFeat
ReSetPass1
END
SetSRXYtoSP
IncValue EOL
CRCOnC EOL
RETURN
AutoCycCutSub2: {part 2}
ToolPath
AbsOrInc EOL
IF Repeats? AND FeedConnect? AND ZshiftOnly?
ELSE
RapidC { No Output }
IF FIFO? {.81}
FeedC { No Output }
FeedRateC EOL
END
ZCP2 EOL
END
CRCOffC EOL
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?
IF NOT Repeats?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
END
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN
G92Sub:
SubWarning
StdSub
Connect { No Output }
StrtPos EOL
Milling
FinishSub1
CRCOffC EOL
FinishSubG92
RETURN
ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}
StartSub
ReSetPass2
EachFeat { To control SubCall value }
IF NOT FirstFeat?
MarkSub
END
NextFeat
ReSetPass1
EachCycle
Rapid { No Output }
IF FeedConnect?
Feed { No Output }
FeedEnt EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
ZCP2PlusInc EOL
END
Feed { No Output }
FeedEnt EOL
END
END
ZInPlusInc EOL
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
CallLabB EOL
NextCycle
SetStatusOn
{.69, removed FinishSub1}
IF FeedConnect? {there is no Z up in the sub, .69}
Rapid { No Output }
IF FIFO? {.81}
Feed { No Output }
FeedRateC EOL
END
ZCP2 EOL {.69}
ELSE {.81}
TrackZNO# ClearancePlane2#
END {.69}
EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN
ZonlyRep:
EachCycle
IF NOT FirstCycle?
Connect { No Output }
StrtPos EOL
END
CRCOnC EOL
RapidC { No Output }
IF FeedConnect?
FeedC { No Output }
FeedEnt EOL
ELSE {Entry/Exit Connect}
IF FeedEntry?
IF NOT FirstCycle?
ZCP2PlusIncC EOL
END
Feed { No Output }
FeedEnt EOL
END
END
ZInPlusInc EOL
CallLabB EOL
NextCycle
StartSub
EachCycle { To control SubCall value }
IF NOT FirstCycle?
MarkSub
END
NextCycle
SkipZ
ToolPath
UnSkipZ { Moved from FinishSub1 }
FinishSub1
EndSub EOL
CloseSub
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
ReverseXZArcs
SetFlood
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
END
EachOp {Start of post processing *********************}
IF FirstOperation?
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 IN SPINDLE )' EOL
END
END
OpenSub
IF Metric? {CAM file is in Metric, tools and tool path}
SetScale('.03937007874') { change to English, this is an English post}
END
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
Plane Rapid { No Output }
DoOpComments
DoPostScript
SpinOn EOL
AbsOrInc EOL
Home Preset EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
StrtPos EOL
OfstOnB3 EOL
ZCP1 Preset EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
StrtPos EOL
END
ELSE
IF NewTool?
{Finish off last Operation}
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
Rapid { No Output }
Home EOL
SpinOff EOL
{Start new Operation}
Plane Rapid { No Output }
ToolChng EOL
DoOpComments
DoPostScript
SpinOn EOL
AbsOrInc EOL
Home Preset EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
StrtPos EOL
OfstOnB3 EOL
ZCP1 Preset EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP
StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
Plane Rapid { No Output }
IF LAST ProgStop?
OfstOff EOL
SpinOff EOL
{Start new Operation}
GetStartOfSameTool
SpinOn EOL
StrtPos EOL
OfstOnB3 EOL
ZCP1 Preset EOL
ELSE
IF NewToolOffset?
OfstOff EOL
{Start new Operation}
GetStartOfSameTool
StrtPos EOL
OfstOnB3 EOL
ZCP1 Preset EOL
ELSE
{Start new Operation}
GetStartOfSameTool
StrtPos EOL
END
END
END
END
END {common point for all operations}
IF Milling?
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
RapidC { No Output }
IF NOT AutoCycle?
IF FIFO? {.81}
Feed { No Output }
FeedRateC EOL
END
END
ZCP3C EOL
CRCOffC EOL
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
StrtPos EOL
END
DrillCP EOL
GetCycle
ZDepth Dwell Peck
IF PeckChipBreaker?
'Z' Retract#
END
Cycle EOL
FeedEnt EOL
StrtPos EOL
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
END
DrillOff EOL
IF Repeats?
FinishSubG92
END
RapidC { No Output }
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
OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
Rapid { No Output }
FirstHome EOL
SpinOff EOL
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
EOP EOL
CloseSub
EachOp {Start of nested subs *************************}
IF AutoCycle? AND Repeats?
NewProg
SaveSubStatus {save tool position}
SetPass1 {element cut moves}
StartSub
IF ZshiftOnly?
EachCycle { To control SubCall value }
IF FirstCycle?
TrackZNO# ZInPlusInc#
ELSE
MarkSub
END
NextCycle
ELSE {not Z only}
ResetPass2
EachFeat { To control SubCall value }
IF NOT FirstFeat?
MarkSub
END
NextFeat
ResetPass1
END {end Z only IF}
SetSRXYtoSP
IncValue EOL
CRCOnC EOL
IF ZshiftOnly?
FeedRate EOL
ELSE {not Z only}
EntryMove
END {end Z only IF}
AutoCycCutSub2
END
NextOp {End of nested subs ***************************}
Post2 {organize Subs into one program}
Close
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
Renum
Wyszukiwarka
Podobne podstrony:
Bandit IIIM Shizouka M009 79Bandit IIIA Kas [AP] M375 81 2Bandit IIM Shiz (NCE) M262 81 2Bandit IIM MDR NoS M595 81 7mFanuc 10M (AGA) M147 81 2Bandit IV AB [DM] MV32 89 1Tosnuc 600M VMC 45 M442 81 3DM 81 Diper KenwoodaBP IIA (HAC) M200 8130 (81)Artran Contour MV83 81Yas MX3 Mat [AbsZAC] M591 81 2T81 2Bandit II Phaser L292 82 2node S0281więcej podobnych podstron