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:

5 axis post question for MCAM9


mfranco
 Share

Recommended Posts

I am in the process of setting up a 5 axis post by using the MPGEN5x_FANUC.PST. I have everything working except for the program rotation.

 

Right now the post outputs as follows:

 

G65 P9096

T1 M6

M997 (TOOL MESUREMENT MACRO)

G65P9507 C270. B50. (SETS ROTATION PARAMETERS IN MACHINE)(C IS PRIMARY,B IS SECONDARY)

G65 P9503 (APPLIES COMP)

G68 X0 Y0 Z0 I0 J0 K1 R?(PROGRAM ROTATION R=C+90)

G68 X0 Y0 Z0 I1 J0 K0 R? (PROGRAM ROTATION R=B)

S400 M3

G90 G0 X-61.997 Y19.131

Z99.997

G81 G98 Z-15.R10.F45.

X-63.371 Y82.717

G80

M5

G69 (CANCELS COMP)

G91 G28 G0 Z0 (SENDS Z HOME)

M30

 

I have three issues

 

1. I would like to use G53 G0 Z0 to send Z home.

 

2. I would like to use #511=270. #512=50. instead of the G65 P9507 macro.

 

3. In the two program rotation lines I need the "*p_out, *s_out" values in for R. In the first program line - R=*p_out + 90 and the second should be R=*s_out.

In this post sample, the R should read R0. (270+0) and second line R should read R50.

 

This part of the post for these two lines is:

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I0 J0 K1 R", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I1 J0 K0 R", e

 

The first two issues are just preferences, but this last issue is necessary.

 

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Mfranco

quote:

1. I would like to use G53 G0 Z0 to send Z home.

For my post, I just change the G28 to a G53

 

From this;

quote:

#Select reference return code

sg28
G28
#First reference point return

sg30 G30 #Second reference point return

sg28ref #Target string

 

fstrsel sg28 mi3 sg28ref


To this;

quote:

#Select reference return code

sg28
G53
#First reference point return

sg30 G30 #Second reference point return

sg28ref #Target string

 

fstrsel sg28 mi3 sg28ref


I also removed "*sgabsinc" and added a "G49" from prefreturn;

 

From this;

quote:

pbld, n, *sgcode, *sg28, *sgabsinc, "Z0.", e

to this;

quote:

pbld, n, *sgcode, "G49", *sg28, "Z0.", e

As far as the rest, it's hard to tell what mods that you have made to your post for me to be much help.

 

,

Link to comment
Share on other sites

Thanks, I am not sure why I didn't see that.

 

As far as the rest of the post, I really haven't changed to much(mainly rotation limits and comments).

 

The part of the post program that outputs the tool change and angle rotation is below.

 

if stagetool <= one, pbld, n,"G65 P9096", e

if stagetool <= one, pbld, n, *t, "M6", e

if stagetool <= one, pbld, n,"M997", e

if stagetool <= one, pbld, n,"G65P9507", *p_out, *s_out, e

if stagetool <= one, pbld, n,"G65 P9503", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I0 J0 K1 R", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I1 J0 K0 R", e

 

Thanks again. Any additional help with the G68 lines would be great.

 

Note: Where I have 270+0 in the original post above, it should read 270+90.

Link to comment
Share on other sites

quote:

2. I would like to use #511=270. #512=50. instead of the G65 P9507 macro.

 

3. In the two program rotation lines I need the "*p_out, *s_out" values in for R. In the first program line - R=*p_out + 90 and the second should be R=*s_out.

In this post sample, the R should read R0. (270+0) and second line R should read R50.

 

This part of the post for these two lines is:

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I0 J0 K1 R", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I1 J0 K0 R", e

 

The first two issues are just preferences, but this last issue is necessary.

This should fix items 2 and 3 for you. There are probably easier ways to do this, but this seems to work. Let me know if this works out for you.

 

I'm assuming that you want #511 and #512 as outputs from the machine rotation position(?)

 

 

Add this to your fmt list

quote:

# ----------------------------------------------

# macro output

# ---------------------------------------------

fmt 11 m_511 # macro var 511

fmt 11 m_512 # macro var 512

fmt R 11 m_521 # macro var 521

fmt R 11 m_522 # macro var 522

# ----------------------------------------------

Change this

quote:

else

[

if stagetool <= one, pbld, n,"G65 P9096", e

if stagetool <= one, pbld, n, *t, "M6", e

if stagetool <= one, pbld, n,"M997", e

if stagetool <= one, pbld, n,"G65P9507", *p_out, *s_out, e

if stagetool <= one, pbld, n,"G65 P9503", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I0 J0 K1 R", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I1 J0 K0 R", e

To This;

quote:

else,

m_511 = p_out

m_512 = s_out

m_521 = m_511+90.

m_522 = m_512

[

if stagetool <= one, pbld, n,"G65 P9096", e

if stagetool <= one, pbld, n, *t, "M6", e

if stagetool <= one, pbld, n,"M997", e

if stagetool <= one, pbld, n, 35, "511=", *m_511, e

if stagetool <= one, pbld, n, 35, "512=", *m_512, e

if stagetool <= one, pbld, n,"G65 P9503", e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I0 J0 K1", *m_521, e

if stagetool <= one, pbld, n,"G68 X0 Y0 Z0 I1 J0 K0", *m_522, e

,

 

[ 06-08-2008, 06:58 PM: Message edited by: mgsanchez ]

Link to comment
Share on other sites

Better Still

 

else,

m_511 = p_out

m_512 = s_out

m_521 = m_511+90.

m_522 = m_512

[

if stagetool <= one,

[

pbld, n,"G65 P9096", e

pbld, n, *t, "M6", e

pbld, n,"M997", e

pbld, n, 35, "511=", *m_511, e

pbld, n, 35, "512=", *m_512, e

pbld, n,"G65 P9503", e

pbld, n,"G68 X0 Y0 Z0 I0 J0 K1", *m_521, e

pbld, n,"G68 X0 Y0 Z0 I1 J0 K0", *m_522, e

]

Link to comment
Share on other sites

I am running short on time right now so I just quickly inserted into post as mentioned above.It seems to have worked good except "R360. should read "0". I will looked into it a little bit more as soon as I can.

 

M997

# 511=270.

# 512=50.

G65 P9503

G68 X0 Y0 Z0 I0 J0 K1 R360.

G68 X0 Y0 Z0 I1 J0 K0 R50.

 

 

Thanks again. I will post back once everything is good.

Link to comment
Share on other sites

I just wanted to say thanks to you guys for helping me with this post. Although I have not been able to test it out completely, it does seem to work correctly. Over the next several weeks, I will be testing the post out before I put it out on the floor. As far as the 360+ degree output, that is just the program rotation and not the head rotation. If you have time you can post a sample, but if not, don't worry about it. I have learned alot by working on this post and I will be continuing to analyze it for better understanding.

 

Once again, thanks.

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