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:

G54 then G55


bogusmill
 Share

Recommended Posts

How do I run the same program on two similar parts at different locations on the same machine table?

 

I know I can copy the ops from the G54 location, change those to G55 and post it all together. I also know there is a way to post it so the ops run at both locations without doubling the size that the copied ops will generate. I've just never had to do this before.

Link to comment
Share on other sites

I've used that before but if I'm thinking right that still doubles the program size or I have to post it twice which is what I'm trying to get away from. What I'm thinking of is a kind of subprogram. Run this routine at G54 then at G55 kind of thing.

Link to comment
Share on other sites

Make your source toolpaths and try this with transform.

Should give you what you're looking for.

 

That didn't work. I ran it with the same settings in your example but it just started to run the first part again. If I enter the X & Y distance between G54 & G55 I could see it working

 

Just use sub programs.

 

%

O1000(MAIN)

G54

M98 P1

M1

G55

M98 P2

M30

%

 

I've never run sub programs before but that's how I thought it would be done. Is there a tutorial on it?

Link to comment
Share on other sites

Sub programs are exactly like regular programs, except that they end with M99 instead of M30.

 

Main programs call subs with M98 Pxxxx

 

Be careful that the sub program ends with the machine in exactly the same state that it was in when the sub started. For example, if the main program is in G90 and the sub is G91, make sure there is a G90 at the end of the sub.

Link to comment
Share on other sites

That didn't work. I ran it with the same settings in your example but it just started to run the first part again. If I enter the X & Y distance between G54 & G55 I could see it working

 

 

 

I've never run sub programs before but that's how I thought it would be done. Is there a tutorial on it?

 

Work good here.

 

This is the code you should be seeing out of the generic Hass post that comes with MasterCam according the settings in the pictures that I put up.

Is this what you're getting?

 

 

%

O0

(TEST)

(DATE=DD-MM-YY - 03-07-14 TIME=HH:MM - 12:45)

(MATERIAL - ALUMINUM INCH - 2024)

(ENDMILL)

G20

G0 G17 G40 G49 G80 G90

T1 M6

G0 G90 G54 X.1875 Y.0063 A0. S4000 M3

G43 H1 Z.25

M98 P0001

G90 G55 X.1875 Y.0063 Z.25 A0.

M98 P0001

M5

G91 G28 Z0.

G28 X0. Y0. A0.

M30

 

O0001

Z.1

G1 Z0. F25.

G41 D1 X.1625

G3 X.1563 Y0. I0. J-.0063

G2 I-.1563 J0.

G3 X.1625 Y-.0063 I.0062 J0.

G1 G40 X.1875

G0 Z.25

M99

%

Link to comment
Share on other sites

I am going to differ on that. Subs work best when they contain the full code. Except in his case, minus the G54/G55.

That way, when you start from the main, you do not have to worry about any other code problems, like G90, G40 H/D comps. spindle rpms, etc.

 

 

 

 

In this case he could just use the same P# in his M98 call since the only thing that should change is the G54/55:

 

%

O1000(MAIN)

G54

M98 P1 (SAME P#)

M1

G55

M98 P1(SAME P#)

M30

%

 

 

Any Fanuc program book has examples of subs.

Link to comment
Share on other sites

Sub programs are exactly like regular programs, except that they end with M99 instead of M30.

 

Main programs call subs with M98 Pxxxx

 

Be careful that the sub program ends with the machine in exactly the same state that it was in when the sub started. For example, if the main program is in G90 and the sub is G91, make sure there is a G90 at the end of the sub.

 

If you're moving to absolute positions to run subs switching G90 to G91 and back to G90. When outputting subs to run at G54 + work offsets you can remain in G90 because the subroutine is working from the new offset origin.

 

Bog are you using an older post that was updated from an earlier version of Mcam?

 

There's nothing wrong with restating the initial offset position for the work offset as in Oscar's example.

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