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:

Recommended Posts

Hi Everyone, I was looking for help with some pretty common edits. Having trouble finding them using search so here we are....

1. How to get a " / " before all M8's

2. How to force your tool list in numerical order

3. How to put a line number " N_ " at every tool change

I apologize for asking when I am certain i have found info like this before perhaps in the industrial area..... usually if there is a real simple edit I can follow what others have put up here on the forum and make the edit myself i.e. force H and T match, Max Spindle RPM and so on... I suppose this is what we pay maintenance for but just trying to learn and get more comfortable making post edits myself.

Link to comment
Share on other sites

For #1, search in your Post for 'M8' or 'M08', and just add a slash in front of the M-code, just after the double-quotes:

(NOTE: there are two different 'coolant modes', and you select "V9" or "X-Coolant", in the Coolant Tab of the General Machine Parameters, in the Machine Definition File. It won't hurt to change both "M8" strings.)

# --------------------------------------------------------------------------
# Coolant M code selection for V9 style coolant
# Note: To enable V9 style coolant, click on the General Machine Parameters icon
#   in the Machine Definition Manager, Coolant tab, enable first check box
#   Output of V9 style coolant commands in this post is controlled by scoolant
sm09    : "M9"       #Coolant Off
sm08    : "/M8"       #Coolant Flood
sm08_1  : "M7"       #Coolant Mist
sm08_2  : "M88"      #Coolant Tool
scoolant : ""        #Target string

fstrsel sm09 coolant$ scoolant 4 -1
# --------------------------------------------------------------------------
# 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
# --------------------------------------------------------------------------
#X coolant has the option - First coolant off command shuts off ALL coolant options
sall_cool_off : "M09" #Coolant off command output with all_cool_off

 

  • Thanks 1
Link to comment
Share on other sites

For #2 you will have to learn about buffers.  I use two buffers, a string buffer for the description and a data fields buffer for all the numerical information.  Buffers can be challenging at first but not to bad after working with them for a while.  Buffers will automatically increment for you, but you can force it to go to a specific line.  That is how I push my tool information into the buffer, then when you read them out the tools are in order.

For #3 I make a counter variable that I increment at each tool change.  You just format the variable to have an "N" and nothing to the right of the decimal.  Then put it where you like.

 

Clarence Cook

Kootenai Machine Inc.

  • Like 2
Link to comment
Share on other sites

For number 3,

This is how I do it...

__________ assigning variable

#sav_n1     : 0     #Saved sequence number
#sav_n2     : 0     #Saved sequence number
#seq_1n     : 100   # Sequence number for segment 1 calls
seq_n       : 0     # Calculated sequence number for all segment calls
seq_2n      : 200   # Sequence number for segment 2 calls
seq_tool_n  : 0     # Sequence number for tool start blocks <<<<<<<<<<<<<<<<<<<<<<<<<
seq_tool_np : 0     # Sequence number for tool start pallet error blocks

___________ formatting ____________

fmt  "N" 7  n$           #Sequence number
fmt  "N" 4  seq_tool_n    #Sequence number for tool start blocks <<<<<<<<<<<<<<<<<<<<
fmt     4   seq_tool_np   # Sequence number for tool start pallet error blocks
fmt     4   seq_tool_n_1  #Sequence number for tool start blocks +1 for second probe
fmt     4   seq_tool_n_2  #Sequence number for tool start blocks +2 for second probe
fmt  "N" 4  seq_n       #Sequence number for calculated program segments
#fmt     4   seq_1n      #sequence number for segment 1 calls
fmt     4   seq_2n      #sequence number for segment 1 calls

_______________ assigning sequence numbers ___________

      if stagetool >= zero,
        [
        seq_tool_n = seq_tool_n + 1 #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#        seq_1n = seq_1n +1
        seq_2n = seq_2n +1
        seq_tool_n, "G91", "G30", "X0", "Y0", "Z0", e$
        "G00", *sgplane, *smetric, "G40", "G49", "G64", "G69", "G80", *sg90,

 

For number 2, how are you currently creating the tool list?

 

  • Like 1
Link to comment
Share on other sites
  • 2 weeks later...

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...