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:

Pallet rotate post help


Recommended Posts

Hello, I'm using a horizontal mill and after a tool change my post calls the work offset before the pallet rotate which is correct, but when it rotates to another side mid tool it calls the rotate and then the offset. Because I have a rotation shift in the offset, I need it to call the offset first. Anyone know where to fix in post? Thanks

20201002_101148.jpg

Link to comment
Share on other sites

This is how I have it for the NHX.

 

Code example

T11 M06 (1/2 FLAT ENDMILL)
(MAX - Z2.3)
(MIN - Z-.4)
M08
G54.2 P0 (ROTATION CANCEL)
G54.1 P1(CENTER OF ROTATION)
G90 G55
M11 (UNLOCK)
G00 G17 B180. X-.8069 Y-9.003 S10500 M03
M10 (LOCK)

Post example

if safe_index,
            [
            "G54.2 P0 (ROTATION CANCEL)", e$
            "G54.1 P1(CENTER OF ROTATION)", e$
            [if not(index), sgabsinc, pwcs], e$
            if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
            pbld, n$, pgear, e$
            pbld, n$, *sgcode,  pfcout, pspindleout, e$
            if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
            pbld, n$, pfxout, pfyout, e$
            ]
          else,
            [
            "G54.2 P0 (ROTATION CANCEL)", e$
            "G54.1 P1(CENTER OF ROTATION)", e$
            [if not(index), sgabsinc, pwcs], e$
            if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
            pbld, n$, pgear, e$
            pbld, n$, *sgcode, pfcout, pfxout, pfyout, pspindleout, e$
            if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
            ]
          phsm1_on        #must remain before G43
          pbld, n$, "G43", *tlngno$, pfzout, scoolant, e$
          phsm2_on        #must remain after G43
          ]
        else,
          [
          if fmtrnd(prv_cabs) <> fmtrnd(cabs),
            [
            if safe_index,
              [
              "G54.2 P0 (ROTATION CANCEL)", e$
              "G54.1 P1(CENTER OF ROTATION)", e$
              [if not(index), sgabsinc, pwcs], e$
              if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
              pbld, n$,  pfcout, e$
              if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
              pbld, n$, pfxout, pfyout, e$
              ]
            else,
              [
              "G54.2 P0 (ROTATION CANCEL)", e$
              "G54.1 P1(CENTER OF ROTATION)", e$
              [if not(index), sgabsinc, pwcs],
              if lock_codes = one & not(index) & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
              pbld, n$,  pfcout, pfxout, pfyout, e$
              if lock_codes = one & not(index) & rot_on_x & cuttype = 0, pbld, n$, *slock, slockcomm, e$
              ]
            pbld, n$, pfzout, e$
            ]
          else,
            [
            "G54.2 P0 (ROTATION CANCEL)", e$
            "G54.1 P1(CENTER OF ROTATION)", e$
            [if not(index), pwcs], e$
            pbld, n$, sgabsinc,  pfxout, pfyout, pfzout, pcout, e$
            ]
          ]
        pe_inc_calc
        ps_inc_calc
        absinc$ = sav_absinc
        ]
      if lock_codes = one & cuttype <> last_cuttype & cuttype > 0, pbld, n$, *sunlock, sunlockcomm, e$
      if cuttype = zero, ppos_cax_lin
      if lock_codes = one & cuttype <> last_cuttype & cuttype = 0 & fmtrnd(prv_cabs) = fmtrnd(cabs), pbld, n$, *slock, slockcomm, e$
      if gcode$ = one, plinout
      else, prapidout
      pcom_movea
      if retractflg = 0 & op_id$ <> last_op_id,  #output if not forced output above with the G43
        [
        if mr1$ <> 2, phsm1_on
        if mr1$ = 2 & mr2$ <> last_mr2,
         [
         phsm1_on
         pbld, n$, "G43", *tlngno$, pfzout, e$
         ]
        phsm2_on
        ]
      c_msng$ #Single tool subprogram call
      plast
      toolchng0 = zero
 

 

also I'm using dynamic offsets, which work extremely  well. 

Link to comment
Share on other sites

Your output will either come from 'ptlchg$' or 'ptlchg0$', if your Post was based on a Generic Fanuc style Post from CNC Software. If you started with MPMaster, then it's coming from 'ptlchg_com'.

There is typically a 'Safe Index' option, for positioning the Rotary, which can be enabled by a variable in the Post, or sometimes hooked up to a Miscellaneous Integer for controlling output at the Operation level.

The Rotary Axis in any 4-Axis Post, is output by the variable 'c$'. (Address Label is a function of Variable Format Assignment, regardless of the variable name internally.)

Typically, the Post will use 'pcout' or 'pfcout', as the Post Block Call that ultimately outputs the Rotary value.

The variable 'c$' isn't used to output to the NC File though. It is for internal calculations of the rotary value. This is due to both "Modality" and because there is an Absolute/Incremental Switch that is typically set by 'mi2$'.

Since the Rotary can be output as either ABS or INC, there are different variables formatted for each output type.

The variables 'cabs', 'cinc', and 'index_out'.

There is a switch that is read typically from the Machine Definition, which tells the Post "the machine supports full rotary", or, "the machine only supports indexing to certain increments". This index increment is typically 1 degree, or sometimes 0.1 degree.

So normal rotary output will either come from 'cabs' or 'cinc', provided you are not in Index mode. (There is also a 'force_index' variable switch at the top of the Post.)

You mentioned you were running a Horizontal, so I assume you need "B" output for your rotary.

A quick way to narrow down the output variable, is to temporarily rename those Format Assignment Strings from "B", to "B1", "B2", and "B3", and then Posting a NC File with several Tool Change events, and check the code.

  • Like 1
Link to comment
Share on other sites
On 10/2/2020 at 6:26 PM, Colin Gilchrist said:

Your output will either come from 'ptlchg$' or 'ptlchg0$', if your Post was based on a Generic Fanuc style Post from CNC Software. If you started with MPMaster, then it's coming from 'ptlchg_com'.

There is typically a 'Safe Index' option, for positioning the Rotary, which can be enabled by a variable in the Post, or sometimes hooked up to a Miscellaneous Integer for controlling output at the Operation level.

The Rotary Axis in any 4-Axis Post, is output by the variable 'c$'. (Address Label is a function of Variable Format Assignment, regardless of the variable name internally.)

Typically, the Post will use 'pcout' or 'pfcout', as the Post Block Call that ultimately outputs the Rotary value.

The variable 'c$' isn't used to output to the NC File though. It is for internal calculations of the rotary value. This is due to both "Modality" and because there is an Absolute/Incremental Switch that is typically set by 'mi2$'.

Since the Rotary can be output as either ABS or INC, there are different variables formatted for each output type.

The variables 'cabs', 'cinc', and 'index_out'.

There is a switch that is read typically from the Machine Definition, which tells the Post "the machine supports full rotary", or, "the machine only supports indexing to certain increments". This index increment is typically 1 degree, or sometimes 0.1 degree.

So normal rotary output will either come from 'cabs' or 'cinc', provided you are not in Index mode. (There is also a 'force_index' variable switch at the top of the Post.)

You mentioned you were running a Horizontal, so I assume you need "B" output for your rotary.

A quick way to narrow down the output variable, is to temporarily rename those Format Assignment Strings from "B", to "B1", "B2", and "B3", and then Posting a NC File with several Tool Change events, and check the code.

Thanks for your help, if the pallet rotate at tool change is correct, but the rotate mid tool is not, is it still coming from ptlchg$

Link to comment
Share on other sites
21 hours ago, crazy^millman said:

Throw up a .z2g with the post attached and I will be glad to assist you get this sorted out. Don't want to attach here PM and I will give you my email address to email it to me.

Thanks for the offer, but I keep finding more and more wrong with my post. I think we're just going to have to get it fixed.

  • Like 1
Link to comment
Share on other sites
1 minute ago, JWIII said:

Thanks for the offer, but I keep finding more and more wrong with my post. I think we're just going to have to get it fixed.

It may not so much be wrong but more that it's not for that machine/control..but yeah, at times it's better to let the professionals handle it

Link to comment
Share on other sites
11 minutes ago, JWIII said:

Thanks for the offer, but I keep finding more and more wrong with my post. I think we're just going to have to get it fixed.

Well I run into a lot of situations where it is the Chocolate, Vanilla, Almonds and Peanuts issues than something wrong with the post. People are all different and they want certain things certain ways. 99% of the time the code out of the box will make good parts, but not be exactly like someone wants. That is preference issues and easily taken care of just need it detailed out and sample code given to make those changes.

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