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:

G52 - Shifting Z0 up - Fanuc 0MC


Brad McIntosh
 Share

Recommended Posts

In the following code sample, I want to be able to be able to do the following:

Shift the Z0 point up from the table according to the thickness of the material. All tools are to be measured to the table surface and the code is generated so that a negative Z cuts into the part and a positive Z is above the part.

I am not too familiar with the Fanuc contols but have been informed that a G52 Z# (where # is a positive number) will shift the Z0 reference upward by the specified value. My customer has been testing this out and it seems to work, but he informs me that during his tests he has to insert the code after the first tool change sequence as indicated below:

START

%

:1000

G17 G90 G20 G40 (SYSTEM INITIALIZE)

G54 (INITIALIZE POSITION)

G08 P1 (FAST CORNER FUNCTION)

M95 (ALL SPINDLE OFF)

M92 (ALL SPINDLE UP)

G91 G28 Z0. (INITIALIZE POSITION)

G91 G28 X0. Y0. (INITIALIZE POSITION)

(ACCELLERATION FACTOR)

G10 L50

N486 P350

G11

G90

(TOOLCHANGE)

G49 Z-2. M95 (TLOFS OFF & ALL SPINDLE OFF)

M92 (ALL SPINDLE UP)

G91 G28 Z0. (TOOL CHANGE POSITION)

T14

M11 (HEAD 1 DOWN)

M13 S18 (HEAD 1 ON)

G90 G55 (RESET SHEET REFERENCE HD 1)

G00 G43 H4 Z1. (TLOFS ON & RAPID HEIGHT)

G52 Z0.75 <<<------------ G52 HERE?

(START: PART 1)

G90

G0 X3.1055 Y9.6445

G0 Z0.1000

G19 G2 Y6.3750 Z-0.3700 J-3.2695 K11.1369 F350.

G17 G1 Y3.1055 F350.

G1 X9.6445 F350.

:

:

 

Once executed after the first tool change the setting seems to stick for the subsequent tool changes (and they all use a similar sequence). Is there any reason why the G52 could not be moved before the tool change code? I worry about the 'G00 G43 H4 Z1. (TLOFS ON & RAPID HEIGHT)' line if the part material is thicker than 1".

Any thoughts or experience you can share would be appreciated.

Link to comment
Share on other sites

Joe,

Thanks for you input, but maybe I should elaborate...

This is a woodworking application. The parts are cut out of sheet material (MDF, plywood, etc) and each job can use different material thicknesses. The programmer wants to be able to 'define' the thickness of the material through the program and not have to have the operator change settings on the control. That way the operator just has to make sure the proper material (say 0.75" MDF) is on the table and press start. The program will then adjust the tool lengths accordingly.

Link to comment
Share on other sites

Brad,

The G52 code shifts the position of the local coordinate setting. So if the setting being read is G55 (as in your example), this locates the X0 Y0 Z0 of the programmed point inside the controller.

Then if you put in a G52 line (as in G52 Z0.75) then you are shifting the local coordinate setting (G55) by that amount.

The reason why they want it after the toolchange section is because that is where the G55 coordinate settings are being read.

If you want to shift before toolchange, I would suggest something like this:

G91 G28 Z0

G55

G52 Z0.75

T01 M06

G90 G00 X*** Y*** S1000 M03

G43 H01 Z1.0 M08

G01 Z0.0 F10.0

...

Hope this helps Brad!

Luc

Link to comment
Share on other sites

Thanks Luc,

One more thing...

If later in the same program a new work coordinate offset is called (say a G56), should I again issue the 'G52 Z0.75' call right after it?

G91 G28 Z0

G55

G52 Z0.75

T01 M06

G90 G00 X*** Y*** S1000 M03

G43 H01 Z1.0 M08

G01 Z0.0 F10.0

...

G91 G28 Z0

G56

G52 Z0.75

T08 M06

G90 G00 X*** Y*** S1000 M03

G43 H08 Z1.0 M08

G01 Z0.0 F10.0

...

My understanding too, is that I should issue a G52 Z0 before the end of the program. Is this correct?

I appreciate the assistance. smile.gif

Link to comment
Share on other sites

G52 value is absolute. So after applying a work coordinate shift, the value should be reset by issuing a G52 Z0 then re-applying in after the coordinate system change (G56).

This is the way I've set it up in another post.

 

T01M06

G54

G52 Z1.0

G00 X...Y ... S1000 M03

G43 H01 Z0.5 M08

G01 Z... F10.0

...

...

G00 Z2.0

G52 Z0

G91 G28 Z0

T02M06

G55

G52 Z0.5

G00 X...Y ... S1000 M03

G43 H01 Z0.5 M08

G01 Z... F10.0

...

...

Link to comment
Share on other sites

Forget about the coordinate offsets and go straight to CNC code. In the beginning of your program, before any Z moves, just specify " G90 G92 Z (x); and you will have one value that can be fine tuned to any material. At the end of any CNC program you should also have "G92 G90 X0Y0Z0;" . I have a sub that returns (G00 G91 G28 X0Y0Z0 smile.gif and resets (G90 G92 X0Y0Z0 wink.gif everytime so there is no confusion. If you need to, you can add the optional stop M01 after the "G90 G92 Z (x);" so you can run it up to that point, then jump to any tool in the program. I used to insert a M01 after each tool just before the next tool change for the convenience of running any tool.

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