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:

Incremental contour


pete_hull
 Share

Recommended Posts

I'm trying to get mcam2018 to output a contour toolpath in .02 incremental moves in G91 mode. I'm controlling it with the segment length setting on the Arc Filter / Tolerance page. I modified an existing Fanuc post and the output looks good - Except - consistently on the first entity of the contour (7 line/arc entities total), whatever I do, the .02 segment length control is ignored . If I reverse direction , the segment control is ignored on what was previously the last entity so direction makes no difference . I'm getting around it by adding a piece of fake geometry at the start of the contour, but I am curious as to why this is happening.

 

incremental.jpg

Link to comment
Share on other sites

Hi Pete,

The MP Language has tools available to break linear moves "automatically". I believe that this would work for you, to control the segment length, without having to enable the "fixed segment length" in the Operation.

What specific Post is your Post based on?

In the "Generic Posts" from CNC Software, there is usually a "motion setup" Post Block named 'pmotion_su', which lets you manipulate the "incoming data" from the NCI File.

Here is a sample from MPFan:

pmotion_su      #Motion Setup (Set brklinestype & linarc)
      brklinestype$ = zero
      linarc$ = zero
      if rot_on_x,
        [
        if cuttype = one,  #Axis Substitution
          [
          linarc$ = one  #Linearize all arcs
          if rev_brkflag,  #Break rotation flag (set in pcoutrev)
            [
            brklinestype$ = 11  #Break all lines, use brklineslen$ for segment length
            #brklineslen$ = pi$ * rotdia$        #Break every 360 degrees
            brklineslen$ = pi$ * rotdia$ / four  #Break every 90 degrees
            rev_brkflag = zero  #Reset flag
            ]
          ]
        if cuttype = two, #Polar
          [
          brklinestype$ = rotary_axis$ + three
          linarc$ = one
          ]
        ]

 

You'll notice the first two lines in this Post Block, reset the Command Variable for 'brklinestype$', and 'linarc$'. (setting both to 'zero', turns them off.

Then, we have an "if statement", which checks to see "is there a Rotary Axis present in your Axis Combination?", which ends up setting the 'rot_on_x' variable. When this variable is "on" (not zero), it means we are in 4 Axis Mode.

So, if we are in 4X mode, then we check to see if we are using Axis Substitution, or Polar output. In the block to process each "mode", we can manipulate the values for:

linarc$ - Tells MP to "linearize Arcs", based on the Chordal Tolerance Variable

brklinestype$ - Tells MP "what kind of motion to breakup". This is based on a bunch of different options (11 different "modes" for breaking linear moves).

brklineslen$ - Tells MP what the length of each 'broken segment' should be. 

 

Here is a modified Post Block, which would break all linear motion, based on detecting if the Post was in "incremental output mode":

pmotion_su      #Motion Setup (Set brklinestype & linarc)
      brklinestype$ = zero
      linarc$ = zero
      if rot_on_x,
        [
        if cuttype = one,  #Axis Substitution
          [
          linarc$ = one  #Linearize all arcs
          if rev_brkflag,  #Break rotation flag (set in pcoutrev)
            [
            brklinestype$ = 11  #Break all lines, use brklineslen$ for segment length
            #brklineslen$ = pi$ * rotdia$        #Break every 360 degrees
            brklineslen$ = pi$ * rotdia$ / four  #Break every 90 degrees
            rev_brkflag = zero  #Reset flag
            ]
          ]
        if cuttype = two, #Polar
          [
          brklinestype$ = rotary_axis$ + three
          linarc$ = one
          ]
        ]
      if absinc$ = one, #We are in Incremental Mode, so break all linear motion into small segments
        [
        chord_tol$ = arcrad$ * .02                # Use 2% of Arc Radius, as Chord Tol Value.
        if chord_tol$ < .0001, chord_tol$ = .0001 #Trap and fix small values.
        linarc$ = one                             #Break all Arcs
        brklinestype$ = 11                        #Set "break type" to break all lines, using segment length 
        brklineslen$ = .02                        #Set "break segment length" distance
        ]

 

 

  • Like 4
Link to comment
Share on other sites

Colin,

 Thank you for taking the time to come up with this very elegant solution. I don't know if you have had experienced similar,  but the challenge was to use a HMC as a VTL substitute, and incremental moves with a B360. on each line has worked well, so wanted to figure out this little irksome issue.

  Not being patronizing when I say that having read many of your contributions to this forum, the level of your knowledge and your willingness to assist is exceptional . Thanks again.

 

  • Thanks 1
  • Like 5
Link to comment
Share on other sites

By the way Pete,

Just to finish up making this easy, you could also add the following to 'plinout':

Original:

plinout         #Output to NC of linear movement - feed
      pcan1, pbld, n$, sgfeed, sgplane, `sgcode, sgabsinc, pccdia,
        pxout, pyout, pzout, pcout, `feed, strcantext, scoolant, e$

 

Modified 'plinout', with additional 'pinc_rot' Post Block added above:

pinc_rot #Block to handle incremental or absolute B output
     #This block outputs 360 incremental B rotation, for special case
     if absinc$, "B360."
     else, pcout

plinout         #Output to NC of linear movement - feed
      pcan1, pbld, n$, sgfeed, sgplane, `sgcode, sgabsinc, pccdia,
        pxout, pyout, pzout, pinc_rot, `feed, strcantext, scoolant, e$

 

  • Thanks 1
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...