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:

Limit A +-180


Recommended Posts

Why do you still have your 4th Axis setup with -3600. and +3600. for Axis Travel on A. You want it limited then you must limit that in the MMD. Problem is going to be the fact if you ever need to do 180 degree and are not using that amount of travel you will never be able to get there. You might can do -179 and +180 and see if that will work, but not a simple task you are asking for and I would hire a professional post writer to do it.

You will also need to change you order of operations. I did make a simple change and got this output from your file. Of course you need to not use the Automagic crash process done by the planes and use the proven and safe way of setting workoffset for your planes and life is good. Your operation must follow a process of the work you are doing. You want all of your operations limited between a certain Axis range then you must program according to that thought process. Jump around then you are making it much harder to allow the post to do what it needs in my humble opinion.

%
O0000 (NC CODE)
(MCX FILE  - C:\USERS\RON\APPDATA\LOCAL\TEMP\CODEWORX A+-180.MCAM)
(PROGRAM   - NC CODE.NC)
(DATE      - FEB-07-2018)
(TIME      - 11:07 AM)
(T316 - 2"  FACE MILL        - H316 - D316 - D2.0000")
G00 G17 G20 G40 G80 G90
G91 G28 Z0.
(BACK A+90)
(COMPENSATION TYPE - COMPUTER)
N0316 T316 M06
(MAX - Z2.4468)
(MIN - Z2.171)
G00 G17 G90 G54.1 P0 A-90. X-10.2 Y1.6209 S1069 M03
G43 H316 Z2.371
Z2.321
G94 G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y-.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
Y-1.6209
X-10.2
G00 Z2.4468
G91 G28 Z0.
(TOP)
G00 G90 G54.1 P1 A0. X-10.2 Y1.6467
G43 H316 Z2.371
Z2.321
G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y-.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
Y-1.6467
X-10.2
G00 Z2.421
M05
G91 G28 Z0.
M01
(FRONT A-90)
(COMPENSATION TYPE - COMPUTER)
N0316 T316 M06
(MAX - Z2.4468)
(MIN - Z2.1968)
G00 G17 G90 G54.1 P2 A90. X-10.2 Y1.6209 S1069 M03
G43 H316 Z2.371
Z2.321
G94 G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y-.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
Y-1.6209
X-10.2
G00 Z2.4468
M05
G91 G28 Z0.
G28 Y0. A0.
G90
M30

 

Link to comment
Share on other sites

Well that worked just needed to change the order of operation.

Here is that posted code on 4 Faces. Again the order and method of your operation is going to control how you get output if you don't want to hire a professional post builder, but you can get it done just requires more work on your part when programming parts to keep the motion in the Limits you are asking for. I got away from the automagic crash your machine with make up what ever offsets you want and assigned the work offset the same for all the planes being used.

%
O0000 (NC CODE)
(MCX FILE  - C:\USERS\RON\APPDATA\LOCAL\TEMP\CODEWORX A+-180.MCAM)
(PROGRAM   - NC CODE.NC)
(DATE      - FEB-07-2018)
(TIME      - 11:41 AM)
(T316 - 2"  FACE MILL        - H316 - D316 - D2.0000")
G00 G17 G20 G40 G80 G90
G91 G28 Z0.
(BACK A+90)
(COMPENSATION TYPE - COMPUTER)
N0316 T316 M06
(MAX - Z2.4468)
(MIN - Z2.171)
G00 G17 G90 G54.1 P1 A-90. X-10.2 Y1.6209 S1069 M03
G43 H316 Z2.371
Z2.321
G94 G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y-.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
Y-1.6209
X-10.2
G00 Z2.4468
G91 G28 Z0.
(TOP)
G00 G90 A0. X-10.2 Y1.6467
G43 H316 Z2.371
Z2.321
G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y-.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
Y-1.6467
X-10.2
G00 Z2.421
M05
G91 G28 Z0.
M01
(FRONT A-90)
(COMPENSATION TYPE - COMPUTER)
N0316 T316 M06
(MAX - Z2.4468)
(MIN - Z2.1968)
G00 G17 G90 G54.1 P1 A90. X-10.2 Y1.6209 S1069 M03
G43 H316 Z2.371
Z2.321
G94 G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
G00 Z2.4468
X-10.2 Y-.5403
Z2.3968
G01 Z2.1968 F25.
X2.2 F50.
Y-1.6209
X-10.2
G00 Z2.4468
M05
G91 G28 Z0.
M01
(COMPENSATION TYPE - COMPUTER)
N0316 T316 M06
(MAX - Z2.421)
(MIN - Z2.171)
G00 G17 G90 G54.1 P1 A180. X-10.2 Y1.6467 S1069 M03
G43 H316 Z2.371
Z2.321
G94 G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
G00 Z2.421
X-10.2 Y-.5489
Z2.371
G01 Z2.171 F25.
X2.2 F50.
Y-1.6467
X-10.2
G00 Z2.421
M05
G91 G28 Z0.
G28 Y0. A0.
G90
M30
%

5th Axis CODEWORX A+-180

 

Link to comment
Share on other sites

Thanks Ron I appreciate the input

 

The A travel total in mach def  is not used for any calculation in MPmaster as its just used as a error check msg, and used for unwind logic.

I know re-ordering operations will give different results, but in real world application you have to have flexibility, Also if you don't have an A0 (top) operation between front/back post outputs to keep going in the same direction, +90 then +270, or -90 then -270.

Link to comment
Share on other sites
47 minutes ago, Codeworx said:

Thanks Ron I appreciate the input

 

The A travel total in mach def  is not used for any calculation in MPmaster as its just used as a error check msg, and used for unwind logic.

I know re-ordering operations will give different results, but in real world application you have to have flexibility, Also if you don't have an A0 (top) operation between front/back post outputs to keep going in the same direction, +90 then +270, or -90 then -270.

Then a custom post is sounds like is needed. You can try to work some magic with the Generic 5 Axis post, but think you will be better off using a 3rd party post since they are tied to the machine and control definition.

Link to comment
Share on other sites

You might be able to accomplish this with one_rev and manually adjust the limits in pcoutrev.

 

one_rev     : 0     #Limit rotary indexing between 0 and 360? (0 = No, 1 = Yes)

...

pcoutrev        #Rotary axis revolution calculation (Modify for wind-up)

...

      if index <> 1 & (rot_type > 0 | (one_rev & gcode$ = zero & (cuttype <> one | opcode$ = 3 | opcode$ = 16))),
        [
        while fmtrnd(cabs) >= 360,  #Change 360 to 180
          [
          cabs = cabs - 360
          if cuttype <> 1, rev = rev - 1
          ]
        while fmtrnd(cabs) < 0,  #Change 0 to -180
          [
          cabs = cabs + 360
          if cuttype <> 1, rev = rev + 1
          ]

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
2 hours ago, Alex Dales said:

You might be able to accomplish this with one_rev and manually adjust the limits in pcoutrev.

 

Not exactly but you gave me an idea that worked a treat, Thanks Alex

I ended up putting similar logic in Toolplane positioning.

pxyzcout0       #Toolplane Positioning
      xabs = vequ(x$)
      iout = vequ(i$)
      if cuttype = 2 & rot_on_x = two & vmc, c$ = -atan2(vtoolx$,vtoolz$)
      if rot_on_x = two, csav = -c$
      else, csav = c$
      while csav >= 180   				#added from here
          [
          csav = csav - 360
          ]
        while csav < -180,
          [
          csav = csav + 360
          ]						#to here

 

  • Like 1
Link to comment
Share on other sites

Alex Thank you posting that up. We normally make suggestions a little different. We will post up the original and then post up the changed section, but I was able to follow what you were saying.

For everyone else here is what you need to do.

     
if index <> 1 & (rot_type > 0 | (one_rev & gcode$ = zero & (cuttype <> one | opcode$ = 3 | opcode$ = 16))),
        [
        while fmtrnd(cabs) >= 180,  #Changed to 180 AD 2-8-18
          [
          cabs = cabs - 360
          if cuttype <> 1, rev = rev - 1
          ]
        while fmtrnd(cabs) < -180,  #Changed to -180 AD 2-8-18
          [
          cabs = cabs + 360
          if cuttype <> 1, rev = rev + 1
          ]

 

  • Thanks 1
Link to comment
Share on other sites
2 minutes ago, Codeworx said:

Not exactly but you gave me an idea that worked a treat, Thanks Alex

I ended up putting similar logic in Toolplane positioning.


pxyzcout0       #Toolplane Positioning
      xabs = vequ(x$)
      iout = vequ(i$)
      if cuttype = 2 & rot_on_x = two & vmc, c$ = -atan2(vtoolx$,vtoolz$)
      if rot_on_x = two, csav = -c$
      else, csav = c$
      while csav >= 180   				#added from here
          [
          csav = csav - 360
          ]
        while csav < -180,
          [
          csav = csav + 360
          ]						#to here

 

Nice work sir I learned something so thank you for posting that up.

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