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:

How to get Y0. at the end of the program on the last tool


Recommended Posts

Ive been messing around with my post just trying to find a way to know how to put y0. at the end of the last g91g28z0. line.  I can make it do it at the end of every tool, but how would you go about doing it just at the last tool? I always put the the program into the machine and forget to put that in.

Link to comment
Share on other sites
7 hours ago, Grimes said:

Ive been messing around with my post just trying to find a way to know how to put y0. at the end of the last g91g28z0. line.  I can make it do it at the end of every tool, but how would you go about doing it just at the last tool? I always put the the program into the machine and forget to put that in.

What post are you using?

Link to comment
Share on other sites

Look for the Post Block 'peof$'.

In 'peof$', one of the first calls is usually to 'pretract'.

Inside 'pretract' is where your "G91 G28 Z0." comes from.

When you are processing 'peof$', the value of the 'gcode$' variable is '1003'. This indicates the "End of File" NCI Gcode.

So, to only output "Y0." at the end of the file, add a line of code like this to 'pretract':

      if gcode$ = 1003, pbld, n$, "G91 G28 Y0.", e$

 

 

  • Like 1
Link to comment
Share on other sites
51 minutes ago, Colin Gilchrist said:

So, to only output "Y0." at the end of the file, add a line of code like this to 'pretract':

Hey Colin,

So in my posts this has been done using a string literal just before the M30 in peof$:

      n$, "G28 Y0.", e$
      n$, "M30", e$

What is the advantage of doing this from the pretract ?

I also just noticed this line commented out in peof$:

# pbld, n$, *sg28, "Y0.", protretinc, e$

are these just different ways to skin the cat or are there specific instances where one is better than the other (aside from zeroing out the rotary axis)?

  • Like 1
Link to comment
Share on other sites
4 hours ago, nickbe10 said:

Hey Colin,

So in my posts this has been done using a string literal just before the M30 in peof$:


      n$, "G28 Y0.", e$
      n$, "M30", e$

What is the advantage of doing this from the pretract ?

I also just noticed this line commented out in peof$:


# pbld, n$, *sg28, "Y0.", protretinc, e$

are these just different ways to skin the cat or are there specific instances where one is better than the other (aside from zeroing out the rotary axis)?

Just different ways to skin the donkey my friend. 

  • Haha 1
Link to comment
Share on other sites
1 hour ago, Colin Gilchrist said:

Just different ways to skin the donkey my friend. 

so that's my problem(s), all these years I've been skinning cats when I should have been skinning donkeys......just out of curiosity are the donkeys any easier to herd....?!

  • Haha 2
Link to comment
Share on other sites
On 5/8/2018 at 10:04 AM, nickbe10 said:

Hey Colin,

So in my posts this has been done using a string literal just before the M30 in peof$:


      n$, "G28 Y0.", e$
      n$, "M30", e$

What is the advantage of doing this from the pretract ?

I also just noticed this line commented out in peof$:


# pbld, n$, *sg28, "Y0.", protretinc, e$

are these just different ways to skin the cat or are there specific instances where one is better than the other (aside from zeroing out the rotary axis)?

I used the second way, found it by searching 1003. Just before the M30, is the # pbld, n$, *sg28... one. All i did was remove the # it posted "G28 X0. Y0. A0.". I just had to modify it to how I wanted it to post, I'm happy now thanks everyone.

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