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:

Adding G05.1 to MPfan based post.


Bruce Caulley
 Share

Recommended Posts

Ahoy! I posted this in the off topic section by mistake.

 

I have searched and read up on a couple of threads related to this, but my post does not have the phsmon and phsmoff blocks. I am also a little hampered by an 18 month "holiday" from MC so the limited post tweaking abilities I did have are all but gone.

 

I have put:

 

code:

 

if mi4$=1, n$, "G05.1 P1", e$

!mi4

 

in Psof$ and have setup mi4 as needed. This is working great to turn it on, but I am having trouble with the placement of:

 

code:

 

if mi4$=1, n$, "G05.1 P0", e$

!mi4

 

in the correct place.

 

I want it on the line before the Z retract at the end of the op, but cannot for the life of me find the correct spot.

 

I also know I will need to do some logic to check previous value for mi4, but will try and plod through that myself before asking. [big Grin]

 

Any help appreciated.

 

Bruce

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Just trying to point you to the easiest solution my friend... biggrin.gif

 

But with that said... for certain reasons I won't go into right now...I had to add this to an MPFAN post today. I robbed the logic and associated stuff from MPMaster and it took me about 20 minutes.

Link to comment
Share on other sites

If the G05.1 is the only look ahead you're going to use and you want it automatically with no misc integer call...

 

Add a variable;

 

code:

g05_1_flg   : 0      #Flag to indicate G05.1 look ahead function is active

Add a couple postblocks;

code:

pg05_1_on         #G05.1 function on 

if opcode$ = 3 | opcode$ = 16,

[

if g05_1_flg = 1, pg05_1_off

]

else, if g05_1_flg <> 1,

[

pbld, n$, "G05.1", "P1", e$

g05_1_flg = 1

]

 

pg05_1_off #G05.1 function off

if g05_1_flg = 1,

[

pbld, n$, "G05.1", "P0", e$

g05_1_flg = 0

]

Search for all of your "G43" codes and add this in the line before;

code:

      pg05_1_on

Add it also in ptlchg0$. The location is going to vary here depending on your post, I would try in the line before

code:

..., pfcout, pfxout, pfyout,...

Turn it off in ptoolend$ and peof$

code:

ptoolend$        #End of tool path, before reading new tool data

!speed, !spdir2

if nextop$ = 1002, pg05_1_off

 

peof$ #End of file for non-zero tool

pg05_1_off

pretract

I thinks that is all you need.

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