Jump to content

Welcome to eMastercam

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:

Custon cycles and pst modification


Recommended Posts

Hey guys, I am looking into doing some extra stuff in Mastercam besides the programming of toolpaths.

I want to educate myself on custom drill cycles as I have come across many times where I need specific toolpaths. I just don't want to get it done by our reseller because our company has stopped maintenance and they won't pay for it. Anyway, there are other little things I'd like to learn with machine definitions, like how to edit them. Example I want to add a machine command for air blow to the definition, and learn where to put it in the code, yada yada. Are there any tutorials around that kind of explain these methods?

Link to comment
Share on other sites

Ok well 2 things I'd like to do is add an M code to my coolant settings. The thing is I need to specify it on a specific line in the output as 2 m codes cannot be on the same line. Thats the first. I can get it to turn on by changing the post M7 to my air blow M140 but not sure how to turn it off after or where to put it.

The second thing I'd like to do is make a custom drill cycle that will allow me to start at a negative value but still retract above absolute Z0. Think of a counterbored hole 1" deep but I need to drill it 2" total. I realize I can start inside the hole by changing my r value however it won't retract to Z.1 (above the part 0), but rather only retract to Z-.9. So I'd like to make a cycle where it can start inside the hole but still retract out above with a Q peck value. These are the two main things I'd like to do but of course in the future would like to do a little more and more. Thanks.

Link to comment
Share on other sites

If you are useing X style coolant to have it output on a line by it's self set to on and before. This should output to a line by it's self like the following

 

Start

M8

M7

M88

M8(Coolant4=ON)

M8(Coolant5=ON)

 

 

End

M9

M9

M89

M9(Coolant4=OFF)

M9(Coolant5=OFF)

 

Look for this section in your post.

# --------------------------------------------------------------------------

# 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 : "M7" #Coolant 2 on value

scool53 : "M9" #Coolant 2 off value

scool54 : "M88" #Coolant 3 on value

scool55 : "M89" #Coolant 3 off value

scool56 : "M8(Coolant4=ON)" #Coolant 4 on value

scool57 : "M9(Coolant4=OFF)" #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

scool62 : "M8(Coolant7=ON)" #Coolant 7 on value

scool63 : "M9(Coolant7=OFF)" #Coolant 7 off value

scool64 : "M8(Coolant8=ON)" #Coolant 8 on value

scool65 : "M9(Coolant8=OFF)" #Coolant 8 off value

scool66 : "M8(Coolant9=ON)" #Coolant 9 on value

scool67 : "M9(Coolant9=OFF)" #Coolant 9 off value

scool68 : "M8(Coolant10=ON)" #Coolant 10 on value

scool69 : "M9(Coolant10=OFF)" #Coolant 10 off value

scoolantx : "" #Target string

 

fstrsel scool50 coolantx scoolantx 20 -1

# --------------------------------------------------------------------------

 

 

Link to comment
Share on other sites

I do use X style coolant. I've been down this road already about the air and can't get it to work. My original post asked about it but then got limited response to further debug my issue. http://www.emastercam.com/board/index.php?showtopic=76140&hl=

I have my coolant settings edited in general coolant settings to be "air blow" with the M140 to turn on (which outputs fine) and the M141 to turn it off, which does not output. It still outputs an M09 even though I have the option to "first coolant off command shuts off ALL coolant options" unchecked. In the post, I have that section modified for my air blast. I simply replaced M7 with M140 and the off for M7 to be M141. See pics

post-49390-0-33717300-1395492056_thumb.jpg

post-49390-0-85854700-1395492061_thumb.jpg

post-49390-0-17673000-1395492068_thumb.jpg

post-49390-0-52544300-1395492073_thumb.jpg

Link to comment
Share on other sites

In my experience "before" option works the "with" will not. Try using the "before" option instead of the "with" and see if it works with just one operation. Then select two operations and see if it still works. you have to single out where the problem is.

 

Check this section of your post as well.

 

pcant_out #Canned text - build the string for output

#Assign string select type outputs

if cant_pos < three, #cant_pos indicates canned text output

[

if cantext$ = three, bld = one

if cantext$ = four, bld = zero

#Build the cantext string

if cantext$ = one, strcantext = strcantext + sm00

if cantext$ = two, strcantext = strcantext + sm01

if cantext$ > four,

[

strtextno = no2str(cantext$)

strcantext = strcantext + strm + strtextno

]

]

else, #cant_pos indicates coolant output

[

coolant_bin = flook (two, cantext$) #Create binary value for each coolant using lookup table

if frac(cantext$/two), # coolant off

[

if all_cool_off,

[

if coolant_on, pbld, n$, sall_cool_off, e$

coolant_on = zero

]

else,

[

if coolant_on > 0,

[

coolant_on = coolant_on - coolant_bin/2 #Odd = off command, subtract appropriate binary value.

coolantx = cantext$ - 50 #Create a coolantx value for string select

pbld, n$, *scoolantx, e$

]

]

]

else, #Even = on command

[ #Determine if this coolant is already on

local_int = zero

coolantx = zero

suppress = zero

while local_int < 20 & coolant_on > 0,

[

result2 = and(2^local_int, coolant_on)

local_int = local_int + one

if result2 = coolant_bin, suppress = one

]

if suppress <> 1, #Don't output an on code for a coolant that is already on

[

coolant_on = coolant_on + coolant_bin #Maintain binary sum of all coolants currently on

coolantx = cantext$ - 50 #Create a coolantx value for string select

if cant_pos = four, *scoolantx #Coolant "With"

else, pbld, n$, *scoolantx, e$ #Coolant "Before" or "After"

]

]

]

Link to comment
Share on other sites

That is what I am trying to avoid with my original question. lol. I want to do it myself plus the company won't pay for it as they stopped maintenance. I had a feeling it would end like this, hence why i asked if there is any good links I can educate myself a little more on.

Link to comment
Share on other sites

Well see the it might be a problem with that version so all the links in the world will do you no good if it is a bug in that version. Other part companies in their penny wise $1000 dumb mentality forget about. Improvements to the software pay for itself. This is a perfect case of how much have you spent working this one issue? How much time do you waste and problems do you have with this issue? Spend the 10% on maintenance have everything liek you need and move on to more important things. Hers is what I have been telling people who refuse to pay maintenance. Take a snap shot of this company and keep it in your wallet. You like the way things are and are happy you will have the company at the same place 5 years from now when you wake up an realize you are being left behind. Love it with V9 people want to argue with me about how V9 was the best release ever. Then they are snailing along on Ti ar 3 and 4 IMP while I am helping other customers run it as 80 to 120 imp with the HST toolpaths. HST alone take nothing else like Live Levels Manager, Un-Limited undo or 64bit out of the equation just HST is enough for anyone to either decide to close their doors in the next 5 years or keep their programmers having the best tools possible. I am seeing 30% to 80% reduction on parts done with HST over parts done without them. One company I was just with is making an extra $32k on part a year. That is more enough to pay for a whole seat of Mastercam much less the maintenance. Sorry just blows my mind people complain about this and that and here is a prime example of why you should have it this minor thing much less the bigger picture and the bean counters who know nothing about manufacturing are making such a ignorant call.

Link to comment
Share on other sites

You don't have to convince me. I already know all that. I can't force the hand of the bigwigs. I deal with what I have, and that is not a lot unfortunately. Thanks anyway, I'm just about done trying to fix this broken xxxx company anyway. Time to move on.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

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.

Follow us

×
×
  • Create New...