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:

Blank Line


Recommended Posts

Greetings all,

I want to add a blank line between operations. How do I go about doing this? I've tried several things and nothing has worked so far

Thank you,

Doug

 

G91G28Z0

G28X0Y0

M01

<*** BLANK LINE HERE***>

(TOOL COMMENT)

T1M6

G0G90X123 Y 123 S1234M3

 

Link to comment
Share on other sites
  • 3 weeks later...

@JParis - I'm struggling to figure this one out, I'm not sure where in the post to add the quotation marks to get the space. 

I'm very new to post editing and the more I play around the more I'm learning which is great.. but also extremely time consuming 😅.

I've tried adding it to a few locations with no luck, would it be before the tool comment in the "psof$" block of code? 

psof$            #Start of file for non-zero tool number
      pcuttype
      toolchng = one
      if ntools$ = one,
        [
        #skip single tool outputs, stagetool must be on
        stagetool = m_one
        !next_tool$
        ]
      pbld, n$, *smetric, e$
      pbld, n$, *sgcode, *sgplane, scc0, sg80, *sgabsinc, e$
      sav_absinc = absinc$
      pcom_moveb
      pcheckaxis
      c_mmlt$ #Multiple tool subprogram call
      
                         **HERE**
ptoolcomment
      comment$
      pcan
      pbld, *n$, *t$, sm06, e$
      pindex
      if mi1$ > one, absinc$ = zero
      if use_rot_lock & (cuttype <> zero | (index = zero & prv_cabs <> fmtrnd(cabs))), prot_unlock
      pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, [if use_3d_approach, pfzout],
        pfcout, [if nextdc$ <> 7, *speed, *spindle], pgear, strcantext, e$
      if use_rot_lock & cuttype = zero, prot_lock
      pbld, n$, [if not(use_3d_approach), pfzout], scoolant, pstagetool, e$
      absinc$ = sav_absinc
      pcom_movea
      toolchng = zero
      c_msng$ #Single tool subprogram call
Link to comment
Share on other sites

Hot damn! I think I got it

ptlchg$          #Tool change
      pcuttype
      toolchng = one
      if prog_stop = 1, pbld, n$, *sm01, e$
      if prog_stop = 2, pbld, n$, *sm00, e$
      pcom_moveb
      pcheckaxis
	
**added line here**  " ", e$
    
  c_mmlt$ #Multiple tool subprogram call
      ptoolcomment

 

that seemed to do the trick, hopefully nothing else got weird. 

  • Like 1
Link to comment
Share on other sites
20 hours ago, Colin Gilchrist said:

That should be where you want to add it. Basically >

psof$ = "the 1st tool change operation" in the Post

ptlchg$ = "the next 'actual' tool change operation

ptlchg0$ = "null tool change, tool number repeats"

 

Thanks Colin , everything at this point is helpful. I've managed to make some decent modifications to my post to eliminate having to edit so much after the fact. Most of which is aesthetics, but even after struggling through what I figured out yesterday today seemed to be a little easier.  

I'm currently trying to remove a single line "tool comment" note from my "GENERIC HAAS ST 4X MT_LATHE" 

I've added the spaces between tool changes, the "N" numbers at the start of each tool path and the G53 safe retract at the start of each cycle, all of which I've been doing by hand through CIMCO. so that's a huge improvement and a big time saver. 

my next conquest is to get rid of the "(TOOL - 1 OFFSET - 1)" in between my sequence number and tool info comment. 

post.jpg

Link to comment
Share on other sites
10 minutes ago, Jespertech said:

Thanks Colin , everything at this point is helpful. I've managed to make some decent modifications to my post to eliminate having to edit so much after the fact. Most of which is aesthetics, but even after struggling through what I figured out yesterday today seemed to be a little easier.  

I'm currently trying to remove a single line "tool comment" note from my "GENERIC HAAS ST 4X MT_LATHE" 

I've added the spaces between tool changes, the "N" numbers at the start of each tool path and the G53 safe retract at the start of each cycle, all of which I've been doing by hand through CIMCO. so that's a huge improvement and a big time saver. 

my next conquest is to get rid of the "(TOOL - 1 OFFSET - 1)" in between my sequence number and tool info comment. 

post.jpg

Both of these lines:

(TOOL - 1 OFFSET - 1)

(RGH TURN .03R   INSERT - CNMG-432)

Are output by the call to:

ptoolcomment

ltlchg$          #Toolchange, lathe
      toolchng = one
      gcode$ = zero
      copy_x = vequ(x$)
      pcc_capture   #Capture LCC ends, stop output RLCC
      c_rcc_setup$  #Setup LCC on first 60000
      plcc_lead_begin  #Save original in sav_xa and shift copy_x for LCC comp.
      pcom_moveb    #Get machine position, set inc. from c1_xh
      c_mmlt$       #Position multi-tool sub, sets inc. current if G54...
      ptoolcomment    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  Both lines, are output from this subroutine (post block) call
      comment$

 

Inside 'ptoolcomment' > the output comes from the following

Original Block:

ptoolcomment    #Comment for tool
      if tool_info = 1,
        [
        tnote = abs(t$)
        toffnote = tloffno$
        strtool$ = ucase(strtool$)
        stinsert2 = ucase(stinsert2)
        !spaces$
        spaces$ = zero
        scomm_fx_arg = drs_str(2, tnote) + drs_str(2, toffnote)
        pcomment_out
        if posttype$ = two, #Lathe toolpath operation
          [
          if tool_op$ = 64, [scomm_fx_arg = strtool$, pcomment_out] #Drill operation
          else, [scomm_fx_arg = strtool$ + " " + stinsert + stinsert2, pcomment_out]
          ]
        else, [scomm_fx_arg = strtool$, pcomment_out] #Mill toolpath operation
        spaces$ = prv_spaces$
        ]

Block, with Comments added for clarity:

ptoolcomment    #Comment for tool
      if tool_info = 1,
        [
        tnote = abs(t$)
        toffnote = tloffno$
        strtool$ = ucase(strtool$)
        stinsert2 = ucase(stinsert2)
        !spaces$
        spaces$ = zero

        # ************  The two lines below, output the TOOL - 1 and OFFSET - 1 >

        scomm_fx_arg = drs_str(2, tnote) + drs_str(2, toffnote)
        pcomment_out


        # ************ This code block, either outputs "lathe drill" comment, or "lathe insert" comments

        if posttype$ = two, #Lathe toolpath operation
          [
          if tool_op$ = 64, [scomm_fx_arg = strtool$, pcomment_out] #Drill operation
          else, [scomm_fx_arg = strtool$ + " " + stinsert + stinsert2, pcomment_out]
          ]

        # ************* This "else" block, outputs "Mill Tool Comments"

        else, [scomm_fx_arg = strtool$, pcomment_out] #Mill toolpath operation
        spaces$ = prv_spaces$
        ]
 

I didn't see originally that this was a Lathe Post.

For Lathes (with milling capability), the 'psof$', 'tlchg$', and 'tlchg0$' blocks are expanded, to include separate "milling" and "turning" toolchange blocks:

lsof$ > Lathe start-of-file (1st toolchange)

ltlchg$ > Lathe actual tool change

ltlchg0$ > Lathe Null Tool change (tool number repeats)

msof$ > Mill start-of-file (1st toolchange)

mtlchg$ > Mill actual tool change

mtlchg0$ > Mill Null Tool change (tool number repeats)

  • Thanks 1
Link to comment
Share on other sites
18 hours ago, Jespertech said:

Next rounds on me! 🍻

POST 1.jpg

POST2.jpg

By the way, check out the link in my signature. I've got an entire Basic Post Processing Class which was recorded back in 2016, which I've uploaded to YouTube. Be sure to watch the "Office Hours" video sessions, where we are doing the bulk of the "hands on" post development work.

  • Like 1
Link to comment
Share on other sites
1 hour ago, Colin Gilchrist said:

By the way, check out the link in my signature. I've got an entire Basic Post Processing Class which was recorded back in 2016, which I've uploaded to YouTube. Be sure to watch the "Office Hours" video sessions, where we are doing the bulk of the "hands on" post development work.

I've been meaning to watch through your series for a while, now that I'm getting some hands on experience it's definitely time to do so. 

  • Like 1
Link to comment
Share on other sites
  • 6 months 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...