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:

Using W axis for canned cycles on HBM - Post mod?


Gunna
 Share

Recommended Posts

I have seen several posts about this topic but I haven't had any luck.

The goal is to adjust our current post (Generic Fanuc 3 axis post) to be able to allow for a W axis when using canned cycles but output a Z location on the line before (can be manually adjusted at machine) and a W0. move on the homing line.

I have minimal experience modifying posts but I've been successful each time I have dug into it in the past.  

Currently our code for a simple canned cycle looks like this..

T1 M6
G0 G90 G54 X0. Y0. S1200 M3
G43 H1 Z1. M8
G98 G81 Z-.1 R.1 F4.
G80
M9
M5
G91 G28 Z0.
G28 X0. Y0.
M30

I'd like for find a way for the output code to look like this..

T1 M6
G0 G90 G54 X0. Y0. S1200 M3
Z-20.0
G43 H1 W1. M8
G98 G81 W-.1 R.1 F4.
G80
M9
M5
G91 G28 Z0. W0.
G28 X0. Y0.
M30

 

Any insight on accomplishing this?

Link to comment
Share on other sites

Attach a copy of your Post to this thread so someone can take a look. This is probably 5-10 minutes of work for me, and would be a good example for others, so I'd be happy to do it and share the results.

Only for Canned Cycles? Always "W" motion for the cutting, with a Z pre-position?

Easy to add a Z Position output before the Canned Cycle call. I would do that in 'ptlchg$' and 'psof$', by reading the value of a Miscellaneous Real Number, which would allow you to plug in a number in the Misc. Values, to trigger the output in the NC Code. (mr4$, or any of the other unused misc reals...)

For the Canned Cycle itself, you should use the 'nwadrs' function to "rename the prefix string" from Z to W, inside the canned cycle. (Then, in the Canned Cycle Cancel Post Block, use 'nwadrs' again to switch output back to Z.)

'pretract' and 'peof$' are where the retract cycles occur, so that would be easy to edit. Do you always want "Z0. W0." on every G91 G28 line, or only when a Canned Cycle was used? If always, that is super easy. If "only on the canned cycle", still easy, but would require setting a "flag variable" in the Canned Cycle Common block, to trigger the "W0." output on the retract/home line.

 

Link to comment
Share on other sites
On 10/28/2022 at 11:25 AM, Colin Gilchrist said:

Attach a copy of your Post to this thread so someone can take a look. This is probably 5-10 minutes of work for me, and would be a good example for others, so I'd be happy to do it and share the results.

Only for Canned Cycles? Always "W" motion for the cutting, with a Z pre-position?

Easy to add a Z Position output before the Canned Cycle call. I would do that in 'ptlchg$' and 'psof$', by reading the value of a Miscellaneous Real Number, which would allow you to plug in a number in the Misc. Values, to trigger the output in the NC Code. (mr4$, or any of the other unused misc reals...)

For the Canned Cycle itself, you should use the 'nwadrs' function to "rename the prefix string" from Z to W, inside the canned cycle. (Then, in the Canned Cycle Cancel Post Block, use 'nwadrs' again to switch output back to Z.)

'pretract' and 'peof$' are where the retract cycles occur, so that would be easy to edit. Do you always want "Z0. W0." on every G91 G28 line, or only when a Canned Cycle was used? If always, that is super easy. If "only on the canned cycle", still easy, but would require setting a "flag variable" in the Canned Cycle Common block, to trigger the "W0." output on the retract/home line.

 

Hello @Colin Gilchrist

I would be great to have when not in a canned cycle for it to output a W on a separate line for positioning but only canned cycles would be a major improvement. I say a previous post where you were speaking about this but I was struggling to get it done.

Yes, always "W" motion for cutting and Z pre-position for canned cycles.

Having "Z0. W0." on ever G91 G28 line is perfect yes.

Attached is the post as-well, any help is appreciated.

VIPER 3X VMC - Copy.pst

Link to comment
Share on other sites

Here is a quick example of how to do this for changing "Z" to "W", on-the-fly using 'nwadrs' function in the Post. I only enabled this for canned cycles currently, but hopefully that gives you something to use as an example for future development.

Check out the link in my signature to find videos on Post Processor Development, so you can learn how to do this yourself. (Lots to study!)

 

VIPER 3X VMC - Copy.pst

  • Like 1
Link to comment
Share on other sites
16 minutes ago, Gunna said:

@Colin Gilchrist Thank you! That is a major help and a great starting point.

You're welcome. Given that I've been developing Posts for a while, that took me less than 15 minutes, and gives a good example of "before and after" for anyone else following this thread. There is still more for you to do, but hopefully if you watch my videos, you can learn to start doing some of the development yourself. Necessity is the mother of invention, and I enjoy getting a chance to introduce people to the "dark arts" of Post Processor Development. It is a skill that has served me so very well over the course of my career!

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