Bandit IIM Shiz (NCE) M262 81 2


{ 8/31/88 }
{ updated Bandit IIA M006.53 for N.C. Engineering }
{ go to ZCP1C before OfstOff }
{ minor change to begin & end every program }
{ Z negative value for peck }
{ use G89 routine if drilling and retract to ZCP1 }
{ deleted preset toolchange positions between tools }
{ Jim Radcliffe }

{12/2/88
General change to all Bandits.
Deleted: CRCOnC & CRCOffsetC commands from 6 places in ToolPath.
Added Comments.
Changed FormatArc to unconditionaly move X & Y & I & J
Jim Radcliffe}

{6/20/89
Modified; Bandit IIA Shiz (NCE) M153.57.
Change "AbsValue" in first operation to "AbsOrInc".
Jim Radcliffe}

{10/12/89
Modified: Bandit IIA Shiz (NCE) M153.58
For: N.C. Enginerring
Changed "/Z" to "Z" in Drilling format Bore (G82).
Jim Radcliffe}

{1/10/90, Updated: Bandit IIA Shiz (NCE) M153.59, to .69 format, JR}

{7/24/90, Added InitProg globally to posts with this remark, DWB}
{7/24/90, Replaced all occurances of SetSRXYZero with SetSRXYtoSP, DWB}

{2/14/91, Updated Bandit IIA Shiz (NCE) M153.70 to .76.1 format.
Changed "/Z" to "Z" in Drilling format Tap (G84).
Corrected Dwell format.
Feedrate must be on line by itself, all conditions corrected.
Modified Operation Comments, put Tool Comments and suppress if SameTool.
A G code must be the last entry on a line, all conditions corrected.
NOTE: cannot do helical interpolation on this machine
NOTE: The first clearance plane for all non-SameTool operations must be the same for the Tool Offsets to Work properly.
NOTE: The commands Feed & Rapid have no output.
NOTE: The literal N001 at the beginning of the program is for loading program into control.
NOTE: Must call MarkSub for each time the sub will be called to get proper call commands.
NOTE: ***BUG***
The Renum Command when resequncing due to sub output:
* Removes the empty line at beginning of program
* Counts the literal N001 at the beginning of the program as a command.
* Calls incorrect sub numbers in nested sub output.
* Counts Comments as commands.
* Gives all N's a number, including inside comments & the literal N001.
Jim Radcliffe}

{7/1/91, Updated Bandit IIA Shiz (NCE) M153.76.1 to .80 format, JR}

{3/5/91
Modified: Bandit IIA Shiz (NCE) M153.80
Deleted the literal CR & N001 from the beginning of the output.
NOTE these will have to edited in.
Added ZCP2 to G92 sub,
NOTE this should be fixed in all processors as the ZCP2 is not output to the sub.
Jim Radcliffe}

{3/5/91
Copied & modified: Bandit IIA Shiz (NCE) M153.80.1
Machine: Bandit: manual tool change & auto RPM
Changed AutoTool to 'M6'
Deleted the untool sequence from end of program
Jim Radcliffe}

{6/30/93
Modified: Bandit iiM Shiz .80.1
Changed EntryMove sub to use FeedEntC output for SameTool
Jim Radcliffe}

{9/3/93
Modified: Bandit IIM Shiz .80.2
Changed ZDepth to ZDepth# in Drilling,
This processor uses incremental drill depths,
ZDepth outputs from ZCP1 when RetractToCP1 is selected,
ZDepth# works OK
Updated to .81.2 format.
Jim Radcliffe}


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

#1 = '0.00'
#2 = '###.###;0.'
#3 = '*###.###;0.'
#4 = '####.####;0.'
#5 = '#######0'
#6 = '##.##;0.'

FORMAT(FileFeet#,1)
FORMAT(FileMeters#,1)
FORMAT(ToolDiameter#,4) {.72}
FORMAT(ZDepth#,4)
FORMAT(Program#,5) {.72}
FORMAT(Operation#,5) {.72}
FORMAT(Tool#,5) {.72}
FORMAT(Parts#,5) {.72}
FORMAT(Dwell#,6) {.72}


{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: ' Program# ' )' EOL
END
RETURN

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

PSInit: {reset flags}
RotateF
RETURN

PSStuff: {revised.72}
IF FourthCW?
FORMAT(FourthDegree#,2)
'A' FourthDegree# EOL
FourthCWF {reset flag}
END
IF FourthCCW?
FORMAT(FourthDegree#,3)
'A' FourthDegree# EOL
FourthCCWF {reset flag}
END
IF FifthCW?
FORMAT(FifthDegree#,2)
'B' FifthDegree# EOL
FifthCWF {reset flag}
END
IF FifthCCW?
FORMAT(FifthDegree#,3)
'B' FifthDegree# EOL
FifthCCWF {reset flag}
END
RETURN

DoPostScript:
PSInit
EachPS
PostScript EOL {literals}
PSStuff {commands}
NextPS
RETURN

DoEndOpPS:
PSInit
EachEOPS
EndOpPS EOL {literals}
PSStuff {commands}
NextPS
RETURN

EntryMove:
IF FeedEntry?
IF SameTool?
FeedEntC EOL
ELSE
FeedEnt EOL
END
Feed ZInC EOL
ELSE
Rapid ZInC EOL
END
RETURN

StartSub:
OpenSub
MarkSub
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:
CallLabB EOL
RepLab RepCycs EOL
'N' EOL
StartSub
RETURN

FinishSub1: {part 1}
IF NOT FeedConnect?
IF AutoCycle?
ZCP3C EOL
ELSE
IF FIFO? {.81}
FeedEntC EOL
FeedC ZCP3C EOL
ELSE
RapidC ZCP3C EOL
END
END
END
RETURN

FinishSubG92: {part 2}
Feed
ShiftRC Preset EOL
EndSub EOL
CloseSub
UnshftRC Preset EOL
RETURN

OpenMP:
IF EquallySpacedOffsets?
CallLabB EOL
RepLab Parts EOL
'N' EOL
StartSub
END
RETURN

CloseMP:
IF EquallySpacedOffsets?
Feed
ShiftPC Preset EOL
EndSub EOL
CloseSub
UnshftPC Preset EOL
END
RETURN

FormatArc:
IF XMove? AND YMove?
IF ArcCW?
CWArcC {no output}
ELSE
CCWArcC {no output}
END
MoveXY MoveZC
IF ArcIJFormat?
ArcIJ
ELSE
ArcRC
END
ELSE
Feed MoveXYZC
END
RETURN

ToolPath:
EACHFeat
IF PointFeat?
IF AutoCycle?
MoveSXYC EOL
CallLabB EOL
CalcACSRXY {calc tool position after sub call, CalcAutoCycleStatusRecordXY}
ELSE
IF NOT FirstFeat?
MoveSXYC EOL
IF RetractToCP1?
MoveSXYC EOL
'G89' EOL
Rapid ZCP2 EOL
'G80' EOL
Rapid ZCP1 EOL
END
END
END
ELSE
IF RapidFeat?
IF XMove? OR YMove? OR ZMove?
Rapid MoveXYZC EOL
END
ELSE
IF LineFeat?
IF Decelerate?
IF RoomToDecel?
DecelMove1
FeedRateC EOL
Feed MoveXYZC EOL
DecelMove2
END
DecelFeed EOL
Feed MoveXYZC EOL
ELSE
IF XMove? OR YMove? OR ZMove?
FeedRateC EOL
Feed MoveXYZC EOL
END
END
ELSE
IF ArcFeat?
EACHQuadrant
IF LastQuadrant? AND Decelerate?
IF RoomToDecel?
DecelMove1
ArcFeedC EOL
FormatArc EOL
DecelMove2
END
DecelFeed EOL
FormatArc EOL
ELSE
ArcFeedC EOL
FormatArc EOL
END
NEXTQuadrant
END
END
END
END
NEXTFeat
RETURN

AutoCycCutSub1: {part 1}
SaveSubStatus {save tool position}
SetPass1 {element cut moves}

{StartSub}
OpenSub
SetPass2 {position pattern}
EachFeat
MarkSub
NextFeat
SetPass1 {element cut moves}
DoSubComment

SetSRXYtoSP
IncValue EOL
RETURN

AutoCycCutSub2: {part 2}
ToolPath
IF Repeats? AND FeedConnect? AND ZshiftOnly?
AbsOrInc EOL {.69 removed RapidC}
ELSE
AbsOrInc EOL
IF FIFO? {.81}
FeedEntC EOL
FeedC ZCP2 EOL
ELSE
RapidC ZCP2 EOL
END
END
EndSub EOL
CloseSub
SetSRSubXY {restore tool position}
SetSRSubMove
RETURN

AutoCycPat:
SetPass2 {position pattern}
ToolPath {call after NewProg for correct sub calls}
SetPass1 {reset}
RETURN

Milling:
IF AutoCycle?
NewProg
AutoCycCutSub1
EntryMove
AutoCycCutSub2
AutoCycPat
ELSE
EntryMove
ToolPath
END
RETURN

G92Sub:
SubWarning
StdSub
Connect StrtPos EOL
IF NOT FeedConnect? {then Entry/Exit connect}
IF FeedEntry? {CP2 not needed for Rapid Entry, outputs consecutive Z rapid moves}
ZCP2 EOL
END
END
Milling
FinishSub1
FinishSubG92
RETURN

ZonlyRepAutoCycle:
AutoCycPat {write pattern moves and main calls}

{StartSub}
OpenSub
EachCycle
MarkSub
NextCycle
DoSubComment

NewProg
EachCycle
IF FeedConnect?
FeedEnt EOL
Feed ZInPlusInc EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
Rapid ZCP2PlusInc EOL {.69 added Rapid, reads better}
{can't call for cycle = 1, .69 changed to ZCP2PlusInc}
END
FeedEnt EOL
Feed ZInPlusInc EOL
ELSE
Rapid ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
IF FirstCycle?
SetStatusOff {protect Z position for incremental sub}
END
CallLabB 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}
FeedEnt EOL
Feed ZCP2 EOL
ELSE
Rapid ZCP2 EOL
END
END {.69}
EndSub EOL
CloseSub
{Element shift, not pattern}
RETURN

ZonlyRep:
EachCycle
IF NOT FirstCycle?
Connect StrtPos EOL
END
IF FeedConnect?
FeedEnt EOL
Feed ZInPlusInc EOL
ELSE
IF FeedEntry?
IF NOT FirstCycle?
Rapid ZCP2PlusIncC EOL {can't call for cycle =1}
{.69 added Rapid, reads better}
END
FeedEnt EOL
Feed ZInPlusInc EOL
ELSE
Rapid ZInPlusInc EOL {.69 added Rapid, reads better}
END
END
CallLabB EOL
NextCycle

{StartSub}
OpenSub
EachCycle
MarkSub
NextCycle
DoSubComment

SkipZ
ToolPath
UnSkipZ
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 **************************************************}

InitProg
ReverseXZArcs
SetFlood
UseSeparateSubCalls
SetMaxSeparateSubCalls ('50') {?}
SetMaxRPM('3800')
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
' 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
IF FirstOperation?
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
IF ToolChangeAtHome?
SetHome
END
OpenSub
RestoreScale
'G70' EOL
AbsOrInc EOL
Feed Home Preset EOL
IF MultipleParts? AND AllToolsOnePart?
OpenMP
END
DoOpComments
DoPostScript
Plane {no output}
SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
Rapid StrtPos EOL
OfstOnB EOL
Feed ZCP1 Preset EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP Rapid StrtPos EOL
END
ELSE
IF NewTool?
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
ZCP1C EOL
OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
SpinOff EOL
IF ToolChangeAtHome?
Rapid Home EOL
END
IF LAST ProgStop?
'M0' EOL
END
'M6' EOL

{Start new Operation}

DoOpComments
DoPostScript
Plane {no output}
SpinOn EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
OpenMP
END
CheckPass
SpeedB Rapid StrtPos EOL
OfstOnB EOL
Feed ZCP1 Preset EOL
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
OpenMP Rapid StrtPos EOL
END
ELSE
IF SameTool?
DoEndOpPS
IF LAST ProgStop?
OfstOff EOL
SpinOff EOL
Rapid Home EOL
'M0' EOL

{Start new Operation}

GetStartOfSameTool
Plane {no output}
SpinOn EOL
SpeedB Rapid StrtPos EOL
OfstOnB EOL
Feed ZCP1 Preset EOL
ELSE
GetStartOfSameTool
PlaneC EOL
SpeedB Rapid StrtPos EOL
END
END
END
END
IF Milling?
Rapid 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?
ZCP3C EOL
ELSE
IF FIFO? {.81}
FeedEntC EOL
FeedC ZCP3C EOL
ELSE
Rapid ZCP3C EOL
END
END
ELSE
IF Drilling?
IF Repeats?
NewProg
StdSub
Rapid StrtPos EOL
END
Rapid ZCP2C EOL
GetCycle
FeedEnt EOL
IF Peck?
'/'
END
'Z' ZDepth# Dwell Peck Retract Cycle EOL
StrtPos EOL
IF RetractToCP1?
'G80' EOL
Rapid ZCP1 EOL
END
TrackZNO# ZDepth# {.81}
ToolPath
IF RetractToCP1? {.81}
TrackZNO# ClearancePlane1#
ELSE
TrackZNO# ClearancePlane2#
'G80' EOL
END
Rapid ZCP3C EOL
IF Repeats?
FinishSubG92
END
Rapid ZCP3C EOL
END
END
NEXTOp
IF MultipleParts? AND OneToolAllParts? AND ExitClearancePlane?
CloseMP
END
ZCP1C EOL
OfstOff EOL
IF MultipleParts? AND OneToolAllParts? AND FullUp?
CloseMP
END
DoEndOpPS
SpinOff EOL
IF FIRST ToolChangeAtHome?
Rapid FirstHome EOL
END
IF ProgStop?
'M0' EOL
END
IF MultipleParts? AND AllToolsOnePart?
CloseMP
END
EOP EOL
Post
Close
IF UseComments?
SetScale('1')
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 IIM MDR NoS M595 81 7m
Bandit IIIA Kas [AP] M375 81 2
Bandit IIIA Shiz [DM] MV31 89 3
Bandit IIM (No Z) M225 79
Fanuc 6M Shiz [DDM] M272 81
Bandit IIIM SMax M024 81
Fanuc 10M (AGA) M147 81 2
Bandit IV AB [DM] MV32 89 1
Tosnuc 600M VMC 45 M442 81 3
DM 81 Diper Kenwooda
BP IIA (HAC) M200 81
30 (81)
Artran Contour MV83 81

więcej podobnych podstron