Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.
Use your display name or email address to sign in:
Hi All,
Thank you for the tips. I am no expert in post writing. I appreciate the feed back. I will edit my post and give it a go after the Christmas break. We have shut the machines down today for the year.
I wish all of you a Merry Christmas and I will let you all know the outcome.
Cheers
Dave
Hi Metal Slinger
This is an extract from my UMC post. You need to add your M73 and M74 here before you can do anything.
This will output through tool air by using the Coolant 4 seletion in your coolant selection dropdowns inside you operation parameter page.
# --------------------------------------------------------------------------
# Coolant output code selection for X style coolant
# Note: To enable X style coolant, click on the General Machine Parameters icon
# in the Machine Definition Manager, Coolant tab, disable first check box
# Output of X style coolant commands in this post is controlled by pcan, pcan1, & pcan2
scool50 : "M8" #Coolant 1 on value
scool51 : "M9" #Coolant 1 off value
scool52 : "M83" #Coolant 2 on value
scool53 : "M84" #Coolant 2 off value
scool54 : "M88" #Coolant 3 on value
scool55 : "M89" #Coolant 3 off value
scool56 : "M73" #Coolant 4 on value
scool57 : "M74" #Coolant 4 off value
scool58 : "M8(Coolant5=ON)" #Coolant 5 on value
scool59 : "M9(Coolant5=OFF)" #Coolant 5 off value
scool60 : "M8(Coolant6=ON)" #Coolant 6 on value
scool61 : "M9(Coolant6=OFF)" #Coolant 6 off value
Hi All,
I have written a macro for my control to hone bores using a flex - hone. Due to the flimsy nature of these tools it is generally a good idea to only start the spindle once the flex-hone is partially in the hole to avoid whipping. The spindle on M3 command is embedded in my controls macro . In order to use my macro as a drill cycle, I have setup a custom cycle (9). This is working perfectly, however, in the tool change area of my post I am wanting to stop the output of the spindle command for drillcyc$ 9 " only ".
OK so from my code below here is what is happening.
If I have drillcyc$9 (my honing cycle) in my operations, I am indeed getting no spindle output which is what I want, however, I am getting no spindle output for any other operations either including a standard 2d contour.
If I am using any other drill cycle I am getting the spindle output as required both in drill cycles and standard contours etc..
I have tried a few things, but I am at a loss now. I can't seem to force the spindle back on if I am using my custom drill cycle.
Thanks in advance for looking at this.
# --------------------------------------------------------------------------
# Start of File and Toolchange Setup
# --------------------------------------------------------------------------
p_goto_strt_tl #Make the tool start up at toolchange
pfd_shft_inc
psign_ang_out
##### Custom changes allowed below #####
#Unlock rotary axis
if use_clamp,
[
p_lock = zero
s_lock = zero
pbld, n$, s_slock, e$
pbld, n$, s_plock, e$
]
if stagetool <= one, pbld, n$, *t$, "M6", e$
if n_tpln_mch > m_one, #Toolplane mapping mode
[
#Enter your mapping scheme here...
pg68_map
pbld, n$, "G43", *tlngno$, *zabs_s, e$
pbld, n$, *sg00, pwcs, "X0.", "Y0.", *zabs_s, e$
pcan1, pbld, n$, *sgcode, *xabs_s, *yabs_s, *p_out, *s_out, strcantext, e$
]
else, #5 axis and regular mode ( n_tpln_mch = -2)
[
if cut_ra_head & use_g45, #Swap xout and yout based on offset axis
[
tloffno2 = tlngno$ + g45_of_add
n$, sg28, "Z66.386", e$
pcan1, pbld, n$, *sgcode, pwcs, *sg254, *sgabsinc, *yout, *p_out, *s_out,
*speed, *spindle, pgear, strcantext, e$
pbld, n$, "G45", *tloffno2, *xout, e$
]
else, #HONING ONLY
[
if drillcyc$ = 9, #NO SPINDLE OUT FOR HONING
[
n$, sg28, "Z66.386", e$
pcan1, pbld, n$, *sgcode, pwcs, *sg254, *sgabsinc, *p_out, *s_out,
*speed, pgear, strcantext, e$
*sg254, *xout, *yout, e$
]
else, #OUTPUT SPINDLE FOR ALL OTHER DRILLCYCLES
[
if drillcyc$ <> 9, #OUTPUT SPINDLE FOR ALL OTHER DRILLCYCLES
[
n$, sg28, "Z66.386", e$
pcan1, pbld, n$, *sgcode, pwcs, *sg254, *sgabsinc, *p_out, *s_out,
*speed, *spindle, pgear, strcantext, e$
*sg254, *xout, *yout, e$
]
else,
[
if opcode$ <> 3, "OUTPUT SPINDLE FOR ALL OTHER TOOLPATH TYPES
n$, sg28, "Z66.386", e$
pcan1, pbld, n$, *sgcode, pwcs, *sg254, *sgabsinc, *xout, *yout, *p_out, *s_out,
*speed, *spindle, pgear, strcantext, e$
]
else,
[
n$, sg28, "Z66.386", e$
pcan1, pbld, n$, *sgcode, pwcs, *sg254, *sgabsinc, *p_out, *s_out,
*speed, *spindle, pgear, strcantext, e$
*sg254, *xout, *yout, e$
]
]
]
]
if stagetool = one, pbld, n$, *next_tool$, e$
#Lock rotary axis
if use_clamp & (cuttype = zero | opcode$ = three | opcode$ = 16),
[
p_lock = one
s_lock = one
pbld, n$, s_slock, e$
pbld, n$, s_plock, e$
]
if n_tpln_mch > m_one, #Toolplane mapping mode
[
#Enter your mapping scheme here...
pg68
pbld, n$, *xout, *yout, *zout, pscool, e$
]
else, pbld, n$, "G43", *tlngno$, *zout, pscool, e$
##### Stop custom changes #####
eMastercam - your online source for all things Mastercam.
Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.