PcRobotic
-
Posts
913 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Posts posted by PcRobotic
-
-
Hello everyone,
I've been asking this question quite a few times but did not get the right answer from the dealer... I like Dynamic, Area Millings but I would like to control the ENTRY POINT so my tool won't plunge into the material. Is there any trick to learn the material for the DYNAMIC MILLING and AREA MILLING....?PS: See image below.
Thanks.
-
On 2/24/2019 at 10:58 PM, hlibhlib said:
I realized it was a bad idea. Thanks for your help.
Very sorry for the lost time.
I think this may help you.
N5(OPERATION COMMENT HERE)
G0 G17 G40 G49 G80 G90
G91 G28 Z0.
T6 M6(TOOL DESCRIPTION HERE)
/G28 Y0. M8 (TURN ON BLOCK DELETE FOR NOT MOVING Y AND COOLANT TURNS OFF WHEN SETUP MODE)
G0 G90 G54 X0 Y0 S7500 M3
G43 H6 Z1.
(YOUR CUT BEGINS HERE)
G0 Z1. M9
G91 G28 Z0. M5
/G28 Y0. (TURN ON BLOCK DELETE FOR NOT MOVING Y)
-
On 1/31/2019 at 12:21 AM, jeff.D said:
Some of the comments put portions of that code as being added '03. I'm guessing the rest of logic is older than that.
Code ages, and I really think you should investage some of the new methods MP has to offer.
Good morning Jeff.D,
Thank you for your valuable time to help me with this BUFFER. After 3 weeks, 2 hours a day and I have came up with this result (please see below). I think I am 90% completion and I am having 1 more issue. It is the tools list truncated the last tool, I guess my knowledge of writing post is very limited and I hope that guys can point out that I have been blinding.Best regards,
S.Luong======================= G-Codes ========================
%
O2531(000-561-6253-002 - OP1.NC)
(SOURCE = 000-561-6253-002.MCAM)
(VERTICAL INDEX)
(PART NAME= SQUARE BLOCK)
(UNPROVEN SOURCE FILE)
(*)
(POSTED ON FEB.15.2019 AT 10*26AM)
(POSTED BY= PCROBOTIC\ADMIN)
(ALUM 6061-T6, BAR STOCK= X.63 Y2.00 Z3.30)
(VERTICAL INDEX)
(*)
(TOOLS LIST, OP1 = 6 TOOLS)
(T1= 2.0000, 2" SHM 90DEG * STO= .015) ======================> This is correct
(T2= .5000, 1/2 EM * STO= -.515)======================> This is correct
(T3= .5000, 1/2 SPOTTER * STO= -.2056)======================> This is correct
(T4= .2810, LTR. K STUB DRILL * STO= -.7044)======================> This is correct
(T5= .4063, 13/32 STUB DRILL * STO= -.742)======================> This is correct
(T6 = .5000, 1/2 BULL EM * STO= ......) =======> MISSING THIS TOOL (DEPTH IS NOW SHOWN.....)
(*)
(WORK OFFSET LIST)
(G54)
(XY0= CENTER)
(Z0 = TOP OF STOCK)
( Z-.015 MINIMAL CLEAN UP)
(*)
N1(2.0000,2" SHM 90DEG, FIN, CB,)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19(Z STK= .015)
/G28 Y0.(TOOLPATH ZCLEARANCE= .05 MIN.)
T1 M6(2D TOOLPATHS - FACING, CUT#1)
G90 G54 S4500 M3(1.5 MAX., 75PERC STPOVR)
X-3.85 Y.4999 T2(NEXT TOOL)
G43 H1 Z1.(DOC1= Z.015, .015DP) ======================> This is correct
M8 G17(XY PLANE) G90 Z.0775
G1 Z.015 F100.
X2.85
Y-.4999
X-3.85
G0 Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N2(.5000,1/2 EM, U, CB, 1.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19(XY STK= .015)
/G28 Y0.(DYNAMIC MILL)
T2 M6(ROUGH OUT PROFILE, CUT#2)
G90 G54 S7500 M3(.075 STOVR, 15.PERC TDIA.)
X-1.7969 Y-1.2651 T3(NEXT TOOL)
G43 H2 Z1.(DOC1= Z-.515, .015DP, .015 THRU) ======================> This is correct
M8 G17(XY PLANE) G90 Z.0625
G1 Z-.505 F200.
X-1.8121 Y-1.2262 Z-.5097
G3 X-1.8374 Y-1.1874 Z-.515 I-.1049 J-.0408
(CUTTING....)
G3 X1.7629 Y-1.0412 Z-.5097 I.1109 J-.0191
G1 X1.773 Y-1.0818 Z-.505
G0 Z1.
M9(PROGRAM JUMPS HERE)
(*)
N202(.5000,1/2 EM, U, CB, 1.00STO)
(ROUGH OUT .150 CHAMFER, CUT#3)
G0 G17(XY PLANE) G90 G54 S7500 M3
X-2. Y-1.205(3D XYZ STK= .025)
G43 H2 Z1.(DOC2= Z-.1196, .015DP)======================> This is correct
M8 Z.0931
G1 Z.015 F200.
(CUTTING...)
X-1.5
X1.5
X2.
G0 Z-.0571
Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N3(.5000, 1/2 SPOTTER, HSS, 1.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T3 M6(SPOT 2X, CUT#4)
G90 G54 S3500 M3
X-.9 Y.65 T4(NEXT TOOL)
G43 H3 Z1.(DOC1= Z-.1425, .015DP)======================> This is correct
M8 G17(XY PLANE) G90 Z.125
(2X SPOTS, .285'CSINK SIZE)
G99 G81 Z-.1425 R.125 F5.
X.9
G80
Z1.
M9(PROGRAM JUMPS HERE)
(*)
N302(.5000, 1/2 SPOTTER, HSS, 1.00STO)
(SPOT 2X, CUT#5)
G0 G17(XY PLANE) G90 G54 S3500 M3
X-.979 Y-.414
G43 H3 Z1.(DOC2= Z-.2056, .015DP)======================> This is correct
M8 Z.125
(2X SPOTS, .4112'CSINK SIZE)
G99 G81 Z-.2056 R.125 F5.
X.987 Y-.352
G80
Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N4(.2810, LTR. K STUB DRILL, HSS, 1.75STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T4 M6(DRILL 2X .281 +.006 - .001, CUT#6)
G90 G54 S6600 M3
X-.9 Y.65 T5(NEXT TOOL)
G43 H4 Z1.(DOC1= Z-.7044, .015DP)======================> This is correct
M8 G17(XY PLANE) G90 Z.125
(2X DRILL HOLES)
(8 PECKS, W.0944 THRU, -.7044 PIN DEPTH)
G99 G83 Z-.7044 R.125 Q.0937 F25.
X.9
G80
Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N5(.4063, 13/32 STUB DRILL, HSS, 2.25STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T5 M6(DRILL .407 +.006 - .001, CUT#7)
G90 G54 S4568 M3
X-.979 Y-.414 T1(NEXT TOOL)
G43 H5 Z1.(DOC1= Z-.742, .015DP)======================> This is correct
M8 G17(XY PLANE) G90 Z.125
(2X DRILL HOLES)
(6 PECKS, W.1321 THRU, -.7421 PIN DEPTH)
G99 G83 Z-.742 R.125 Q.1357 F25.
X.987 Y-.352
G80
Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N102(2.0000,2" SHM 90DEG, FIN, CB,)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.(TOOLPATH ZCLEARANCE= .06 MIN.)
T1 M6(FINISH TOP SURFACE, CUT#8)
G90 G54 S4500 M3(1.5 MAX., 75PERC STPOVR)
X-3.85 Y.4999 T2(NEXT TOOL)
G43 H1 Z1.(DOC1= Z0., .015DP, .015 THRU)======================> This is correct
M8 G17(XY PLANE) G90 Z.0775
G1 Z0. F100.
X2.85
Y-.4999
X-3.85
G0 Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N203(.5000,1/2 EM, U, CB, 1.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19(1X, RMULTI-PASS, .015)
(1X, FINISH MULTI-PASS, .005)
/G28 Y0.
T2 M6(FINISH PROFILE, CUT#9)
G90 G54 S7500 M3
X2.005 Y.0025 T6(NEXT TOOL)
G43(D2)H2 Z1.(DOC1= Z-.515, .015DP, .015 THRU)======================> This is correct
M8 G17(XY PLANE) G90 Z.0625
G1 Z-.515 F50.
G41 D2 X1.8282 Y.1793
(CUTTING...)
G1 G40 X2. Y-.1225 F25.
G0 Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N6(.5000,1/2 BULL EM, .030RAD, RG, CB, 1.25STO)
G0 G17 G40 G49 G80 G90(.001 3D MAX STOVR)
(3D MAX STOVR)
G91 G28 Z0 M19
/G28 Y0.(TOOLPATH ZCLEARANCE= .06 MIN.)
T6 M6(FINISH 3D CHAMFER, CUT#10)
G90 G54 S7500 M3
X-2. Y-1.1904 M8 T1(NEXT TOOL)
G43 H6 Z1.(DOC1= Z-.515, .015DP) ================== Depth of Cut is also wrong, it should be Z-.157
G17(XY PLANE) G90 Z-.0955
G1 Z-.158 F100.
X-1.5
X1.5
X2.
X2.0007 Y-1.1898 Z-.1573
X-1.5 Y-1.1894 Z-.157
(CUTTING...)
X-1.5 Y-1.0424 Z-.01
X-2.
X-2.0006 Y-1.0422 Z-.0097
X-2. Y-1.0414 Z-.009
X2.
G0 Z.0535
Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
T1 M6(FIRST PROGRAMMED TOOL)
M30
%(19,561 CHARACTERS = 19.62KB)=================================== Defined========================================
# --------------------------------------------------------------------------
# General Output Settings
# --------------------------------------------------------------------------
X_limits : no$ # Output the X axis limits
Y_limits : no$ # Output the Y axis limits
Z_limits : yes$ # Output the Z axis limitstoolable_XYZ : yes$ # Output Axis limit comments in tooltable?
toolchange_XYZ : yes$ # Output Axis limit comments at toolchanges?
overall_XYZ : yes$ # Output Axis limit values for the 'entire program'
#Region Define Number Constants#Define Number Constants
m_one : -1 #Define constant
zero : 0 #Define constant
one : 1 #Define constant
two : 2 #Define constant
three : 3 #Define constant
four : 4 #Define constant
five : 5 #Define constant
six : 6 #Define constant
seven : 7 #Define constant
eight : 8 #Define constant
nine : 9 #Define constantc9k : 9999 #Define constantbug4$ : -1 #Debug output with the tilde '~'.
#A value greater the zero applies the variable formatting with
#debug output (default is typically FS 1 but not a guarantee).
#A value of zero gets the value directly with NO formatting.m_c9k : -99999 #Define constant
#Region Customed Misc Strings
# --------------------------------------------------------------------------
# Customed Misc strings
# --------------------------------------------------------------------------
sdlm : " - "
sopn : "("
scls : ")"stoollib : ""
scurop : ""
sunit : ""
#Region Buffer 4
# --------------------------------------------------------------------------
# Buffer definition (for Max/Min X,Y,Z storage)
# --------------------------------------------------------------------------
rc4 : 2 #Buffer 4 READ pointer (YES, '2' is correct for this case!)
wc4 : 1 #Buffer 4 WRITE pointer
size4 : 0 #To hold 'size' of Buffer 4b4_gcode : 0 #Stored in Buffer #4
b4_tcode : 0 # "
b4_xmax : 0 # "
b4_xmin : 0 # "
b4_ymax : 0 # "
b4_ymin : 0 # "
b4_zmax : 0 # "
b4_zmin : 0 # "fbuf 4 0 8 0 0 #Declare Buffer1 to hold Min/Max X,Y,Z axis info.
#EndRegion Buffer 4
#EndRegion Buffer 4
#Region Common user-defined variable initializations (not switches!)
# --------------------------------------------------------------------------
# Common User-defined Variable Initializations (not switches!)
# --------------------------------------------------------------------------
sav_rc4 : 0# --------------------------------------------------------------------------
# Toolchange / NC output Variable Formats
# --------------------------------------------------------------------------
fmt 2 max_Xpos
fmt 2 min_Xpos
fmt 2 max_Ypos
fmt 2 min_Ypos
fmt 2 max_Zpos
fmt 2 min_Zpos#Region Start of file
# --------------------------------------------------------------------------
# Start of File and Toolchange Setup
# --------------------------------------------------------------------------
psof0$ #Start of file for tool zero
psof$psof$ #Start of file for non-zero tool number
pwritbuf4
pwritbuf5
#Region Tool change common blocks
ptlchg_com #Tool change common blocks
if output_z = yes$,
preadbuf5
if (opcode$ > 0 & opcode$ < 16) | opcode$ = 19,
scomm_str, no_spc$, "DOC1=", *min_depth, no_spc$, [if acd <> 0, *acd], # First DOC
#Region Null tool change
ptlchg0$ #Call from NCI null tool change (tool number repeats)
if retractflg = 0,
spaces$ = 0, no_spc$, scomm_str, "DOC2= ", *min_depth, # Second DOC
#Region pwrtt$
# --------------------------------------------------------------------------
# Tooltable Output
# --------------------------------------------------------------------------
pwrtt$ # Write tool table, scans entire file, null tools are negative
pwritbuf4 # Save X,Y,Z axis limit datapgettooltable # Write tool table, scans entire file, null tools are negative
if opcode$ = 3, !nextdc$, !sdrnote, scurop = sdrnote
else, !opcode$, !sopnote, scurop = sopnoteif met_tool$, sunit = " MM"
else, sunit = no2asc(34)if tcr$ > 0,
stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + ", " + strtool$ + sdlm + "R" + no2str(tcr$)
else,
stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + ", " + strtool$ # + "H" + no2str(tloffno$)
# --------------------------------------------------------------------------
# Buffer 4 Read / Write Routines
# --------------------------------------------------------------------------
pinit #Initialize the limit checking variables
max_Xpos = m_c9k #Initialize
min_Xpos = c9k # "
max_Ypos = m_c9k # "
min_Ypos = c9k # "
max_Zpos = m_c9k # "
min_Zpos = c9k # "plimits # Check for NEW X,Y,Z limits
if b4_xmax > max_Xpos, max_Xpos = b4_xmax
if b4_xmin < min_Xpos, min_Xpos = b4_xmin
if b4_ymax > max_Ypos, max_Ypos = b4_ymax
if b4_ymin < min_Ypos, min_Ypos = b4_ymin
if b4_zmax > max_Zpos, max_Zpos = b4_zmax
if b4_zmin < min_Zpos, min_Zpos = b4_zmin
preadbuf4t # Read Buffer 5 (at the toolchanges for X,Y,Z limits)
pinit #Initialize the limit checking variables
b4_gcode = rbuf(4, rc4) #Read a record from the Buffer
plimits #Check for NEW limits
# Need this loop to scan thru possible NULL tlchgs
while (b4_gcode = 1000), #Find the next NON-NULL toolchange
[
b4_gcode = rbuf(4, rc4) #Read the next record from the Buffer
plimits #Check for NEW limits
]preadbuf4e # Read Buffer 5 (for Program X,Y,Z limits)
pinit #Initialize the limit checking variables
size4 = rbuf(4, 0) #Get the size of the Buffer
rc5 = two #Reset read pointer (SKIP 1st record!)
while rc4 <= size4, #Loop thru entire program
[
b4_gcode = rbuf(4, rc4) #Read a record from the Buffer
plimits #Check for NEW limits
]
rc4 = two #Reset read pointer (SKIP 1st record!)
pMaxMin # Output Max/Min X,Y, Z coordinatesif X_limits = yes$, # Output MAX/MIN positions in the X axis
"(", "Max_X = ", *max_Xpos, " Min_X = ", *min_Xpos, ")", e$
if Y_limits = yes$, # Output MAX/MIN positions in the Y axis
"(", "Max_Y = ", *max_Ypos, " Min_Y = ", *min_Ypos, ")", e$
if Z_limits = yes$, # Output MAX/MIN positions in the Z axis
[
"(", "OVERALL MAX Z = ", *max_Zpos, ")", e$
"(", "OVERALL MIN Z = ", *min_Zpos, ")", e$
]pMaxMin_str # Output Max/Min X,Y, Z coordinates
stoollib, [if Z_limits = yes$, " * ", "STO= ", *min_Zpos], scls, e$
#Region ptooltable
ptooltable # Write tool table, scans entire file, null tools are negative
tnote = t$
toffnote = tloffno$
tlngnote = tlngno$
spaces$=0
if t$ >= zero | gcode$ = 1003,
[
# *ADDED* for XYZ limit output "in the ToolTable"
if (toolable_XYZ = yes$) & (gcode$ <> 1001),
[
preadbuf4t #Read the data from the Buffer 4
# pMaxMin #Output Max/Min X,Y,Z coords during this tool operation
pMaxMin_str
]
if gcode$ <> 1003, # '1003' = end of program
pgettooltable
]
spaces$=sav_spc
#Region pwritbuf4
# --------------------------------------------------------------------------
# Buffer 4 Read / Write Routines
# --------------------------------------------------------------------------
pwritbuf4 # Write Buffer 4
b4_gcode = gcode$
if gcode$ = 1002 & op_id$ = prv_op_id$, b4_gcode = 1003 #Added (4/22/03)
!op_id$ #Added (4/22/03)
b4_xmax = x_max$
b4_xmin = x_min$
b4_ymax = y_max$
b4_ymin = y_min$
b4_zmax = z_max$
b4_zmin = z_min$
b4_gcode = wbuf(4, wc4) # Write the record
if wc4 = 2,
[
wc4 = 1
b4_gcode = wbuf(4, wc4)
]
#EndRegion pwritbuf4#Region preadbuf5
preadbuf5 # Read Buffer 5
size5 = rbuf(5,0)
b5_gcode = 1001
min_depth = 99999
max_depth = -99999
while rc5 <= size5 & b5_gcode = 1001,
[
if rc5 <= size5, b5_gcode = rbuf(5,rc5)
if b5_zmin < min_depth, min_depth = b5_zmin
if b5_zmax > max_depth, max_depth = b5_zmax
]
#EndRegion preadbuf5 -
On 10/7/2014 at 4:33 AM, Alfred Salzmann said:
This may help ? These X8 routines store the min max of each tool into a buffer. Will work for older versions.
See the subroutine headers where to place the text below.
I hope I haven't forgoten anything. I don't check the forum often.
output_z : yes$ #Output Z Min and Z Max values (yes or no)
tool_info : 3 #Output tooltable information?
#0 = Off - Do not output any tool comments or tooltable
#1 = Tool comments only
#2 = Tooltable in header - no tool comments at T/C
#3 = Tooltable in header - with tool comments at T/C
# --------------------------------------------------------------------------
# Buffer 1 Files for NEW Sequence Number routine
# --------------------------------------------------------------------------
# "Nxxyy xx = tool number yy = repeat counter"
rc1 : 1
wc1 : 1
tlcount : 0
fbuf 1 0 1 0 0
tlusage : 0
fmt N 7 tlusage
# --------------------------------------------------------------------------
# Buffer 4 - Holds the variable 't' for each toolpath segment
# ------------------------------------------------------------------------
rc4 : 1 #
wc4 : 1 #
fbuf 4 0 1 0 0 # Buffer 4 #
# ------------------------------------------------------------------------
# Buffer 5 - Min / Max #
# ------------------------------------------------------------------------
b5_gcode : 0 #
b5_zmin : 0 #
b5_zmax : 0 #
rc5 : 2 #
wc5 : 1 #
size5 : 0 #
fbuf 5 0 3 0 0 #Min / Max #
# ------------------------------------------------------------------------
fmt "X" 2 x_tmin #Total x_min #
fmt "X" 2 x_tmax #Total x_max #
fmt "Y" 2 y_tmin #Total y_min #
fmt "Y" 2 y_tmax #Total y_max #
fmt "Z" 2 z_tmin #Total z_min #
fmt "Z" 2 z_tmax #Total z_max #
fmt "Z" 2 min_depth #Tool z_min #
fmt "Z" 2 max_depth #Tool z_max #
#-------------------------------------------------------------------------#Call this in pwrtt$
pinittlcount #Initialize tool count
if t$ > 0,
[
wc1 = t$
tlcount = wbuf(1, wc1) #Write tool usage counter to buffer file. Initial counter is zero.
]#Call in tool change post block and start of file post block if it is mill 4 axis post
ptoolcounter #Buffer tool usage count
rc1 = t$
tlcount = rbuf(1, rc1) #Read tool usage counter for current tool
tlcount = tlcount + 1 #Tool usage counter
wc1 = t$
tlcount = wbuf(1, wc1) #Save tool usage counter to buffer file
ptlusageout #Output tool usage
tlusage = t$ * 100 + tlcount
tlusage
# --------------------------------------------------------------------------
ptoolcomment #Comment for tool
tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
if tool_info = 1 | tool_info = 3,
sopen_prn, ~t$, "= ",pstrtool, sclose_prn, e$
# --------------------------------------------------------------------------
psof$ #Place this in psof . Start of file for non-zero tool number
ptoolcounter #Calculate tool usage counter
#----------------------------------------------------------------------
ptravel #
pwritbuf5 #
if output_z = yes$ & tcnt > 0, #
[ #
sav_spc = spaces$ #
spaces$ = 0 #
"(", "OVERALL MAX = ", *z_tmax, ")", e$ #
"(", "OVERALL MIN = ", *z_tmin, ")", e$ #
spaces$ = sav_spc #
] #
#----------------------------------------------------------------------
psof$ #Place this in Psof and Tool Change
ptlchg$ #Tool change
#-----------------------------------------------------------------------
if output_z = yes$, #
[ #
preadbuf5 #
if (opcode$ > 0 & opcode$ < 16) | opcode$ = 19, #
[ #
#sav_spc = spaces$ #
spaces$ = 0 #
"(", "MAX = ", *max_depth, ")", e$ #
"(", "MIN = ", *min_depth, ")", e$ #
spaces$ = sav_spc #
] #
] #
#-----------------------------------------------------------------------
#-------------------------------------------------------------------------
ptravel # Tool travel limit calculation #
if x_min$ < x_tmin, x_tmin = x_min$ #
if x_max$ > x_tmax, x_tmax = x_max$ #
if y_min$ < y_tmin, y_tmin = y_min$ #
if y_max$ > y_tmax, y_tmax = y_max$ #
if z_min$ < z_tmin, z_tmin = z_min$ #
if z_max$ > z_tmax, z_tmax = z_max$ #
# ------------------------------------------------------------------------
# Buffer 5 Read / Write Routines
# ------------------------------------------------------------------------
pwritbuf5 # Write Buffer 5 #
b5_gcode = gcode$ #
b5_zmin = z_min$ #
b5_zmax = z_max$ #
b5_gcode = wbuf(5, wc5) #
# ------------------------------------------------------------------------
preadbuf5 # Read Buffer 5 #
size5 = rbuf(5,0) #
b5_gcode = 1000 #
min_depth = 99999 #
max_depth = -99999 #
while rc5 <= size5 & b5_gcode = 1000, #
[ #
if rc5 <= size5, b5_gcode = rbuf(5,rc5) #
if b5_zmin < min_depth, min_depth = b5_zmin #
if b5_zmax > max_depth, max_depth = b5_zmax #
] #
# ------------------------------------------------------------------------
pwrtt$ #Pre-read NCI file
if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable
pinittlcount #Initialize tool usage counter
if t$ > 0, tcnt=tcnt+1 #
ptravel #
pwritbuf5 #
#if t$ <> prv_t$ & t$ > 0, pwritebuf7 #Buffer 7
# ------------------------------------------------------------------------
Good morning Alfred,
I have seen Buffer 7 but not called out yet, may I see the BUFFER 7 how it was defined?Thank you.
- 1
- 1
-
On 1/5/2017 at 5:53 AM, 5th Axis CGI said:
Best of luck and glad you are determined to figure it out. Shoot me and email and I will give you Mick's email or you can PM on the board and he should get back to you.
I got BIG help from Mick, thank you for your support.
-
On 1/23/2019 at 9:19 AM, Colin Gilchrist said:
Steven,
I think part of the issue you are having is "when" you are trying to collect the data during the NCI Processing.
- "pwrtt$" is the Post Block that creates the Tool List, but it does it "during the NCI Pre-Read Process".
- You defined a "String Buffer" file type. This should probably be "numeric", and I would recommend saving "two 'reals' per record", with the 'z_min$' and 'op_number' values.
- Because 'pwrtt$' gets called during the Pre-Read routine, I don't think the "z_min$" and "z_max$" variables get filled with the appropriate values, until we are actually processing the NCI Data, during the "output loop".
- I think you see this, since the Z output is not correct.
- To make this work is probably more complex than you think, but should still be possible.
I am guessing you'll having to do something like this:
- Write the Tool Table Comment Strings as normal, but output a "dummy" String at the end of the Comment String. I would probably do something like put the "op_id$" value, with a "flag label string", so we can use that as a search string later on.
- Add "start_tool_table" and "end_tool_table" tags of some sort, so you can easily flag where the Tool Table Comments start and stop in the NC File.
- Process the NCI data as normal, but at each 'ptoolend$', you would save the 'z_min$' value and 'op_id$' values to the buffer file.
- Inside 'ppost$', make sure the NC File is closed.
- Initialize a new String Buffer from the NC File Data, so the Buffer gets loaded with the NC File that was just generated by the Post Processor.
- Read each new line from the NC File Header (as buffered records), and scan through the line for the 'flag label string', and replace the string with retrieved data from the Z depth buffer.
- Once the new string is 'parsed and manipulated', write the modified string back to one of the "External File Types" (alternate output streams).
- After the string manipulation is finished, loop through the remaining lines of code in the String Buffer, writing each remaining line to the alternate output stream.
- Save the Alternate file, with a temp file name.
- Use the File Functions to delete the original NC File.
- Rename the Alternate File to match the original NC File.
This is quite honestly a lot of work to go through to get what you are after.
I believe Jeff has mentioned that there is an alternate method available, using the new Tool Table functionality that has been added to MP, but I think that requires that you rewrite all of the existing logic to remove the 'pparameter$' functions, and only use the new functions. That is also quite a lot of work.
Good morning Colin,
I was lucky that someone has very similar post of which I am begging for and after I looked into the post with some modifications I am surely that you are right. This post have modified entirely with the PTOOLTABLE with a replacement one. One of the question is, it has DUPLICATION of tooling if inside the program has repeat tools. Would you please point out what should I fix to make it better?
Thank you for your time,
S.Luong============================== G-CODE ============================
%
O3001(21973001 REVA - OP1.NC)
(KOVAR, BAR STOCK= L6. W.75 H.025)
(NOTE= WE NEED 200PCS!!!)
(21973001 REVA - OP1)
(POSTED ON = JAN.29.2019 AT 08:35)
(*)
(G54 = OP1)
(XY0= CENTER; Z0 = TOP OF STOCK)
(*)
(TOOLS LIST, OP1 = 6 TOOLS)
(T1= .0313,#00 CNT DRILL | DOC= -.015) =====================> GOOD DEEPEST DEPTH INFO
(T2= .0625,1/16 STUB DRILL | DOC= -.015) =====================> GOOD DEEPEST DEPTH INFO
(T6= .081,#46 STUB DRILL | DOC= -.0588) =====================> GOOD DEEPEST DEPTH INFO
(T3= .1875,3/16 BULL EM | DOC= -.0643) =====================> GOOD DEEPEST DEPTH INFO
(T4= .1875,3/16 EM | DOC= -.004) =====================> GOOD DEEPEST DEPTH INFO
(T5= .0612,1/16 EM | DOC= -.004) =====================> GOOD DEEPEST DEPTH INFO
======TOOLS DUPLICATE BELOW, WRONG DEEPEST DEPTH INFO, NOT NEEDED========
(T1= .0313,#00 CNT DRILL | DOC= -.004) =====================> WRONG DEEPEST DEPTH INFO
(T2= .0625,1/16 STUB DRILL | DOC= -.004) =====================> WRONG DEEPEST DEPTH INFO
(T6= .081,#46 STUB DRILL | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(T3= .1875,3/16 BULL EM | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(T4= .1875,3/16 EM | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(T5= .0612,1/16 EM | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(T2= .0625,1/16 STUB DRILL | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(T5= .0612,1/16 EM | DOC= -.009) =====================> WRONG DEEPEST DEPTH INFO
(*)
N1(SPOT 28X .070 HOLES, CUT#1)
G0 G17 G40 G49 G80 G90
G91 G28 Z0.(DOC= -.015) =============================> ZDEPTH
T1 M6(.0313,#00 CNT DRILL)
G0 G17 G90 G54 X-2.896 Y.039 S1000 M3
G43 H1 Z1. T2(NEXT TOOL)M8
G98 G81 Z-.015 R.0625 F5.
Y-.235
X-2.245
(CUTTING...)
Y.039
G80
N102(SPOT 4X .090 THRU HOLES, CUT#2)
G43 H1 Z1.(PROGRAM JUMPS HERE)
G0 G90 G54 S1000 M3
X-2.571 Y0.
G98 G81 Z-.015 R.0625 F5.
(CUTTING...)
G80 M9
G91 G28 Z0.
/G28 Y0. M5
M30
%============================== DEFINED ============================
# --------------------------------------------------------------------------
# General Output Settings
# --------------------------------------------------------------------------
toolable_XYZ : yes$ # Output Axis limit comments in tooltable?
toolchange_XYZ : yes$ # Output Axis limit comments at toolchanges?
overall_XYZ : yes$ # Output Axis limit values for the 'entire program'
X_limits : no$ # Output the X axis limits
Y_limits : no$ # Output the Y axis limits
Z_limits : yes$ # Output the Z axis limits#Region Buffer 4
# --------------------------------------------------------------------------
# Buffer 4 - Holds the variable 't' for each toolpath segment
# --------------------------------------------------------------------------
rc4 : 1
wc4 : 1
fbuf 4 0 1 0 0 # Buffer 4
#EndRegion Buffer 4
#Region Buffer 5
# --------------------------------------------------------------------------
# Buffer definition (for Max/Min X,Y,Z storage)
# --------------------------------------------------------------------------
rc5 : 2 #Buffer 5 READ pointer (YES, '2' is correct for this case!)
wc5 : 1 #Buffer 5 WRITE pointer
size5 : 0 #To hold 'size' of Buffer 5b5_gcode : 0 #Stored in Buffer #5
b5_tcode : 0 # "
b5_xmax : 0 # "
b5_xmin : 0 # "
b5_ymax : 0 # "
b5_ymin : 0 # "
b5_zmax : 0 # "
b5_zmin : 0 # "fbuf 5 0 8 0 0 #Declare Buffer1 to hold Min/Max X,Y,Z axis info.
#EndRegion Buffer 5
# --------------------------------------------------------------------------
# Tooltable Output
# --------------------------------------------------------------------------
pwrtt$ # Write tool table, scans entire file, null tools are negative
if rotaxis$ > 0 | rotary_type$ > 0 | mill5$ <> 0,
[
sav_rot_on_x = rot_on_x
output_z = no$
]
if vmc = 0 & tlplnno$ <> 2, sav_rot_on_x = rot_on_x
if vmc = 1 & tlplnno$ > 1, sav_rot_on_x = rot_on_x
#sav_rot_on_x = rot_on_x #Uncomment this line to output rotary axis value even when it's not used
t$ = wbuf(4,wc4) #Buffers out tool number valuespwritbuf5 # Save X,Y,Z axis limit data
if tool_table = 1, ptooltable, e$
if (gcode$ <> 1003), # *ADDED*
[
if tool_table = 2, ppredtool,e$
if tool_table = 3, pmetatool,e$
]
if t$ >= zero, tcnt = tcnt + onepunit # Tool unit
if met_tool$, " MM"
else, 34sdlm : " - "
sopn : "("
scls : ")"stoollib : ""
scurop : ""
sunit : ""pgettooltable # Write tool table, scans entire file, null tools are negative
if opcode$ = 3, !nextdc$, !sdrnote, scurop = sdrnote
else, !opcode$, !sopnote, scurop = sopnoteif met_tool$, sunit = " MM"
else, sunit = no2asc(34)if tcr$ > 0,
#stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + "," + strtool$ + " |" + "H" + no2str(tlngno$) + "|" + "D" + no2str(tloffno$) + " | " + sunit + sdlm + "R" + no2str(tcr$)
stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + "," + strtool$ + " | "
else,
#stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + "," + strtool$ + " |" + "H" + no2str(tlngno$) + "|" + "D" + no2str(tloffno$)
stoollib = sopn + "T" + no2str(t$) + "= " + no2str(tldia$) + "," + strtool$ + " | "
# --------------------------------------------------------------------------
# Buffer 5 Read / Write Routines
# --------------------------------------------------------------------------
pinit #Initialize the limit checking variables
max_Xpos = m_c9k #Initialize
min_Xpos = c9k # "
max_Ypos = m_c9k # "
min_Ypos = c9k # "
max_Zpos = m_c9k # "
min_Zpos = c9k # "plimits # Check for NEW X,Y,Z limits
if b5_xmax > max_Xpos, max_Xpos = b5_xmax
if b5_xmin < min_Xpos, min_Xpos = b5_xmin
if b5_ymax > max_Ypos, max_Ypos = b5_ymax
if b5_ymin < min_Ypos, min_Ypos = b5_ymin
if b5_zmax > max_Zpos, max_Zpos = b5_zmax
if b5_zmin < min_Zpos, min_Zpos = b5_zminold_t : 0
pwritbuf5 # Write Buffer 5
b5_gcode = gcode$
if abs(t$) <> abs(old_t), t$ = abs (t$)
if gcode$ = 1002 & t$ < zero, b5_gcode = 1000 #Added (6/24/03)
if gcode$ = 1002 & op_id$ = prv_op_id$, b5_gcode = 1000 #Added (4/22/03)
!op_id$ #Added (4/22/03)
b5_tcode = t$
b5_xmax = x_max$
b5_xmin = x_min$
b5_ymax = y_max$
b5_ymin = y_min$
b5_zmax = z_max$
b5_zmin = z_min$
b5_gcode = wbuf(5, wc5) # Write the record
if wc5 = 2,
[
wc5 = 1
b5_gcode = wbuf(5, wc5)
]
old_t = t$preadbuf5t # Read Buffer 5 (at the toolchanges for X,Y,Z limits)
pinit #Initialize the limit checking variables
b5_gcode = rbuf(5, rc5) #Read a record from the Buffer
plimits #Check for NEW limits
# Need this loop to scan thru possible NULL tlchgs
while (b5_gcode = 1000), #Find the next NON-NULL toolchange
[
b5_gcode = rbuf(5, rc5) #Read the next record from the Buffer
plimits #Check for NEW limits
]preadbuf5e # Read Buffer 5 (for Program X,Y,Z limits)
pinit #Initialize the limit checking variables
size5 = rbuf(5, 0) #Get the size of the Buffer
rc5 = two #Reset read pointer (SKIP 1st record!)
while rc5 <= size5, #Loop thru entire program
[
b5_gcode = rbuf(5, rc5) #Read a record from the Buffer
plimits #Check for NEW limits
]
rc5 = two #Reset read pointer (SKIP 1st record!)
pMaxMin # Output Max/Min X,Y, Z coordinatesif X_limits = yes$, # Output MAX/MIN positions in the X axis
"(", "Max_X = ", *max_Xpos, " Min_X = ", *min_Xpos, ")", e$
if Y_limits = yes$, # Output MAX/MIN positions in the Y axis
"(", "Max_Y = ", *max_Ypos, " Min_Y = ", *min_Ypos, ")", e$
if Z_limits = yes$, # Output MAX/MIN positions in the Z axis
[
"(", "OVERALL MAX Z = ", *max_Zpos, ")", e$
"(", "OVERALL MIN Z = ", *min_Zpos, ")", e$
]
pMaxMin_str # Output Max/Min X,Y, Z coordinates
stoollib, [if Z_limits = yes$, "DOC= ", *min_Zpos], scls, e$
ptooltable # Write tool table, scans entire file, null tools are negative
tnote = t$
toffnote = tloffno$
tlngnote = tlngno$
spaces$=0
if t$ >= zero | gcode$ = 1003,
[
# *ADDED* for XYZ limit output "in the ToolTable"
if (toolable_XYZ = yes$) & (gcode$ <> 1001),
[
preadbuf5t #Read the data from the Buffer 5
# pMaxMin #Output Max/Min X,Y,Z coords during this tool operation
pMaxMin_str
]
if gcode$ <> 1003, # '1003' = end of program
pgettooltable
]
spaces$=sav_spc
-
On 1/23/2019 at 9:19 AM, Colin Gilchrist said:
Steven,
I think part of the issue you are having is "when" you are trying to collect the data during the NCI Processing.
- "pwrtt$" is the Post Block that creates the Tool List, but it does it "during the NCI Pre-Read Process".
- You defined a "String Buffer" file type. This should probably be "numeric", and I would recommend saving "two 'reals' per record", with the 'z_min$' and 'op_number' values.
- Because 'pwrtt$' gets called during the Pre-Read routine, I don't think the "z_min$" and "z_max$" variables get filled with the appropriate values, until we are actually processing the NCI Data, during the "output loop".
- I think you see this, since the Z output is not correct.
- To make this work is probably more complex than you think, but should still be possible.
I am guessing you'll having to do something like this:
- Write the Tool Table Comment Strings as normal, but output a "dummy" String at the end of the Comment String. I would probably do something like put the "op_id$" value, with a "flag label string", so we can use that as a search string later on.
- Add "start_tool_table" and "end_tool_table" tags of some sort, so you can easily flag where the Tool Table Comments start and stop in the NC File.
- Process the NCI data as normal, but at each 'ptoolend$', you would save the 'z_min$' value and 'op_id$' values to the buffer file.
- Inside 'ppost$', make sure the NC File is closed.
- Initialize a new String Buffer from the NC File Data, so the Buffer gets loaded with the NC File that was just generated by the Post Processor.
- Read each new line from the NC File Header (as buffered records), and scan through the line for the 'flag label string', and replace the string with retrieved data from the Z depth buffer.
- Once the new string is 'parsed and manipulated', write the modified string back to one of the "External File Types" (alternate output streams).
- After the string manipulation is finished, loop through the remaining lines of code in the String Buffer, writing each remaining line to the alternate output stream.
- Save the Alternate file, with a temp file name.
- Use the File Functions to delete the original NC File.
- Rename the Alternate File to match the original NC File.
This is quite honestly a lot of work to go through to get what you are after.
I believe Jeff has mentioned that there is an alternate method available, using the new Tool Table functionality that has been added to MP, but I think that requires that you rewrite all of the existing logic to remove the 'pparameter$' functions, and only use the new functions. That is also quite a lot of work.
Hello Colin,
Thank you for your golden time because I know you are super busy. These guidelines are very helpful and I will do it, also will feedback ASAP.Thanks,
S.Luong -
4 hours ago, jeff.D said:
You have a post block called pwritbuf1 that writes to buffer 4. It's not part of you're problem, but it is confusing.
Buffer 4 appears to be sized incorrectly. Also, if you're reading and writing to a buffer multiple times and you're not using strings, consider using a stack.
You should contact your Mastercam reseller about this issue; there's a simpler way to do this.
Hi Jeff,
Thank you for your suggestions, I have contacted the deal and they said they would BLOCK the codes after they are done. I would like to learn what they did honestly. I also contacted the person who trained me but he is SUPPER BUSY. Therefore, I would like to get help from this forum.Thanks.
-
Hello everyone,
I am trying to recall memory to do a BUFFER for the TOOL LIST depths call out and somehow I don't get the right number. I got trained by some professional post writer and it was great lesion to learn from him, I just didn't do much on buffer on my own and now I forgot some. I now I miss something but I cannot know pacifically what I have missed.Thank you guys.
S.Luong*************************************************** DEFINED POST ================================================
#Region pwritbuf1 TOOLS LIST ISSUE
# --------------------------------------------------------------------------
pwritbuf1 # Write Buffer 1, first one here
b1_gcode = gcode$
b1_zmin = z_min$
b1_zmax = z_max$
b1_gcode = wbuf(4, wc4)
rc1 : 1
wc1 : 1
size1 : 0
fbuf 1 0 255 0 1
sbufname1$ = "D:\Tool Depths.txt"s_ToolPlaneComm : "" # Tool Plane Comment
s_ToolPlaneComm_n : "" # Tool Plane Comment
#Endregion pwritbuf1#Region preadbuf1
preadbuf1 # Read Buffer 1
size4 = rbuf(1,0)
b1_gcode = 1000
min_depth = 10.
max_depth = 0
while rc4 <= size4 & b1_gcode = 1000,
[
if rc4 <= size4, b1_gcode = rbuf(4,rc4)
if b1_zmin < min_depth, min_depth = b1_zmin
if b1_zmax > max_depth, max_depth = b1_zmax
]
#EndRegion preadbuf1#Region Buffer 4
# --------------------------------------------------------------------------
# Buffer 4
# --------------------------------------------------------------------------
rc4 : 1
wc4 : 1
size4: 1
fbuf 4 0 1 0 0 # Buffer 4
#EndRegion Buffer 4psetup # Output of toolchange information
if output_z = yes$, preadbuf1
*min_depthRegion ptooltable
ptooltable # Write tool table, scans entire file, null tools are negative
tnote = t$
toffnote = tloffno$
tlngnote = tlngno$
spaces$=0
if t$ >= zero,
[
scomm_str, *t$, "=", *tldia$, pstrtool, ", DOC= ", psetup, scomm_end, e$
]===================== G-CODE===================
%
O3456(10488456 RevB.NC)
(SOURCE = 10488456 REVB.MCAM)
(VERTICAL INDEX)
(PART NAME= DEFLECSION CAP)
(UNOROMEN )
(*)
(POSTED ON JAN.18.2019 AT 12*13PM)
(POSTED BY= PCROBOTIC\ADMIN)
(BAR STOCK= X3.13 Y1.85 Z1.85)
(VERTICAL INDEX)
(*)
(TOTAL TOOLS FOR OP2 ARE= 5 TOOLS)
(******************)
(T13=.5000 1/2 FLAT ENDMILL, DOC= Z10.) ==============> DOC is wrong, it should be Z0. (Deepest point)
(******************)
(T14=.2500 1/4 SPOTDRILL, DOC= Z0.) ==============> DOC is wrong, it should be Z-.055 (Deepest point)
(******************)
(T15=.0995 #39 DRILL, DOC= Z10.) ==============> DOC is wrong, it should be Z-.550 (Deepest point)
(******************)
(T16=.1180M3 X .5 , DOC= Z10.) ==============> DOC is wrong, it should be Z-.150 (Deepest point)
(******************)
(T17=.1000.25CHAMFER EM 90, DOC= Z10.) ==============> DOC is wrong, it should be Z-.060 (Deepest point)
(******************)
(*)
(WORK OFFSET LIST)
(G54)
(X CENTER,Y BACK)
(Z AT TOP)
(*)
N13(.5000, 1/2 FLAT ENDMILL, HSS,USED TOOL)
(4FLTS 2.000LOC, 2.500RLF, 3.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19(XY= -.02, Z STK= .005)
(34X, ROUGH MULTI-PASSES, .05 EACH)
/G28 Y0.(TOOLPATH ZCLEARANCE= .34 MIN.)
T13 M6(ROUGH OUT TOP SURFACE, CUT#25)
G90 G54 S1200 M3
X1.9665 Y-1.88 T14(NEXT TOOL)
G43 H13 Z2.(DOC= Z.005, .35DP)
M8 G17(XY PLANE) G90 Z.7
G1 Z.005 F200.
X1.4665 F15.
(CUTTING...)
G1 Z.005 F200.
X1.4665 F15.
X-1.4665
X-1.9665
G0 Z2.
M9(PROGRAM JUMPS HERE)
(*)
N1302(FINISH TOP SURFACE, CUT#26)
G0 G17(XY PLANE) G90 G54 S1200 M3(PROGRAM JUMPS HERE)
X1.9665 Y-1.48(XY STK= -.02)
G43 H13 Z2.(DOC= Z0., .35DP)
(6X, ROUGH MULTI-PASSES, .25 EACH)
M8 Z.1
G1 Z0. F12.
X1.4665
(CUTTING...)
Z.1
G1 Z0. F12.
X1.4665
X-1.4665
X-1.9665
G0 Z2.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N14(.2500, 1/4 SPOTDRILL, HSS, 90.DEGS,)
(2FLTS 2.000LOC, 2.500RLF, 3.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T14 M6(SPOT 6X .260, CUT#27)
G90 G54 S600 M3
X-.6299 Y-.8268 T15(NEXT TOOL)
G43 H14 Z2.(DOC= Z-.055, .35DP)
M8(6X SPOTS, .11'CSINK SIZE)
G98 G81 Z-.055 R.03 F1.5
X-.315 Y-1.3723
Y-.2812
X.315 Y-1.3723
Y-.2812
X.6299 Y-.8268
G80 M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N15(.0995, #39 DRILL, HSS, 118.DEGS,)
(2FLTS 2.000LOC, 2.500RLF, 3.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T15 M6(DRILL 6X .260, CUT#28)
G90 G54 S3000 M3
X-.6299 Y-.8268 T16(NEXT TOOL)
G43 H15 Z2.(DOC= Z-.55, .35DP)
M8(6X DRILL HOLES)
(55 PECKS, -.5799 PIN DEPTH)
G98 G83 Z-.55 R.08 Q.01 F2.
X-.315 Y-1.3723
Y-.2812
X.315 Y-1.3723
Y-.2812
X.6299 Y-.8268
G80 M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N16(.1180, M3 X .5 , PLUG,HSS,)
(1FLT 2.000LOC, 2.500RLF, 3.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.
T16 M6(TAP 6X, CUT#29)
G90 G54 S56 M3
X-.6299 Y-.8268 T17(NEXT TOOL)
G43 H16 Z2.(DOC= Z-.15, .35DP)
M8 (6X AKIRA SEIKI TAP HOLES)
G98 G84 Z-.15 R.08 E56.,R1
X-.315 Y-1.3723
Y-.2812
X.315 Y-1.3723
Y-.2812
X.6299 Y-.8268
G80 M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
(*)
N17(.1000, .25CHAMFER EM 90, HSS, 45.DEGS, .1000TIP,)
(4FLTS 1.000LOC, 1.200RLF, 2.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
/G28 Y0.(TOOLPATH ZCLEARANCE= .04 MIN.)
T17 M6(DEBURR, CUT#30)
G90 G54 S5000 M3
X-1.5665 Y.05 T13(NEXT TOOL)
G43 H17 Z2.(DOC= Z-.06, .35DP)
M8 G17(XY PLANE) G90 Z.1
G1 Z-.06 F45.
X-1.4665
X1.4665
G2 X1.5165 Y0. J-.05
G1 Y-1.6535
G2 X1.4665 Y-1.7035 I-.05
G1 X-1.4665
G2 X-1.5165 Y-1.6535 J.05
G1 Y0.
G2 X-1.4665 Y.05 I.05
G1 X-1.3665
G0 Z2.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M1
T13 M6(FIRST PROGRAMMED TOOL)
M30
%(6,256 CHARACTERS = 6.28KB) -
On 12/5/2018 at 8:35 PM, julioc1821 said:
Hi guys.
How to edit the Haas post to add in the area of comments of each tool the max depth cut. For example:
current:
(T3|3/8 FLAT ENDMILL|H3|D3|TOOL DIA. - .375)
(T3|3/8 FLAT ENDMILL|H3|DEPTH Z = 0.458|D3|TOOL DIA. - .375)
Thank you for your support.
I also have the same question as yours.
-
On 1/10/2019 at 5:55 PM, Flyinbrian2006 said:
A few days ago I was running mastercam X8 in the HAAS VF1 machine with no problems at all. As soon as our IT guy installs mastercam 2017 onto my computer, I can write and run 2 separate toolpaths with no problem, but the 3rd tool path will alarm when downloading it to the HAAS machine. Hoping someone will have an answer.
I had this problem before and here is how I fixed it.
The problem is some of the IF, ELSE condition is conflicting to the new one 2017. Another issue is some of the STRING in the post, 2017 wants to define a bit different.
Solution:
Look inside your post and search for ">>>>>>>>>" and the next texts probably ERROR MESSAGE. Copy and paste it on this forum and I will you more, I need to read what exact the error message to solve your issue. -
Hello everyone,
I would like to use the MILL.SET but how to use it? I never use it and I think it is a good tool to try. Can you guys help me out how to use it?Thanks.
-
Hello everyone,
I am trying to use the PPAR to separate between the ABSOLUTE and INCREMENTAL for my own alarm message but somehow I got it fail to do the right job. Below here are my codes, would you guys please point out what I've done wrong?
Trully appreciated,
SLuong=====================================================================================================
OpTopOfStock : 0 # Operation Top of Stock
AbsoluteOpTopOfStock: 0
IncrementalOpTopOfStock : 0OpRtrPlane : 0 # Operation Retract plane
AbsoluteOpRtrPlane : 0 # Operation Retract plane
IncrementalOpRtrPlane : 0 # Operation Retract planesTopOfStockConflictsRetract: ""
if AbsoluteOpTopOfStock > AbsoluteOpRtrPlane, [if mprint(sTopOfStockConflictsRetract, 2) = 2, exitpost$] # CHECK ON RETRACT PLANE#Region sTopOfStockConflictsRetract
sTopOfStockConflictsRetract = "CUT#"+sToolPathNumber+" * TOP OF STOCK is HIGHER than RETRACT PLANE"
+no2asc(13)+"TOOL#"+no2str(t$)+" ("+s20001+")"
+no2asc(13)
+no2asc(13)+"Current RETRACT is Z"+no2str(OpRtrPlane)
+no2asc(13)+"Current TOP OF STOCK is Z"+no2str(OpTopOfStock)
+no2asc(13)
+no2asc(13)
+no2asc(13)+" Step 1 = Go to PARAMETERS"
+no2asc(13)+" Step 2 = Look for LINKING PARAMETER"
+no2asc(13)+" Step 3 = Look for current RETRACT value =====> "+no2str(OpRtrPlane)
+no2asc(13)+" Step 4 = Look for current TOP OF STOCK value =====> "+no2str(OpTopOfStock)
+no2asc(13)+" Step 5 = Chanage TOP OF STOCK value LOWER than RETRACT VALUE"
+no2asc(13)
+no2asc(13)+"If you avoid to fix this issue, tool will be PLUNGED DOWN into part."
+no2asc(13)+"THIS IS SERIOUS STUFF, IT MUST BE FIXED ASAP!!!"
+no2asc(13)
+no2asc(13)+"Click OK to go back to MASTERCAM to fix this issue NOW!!!"
#EndRegion sTopOfStockConflictsRetract
ppar
if prmcode$ = 10027, OpTopOfStock = rpar(sparameter$, 1) # Operation Top of Stockif prmcode$ = 10027,
[
AbsoluteOpTopOfStock = rpar(sparameter$, 1) # Operation Top of Stock
IncrementalOpTopOfStock = rpar(sparameter$, 2) # Operation Top of Stock
]if prmcode$ = 15374, OpRtrPlane = rpar(sparameter$, 1) # Operation Retract plane
if prmcode$ = 15374,
[
AbsoluteOpRtrPlane = rpar(sparameter$, 1) # Operation Retract plane
IncrementalOpRtrPlane = rpar(sparameter$, 2) # Operation Retract plane
] -
Hello everyone,
On Friday, I saw some funky codes about G0 on a CONTOUR toolpath. I thought it was "PRAPIDOUT" and tried to do many ways but failed, I think it is time for me to seek for experts like you guys. Please point out what I've done wrong....Thank you for your time.
================================ G - CODE ====================
%
O1000(10488802-103 REVA - FIXTURE.NC)
(SOURCE = 10488802-103 REVA.MCAM)
(VERTICAL INDEX)
(PART NAME= FIXTURE)
(*)
(POSTED ON DEC.07.2018 AT 10*14AM)
(VERTICAL INDEX)
(TOTAL TOOLS FOR Top IS= 1 TOOL)
(*)
(WORK OFFSET LIST)
(G54)
(XY0 = CENTER)
(Z0 = TOP, -.015)
(*)
N1(.5000, .5 ROUGH EM,4FL,LOC 1., HSS, USED TOOL,)
(4FLTS 2.000LOC, 2.500RLF, 3.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19(XY STK= .015)
/G28 Y0.
T1 M6(2D - CONTOUR, CUT#3)
G90 G54 S5500 M3
X.0325 Y0. M8
G43 H1 Z1.(DOC= Z-2.9778, .025 THRU)
G17(XY PLANE) G90 Z.0625
G1 Z-.2377 F50.
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-.4755
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-.7132
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-.9509
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-1.1886
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-1.4264
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-1.6641
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-1.9018
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-2.1396
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-2.3773
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-2.615
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-2.8528
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 =====================================> Not needed
G1 Z-2.9778
X.0975 Y-.0375
G3 X.1075 Y0. I-.0649 J.0375
X-.1075 I-.1075
X.1075 I.1075
X.0974 Y.0375 I-.075
G1 X.0325 Y0.
G0 Z1.
M9
G91 G28 Z0.
/G28 Y0. M5
G0 G90 G54 X0.
M30
%(2,355 CHARACTERS = 2.36KB) -
1 hour ago, nickbe10 said:
Was working on my posts today, it's in MPMASTER as mi6. forces G94 (units/min) to output as G95 (units /rev).
Oh.... Yes, all you need to do is the MI6. If you want to change it just look for `gfeed of which contains G93, G94, G94, G95... Just change them at whatever code you want then it works fine. If you want permanently all you need is to remove the "if mi6$........" then just *gfeed, force it at your demand output.
-
On 11/26/2018 at 6:01 AM, tsaladyga said:
Anyone know how to force Inch per revolution in the post? We are running Okuma Horizontals and run all of them in IPR mode.
Thanks,
Todd
Do you mean G94? give me an example of G-CODE then I can help you out.
-
8 hours ago, tsaladyga said:
Hi Guys,
Question, We use pre-populated WCS values on all of our repeat work. Is there a way to have the numbers in the tool plane in Mastercam output through the post?
Can you give me an example of your G-CODE so I can understand what you need? I think I have that issue and I already fixed. Just to be sure not to answer the wrong one, I would like you to give me an example of G-CODE then I can help you out.
-
Thank you everyone, I downloaded. Great help from this forum, from great people.
-
3 hours ago, Newbeeee™ said:
Copyright? The hours you've spent working on it, I assumed it was at home and not at work.
If it was at work, you'd surely not have time to have written a program?
I have my own which is VERY COMPICATED for him to use and my company's which is simple and easy for him. He was the company's one but I told him I can do it for him just to make him run some simple jobs first.
-
Hello everyone,
First of all, thank you for the BIG HELP and here is what I found out from MPFAN.Add this...
# --------------------------------------------------------------------------
# General Output Settings
# --------------------------------------------------------------------------
force_feed : yes$ #Force output of feed rate on first feed move following rapid motion?
#Region pRapidOut
prapidout #Output to NC of linear movement - rapid
sav_gcode = gcode$
if convert_rpd$ = one,
[
gcode$ = one
feed = maxfeedpm
ipr_type = zero
]
#"DEBUG: ", ~mr3$, ~nextop$, e$
if tool_op$ = 19, "M0(AGAINST PIN STOP HERE)", e$
pcan1, pbld, n$, sgplane, `sgcode, [if gcode$ = 1, sgfeed], sgabsinc, pccdia,
pxout, pyout, pzout, pcout, [if gcode$ = 1, `feed], strcantext, scoolant, e$
[
if (opcode$ > 0| opcode$ < 6),
if (nextop$=1003 | (nextop$=1011 & t$<>abs(nexttool))),
"", else, e$
] # NO NEW LINE, COOLANT M9
if force_feed, result = force(feed) # Force output of feed next time it's called for output, FEED RATE AFTER RAPID ================ Add this line also
-
Thank you everyone for the help. My friend he just opened the shop and he needs something to start with his machine. I can't give mine because it is copy right from the company who I am working for.
Once again,
Big THANKS. -
Hello everyone,
I still remember in this forum about 5 years ago they let us download a free standard MPMASTER POST for free and now I don't see any more. Am I missing something?Thank you for the help,
S.Luong -
3 hours ago, 5th Axis CGI said:
Yes fix the machine and have it act like every other Fanuc on the planet.
Thank you, 5Th Axis. Insanely I have to ask people around because YCM demand to charge money whenever they trouble shoot something at the control and the thing is my company won' spend a dime on that because they thought everything is PERFECT as it is BRAND New.....
-
On 11/20/2018 at 3:03 AM, So not a Guru said:
I would think that you might be able to change that behavior thru the Fanuc parameters.
Sadly, the company think machinists are superman who can do everything. I have asked and they said "YOU FIGURE IT OUT..."... The only way is to trick in the post.
DYNAMIC MILLING ENTRY POINT
in Post Processor Development Forum
Posted
Does the circle has to be bigger than tool 2x time? What is the rule of thumb?
Thank you for your answer.