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:

post help


swanny
 Share

Recommended Posts

I want to clean up all the stuff in my post. Not sure if some of this can be done. This is the generic haas 5 axis rotary post that I'm trying to edit.

 

1st: I would like to remove date , time, mcx file, nc file, and material from notes.

2nd: I would like to remove all all the details from my tool list and just leave a cutter description and tool number, also be done at tool changes.

3rd: I would like it if my manual entry didn't split my 1st tool description and my toolpath comment. If possible I would like for it to be after my tool list

4th: I would like to get rid of the brake going on and off at each tool change and only go on and off during rotation.

 

If i can get rid of any of this it would be much appreciated. Thanks in advance for any help.

post-27774-0-95307500-1470077146_thumb.png

Link to comment
Share on other sites

 

1st: I would like to remove date , time, mcx file, nc file, and material from notes.

2nd: I would like to remove all all the details from my tool list and just leave a cutter description and tool number, also be done at tool changes.

3rd: I would like it if my manual entry didn't split my 1st tool description and my toolpath comment. If possible I would like for it to be after my tool list

4th: I would like to get rid of the brake going on and off at each tool change and only go on and off during rotation

 

Your 1st item is fairly easy. Look at the "pheader$" block and just place a "#" in front of those lines and they won't post anymore. You'll notice the header, by default, has a lot of options already "#"ed out. You can activate and de-activate them as you see fit.

 

Second item,

Easy-ish. You need to edit your ptoolcomment.

Personally, I would just disable the entire "tool list" cause I really don't like it. That's a simple setting in the "General output settings". There's a value called "tool_info" you can adjust.

 

3rd is unique because the start of file comments are handled differently from the toolchange comments. Look for the comment$ to play around. This one is tricky-ish.

 

4th. you need to be careful here. Best practice is to always have the codes if the post outputs rotary positions; and in your example, your post is outputting A0 and B0, therefore you need the lock codes. What if the operator moves the axis to measure a part mid cycle? The safest solution is to unlock, position, and lock, each time.

 

Anyhoo, backup your posts before you do anything and only solve one issue at a time. Try to do too much at once and you're destined for trouble!

 

My post is not intended to be a "cut and paste" fix, obviously... It's intended to point you vaguely in the right direction to self learn!

And full disclosure, I wrote this from memory so it may not be 100% accurate.

 

J

Link to comment
Share on other sites

The forth topic, is tricky, I am assuming its a Haas from the unlock and lock codes

 

A Haas does not need the lock and unlock codes for positional work. It will automatically unlock and then lock once the move is completed, as long  as you started in a locked state. If you unlock the rotaries through M codes, then the only way to lock the rotaries is through M codes. 

 

However the current Haas post needs to have the unlock and lock codes active, so it puts in unlocks when you are using the rotary axes to feed. Then it locks once the tool path is finished. 

 

Personally I think it would be best to control the lock/unlocks through Misc Integers, and set only the tool paths that need the  locks/unlocks in their respective tool path default settings. 

 

Another option would be to turn off the lock/unlocks and just put them in a manual entry before the start and at the end of full 4th and 5th axis tool path operations.

Link to comment
Share on other sites

I want to clean up all the stuff in my post. Not sure if some of this can be done. This is the generic haas 5 axis rotary post that I'm trying to edit.

 

1st: I would like to remove date , time, mcx file, nc file, and material from notes.

2nd: I would like to remove all all the details from my tool list and just leave a cutter description and tool number, also be done at tool changes.

3rd: I would like it if my manual entry didn't split my 1st tool description and my toolpath comment. If possible I would like for it to be after my tool list

4th: I would like to get rid of the brake going on and off at each tool change and only go on and off during rotation.

 

If i can get rid of any of this it would be much appreciated. Thanks in advance for any help.

 

Make a backup copy of your post before starting anything.

 

I will repeat make a back copy of your post before starting anything.

 

I like to make copies of the lines I am going to edit and just put the ## in front of the original that way I can compare what I changed to what was originally there.

 

Looks here for #1:

pheader$         #Call before start of file

      ##### Custom changes allowed below #####

      "%", e$
      !spaces$, spaces$ = 0
      *progno$, e$
      scomm_fx_arg = sprogname$, pcomment_out
      #scomm_fx_arg = "PROGRAM NAME - " + sprogname$, pcomment_out
      sopen_prn, "DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, sclose_prn, e$ #Date and time output Ex. 12-02-05 15:52
      #sopen_prn, "DATE - ", month$, "-", day$, "-", year$, sclose_prn, e$  #Date output as month,day,year - Ex. 02-12-05
      #sopen_prn, "DATE - ", *smonth, " ", day$, " ", *year2, sclose_prn, e$ #Date output as month,day,year - Ex. Feb. 12 2005
      #sopen_prn, "TIME - ", time$, sclose_prn, e$  #24 hour time output - Ex. 15:52
      #sopen_prn, "TIME - ", ptime, sclose_prn, e$  #12 hour time output 3:52 PM
      spathnc$ = ucase(spathnc$)
      smcname$ = ucase(smcname$)
      stck_matl$ = ucase(stck_matl$)
      snamenc$ = ucase(snamenc$)
      scomm_fx_arg = "MCX FILE - " + smcpath$ + smcname$ + smcext$     #Build temporary Mastercam file name string
      pcomment_out #Check comment length and output to NC file
      scomm_fx_arg = "NC FILE - " + spathnc$ + snamenc$ + sextnc$      #Build temporary NC file name string
      pcomment_out #Check comment length and output to NC file
      sopen_prn, "MATERIAL - ", *stck_matl$, sclose_prn, e$
      spaces$ = prv_spaces$

      ##### Stop custom changes #####

Where you don't want certain things put a # in front of that line.

 

For number #2 look here:

ptoolcomment    #Comment for tool
      tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
      if tool_info = 1 | tool_info = 3,
        [
        pstrtool #Convert strtool$ to uppercase if string is not empty
        scomm_fx_arg = strtool$ + sdelimiter + drs_str(2, tnote) + sdelimiter +
          drs_str(2, toffnote) + sdelimiter + drs_str(2, tlngnote) + sdelimiter + drs_str(2, tldia$)
        pcomment_out #Check comment length and output to NC file
        ]

ptooltable      #Tooltable output
      pstrtool #check strtool and force uppercase
      #Check comp_type, set sccomp_comm
      if comp_type > 0 & comp_type < 4, sccomp_comm = sdelimiter + slout(comp_type, scomp)
      else, sccomp_comm = sblank
      #Check xy_stock and z_stock, set sstock_left_comm
      if xy_stock <> 0 | z_stock <> 0, sstock_left_comm = sdelimiter + drs_str(2, xy_stock) + sdelimiter + drs_str(2, z_stock)
      else, sstock_left_comm = sblank
      #Build string for comment length check
      scomm_fx_arg = drs_str(2, t$) + sdelimiter + strtool$ + sdelimiter + drs_str(2, tlngno$) + sdelimiter +
        drs_str(2, tloffno$) + sdelimiter + drs_str(2, tldia$) + sccomp_comm + sstock_left_comm
      pcomment_out #Check comment length and output to NC file
      xy_stock = 0  #Reset stock to leave values
      z_stock = 0   #Reset stock to leave values

Remove what you don't want to see. Best to remove one at a time and see what happens verse removing a bunch of things and not being sure.

 

#3 is more than likely going to happen here:

psof$            #Start of file for non-zero tool number
      probe_head$
      ##### Custom changes allowed below #####

      if ntools$ = one,
        [
        #skip single tool outputs, stagetool must be on
        stagetool = m_one
        !next_tool$
        ]

      pbld, n$, *smetric, e$
      pbld, n$, *sg00, *sgplane, *sg40, "G49", "G80", *sg90, e$, #*sgfeed, *sg98, e$
      inhibit_probe$
      sav_absinc = absinc$
      absinc$ = one
      prefreturn #xout, p_out not output here
      absinc$ = zero
      p_absinc_chng
      uninhibit_probe$
      ptoolcomment
      comment$
      pcan

      ##### Stop custom changes #####

      psof_tlchg_blck #Start position block
      #Save the current brk_ in prv_brk_ for next loop
      pupd_brk
      absinc$ = sav_absinc
      p_absinc_chng
      pe_inc_calc

      # This call to 'pcom_movea' has been commented out to avoid
      # double output of canned text
      #pcom_movea

Here is gets a little tricky. May need to move something to the pheader. Likely output places are comment$ moving it around should help, but will take some tinkering to get it like you are asking.

 

#4 That one is really tricky and not sure why you don't think at the tool change is a good place to get this output. Normally if you need to do a mid start most machines need to read back to the toolchange. You start taking out needed codes and you might create other issues. If you have done this by hand and have proven you have no issues then look here and put #### in front of the section that says lock rotary Axis:

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
          pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, *yout, *p_out, *s_out,
            *speed, *spindle, pgear, strcantext, e$
          pbld, n$, "G45", *tloffno2, *xout, e$
          ]
        else,
          [
          pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, *xout, *yout, *p_out, *s_out,
            *speed, *spindle, pgear, strcantext, 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 #####

      if top_map, !n_tpln_mch
      psign_ang_res
      pcom_movea
      #locally set delta for feed calculation
      p_dlt_ang = zero
      s_dlt_ang = zero
      toolchng = zero

ptlchg0$         #Call from NCI null tool change (tool number repeats)
      #Cancel check in case missed in ptoolend
      if prv_n_tpln_mch <> n_tpln_mch, pg69
      !op_id$
      inhibit_probe$
      ##### Custom changes allowed below #####

      comment$

      # This call to 'pcan' has been commented out to avoid
      # double output of canned text
      #pcan

      pbld, n$, sgplane, e$
      pspindchng
      pbld, n$, pscool, e$

      ##### Stop custom changes #####

      psof_tlchg_blck #Start position block
      #Save the current brk_ in prv_brk_ for next loop
      pupd_brk
      toolchng = zero

      ##### Custom changes allowed below #####

      #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$
        ]

      ##### Stop custom changes #####

      ptlch_ret_app

My only concern it will you ever get the codes? You may or you many not and if not then you need what was there. If you comment out those sections and it works there that should pretty much take care of your problems.

 

 

Disclaimer all edits are use at your own risk. We take not responsibility for problems, damage or issues that arise from you taking on these post edits. Use at your own risk!!!!!!!

  • Like 2
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...