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:

end of file b axis commands


Recommended Posts

I am trying to change the end of file code on my programs for one machine. All the other B axis commands are exactly how I want them except at the very end of the program before the M2 line it is posting lock and unlock codes. This is unnecessary, I would either like them removed all together or if they are going to be at the end of the program I would prefer it read

G91G28Z0.0

M79(UNLOCK)

G28B0.0

M78(LOCK)

M2

%

Below is a screen shot of the current postout. Help is appreciated

eofchange.PNG

Link to comment
Share on other sites
swt_lock_codes        : 1      #Output Rotary Lock/Unlock M-codes
                               #0 = Off
                               #1 = Use lock codes for all operation types

This is the Rotary Output settings at the top of the post.

Try setting this to 0 to turn your lock codes off. This might not work as there has been some modification to the post.

We can try looking at pretract if this doesn't work to your liking. There is a conditional statement there for swt_lock_codes=1, so changing the setting to 0 should work.

Link to comment
Share on other sites

I need the lock codes as this is a horizontal machine. All the other lock codes output as they should and they don't post out at the end of every tool. Just at the end of the program, I am semi familiar with post editing just this particular issue has me stumped.

Link to comment
Share on other sites
19 minutes ago, RustyG said:

I need the lock codes as this is a horizontal machine.

peof$            #End of file for non-zero tool @end
      pretract
      if swt_lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
      rotretflg = 1
    #  pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
      #pbld, n$, *sg28, "Y0.", protretinc, e$
      rotretflg = 0
      if swt_lock_codes = one & rot_on_x, pbld, n$, *slock, slockcomm, e$
      comment$
      if not(index), n$, sgabsinc, e$
      uninhibit_eof_probe$
      n$, "M2", e$
      mergesub$
      clearsub$
      mergeaux$
      clearaux$
      "%", e$

So we can move to peof. Assuming you always want to zero the B axis a simple string literal would do the trick

peof$            #End of file for non-zero tool @end
      pretract
      if swt_lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
      rotretflg = 1
    #  pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
      #pbld, n$, *sg28, "Y0.", protretinc, e$
      pbld, n$, "G28 B0.", e$
      rotretflg = 0
      if swt_lock_codes = one & rot_on_x, pbld, n$, *slock, slockcomm, e$
      comment$
      if not(index), n$, sgabsinc, e$
      uninhibit_eof_probe$
      n$, "M2", e$
      mergesub$
      clearsub$
      mergeaux$
      clearaux$
      "%", e$

 

Link to comment
Share on other sites
peof$            #End of file for non-zero tool @end
      pretract
     # if swt_lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$<----ADD A # BEFORE THIS LINE
      rotretflg = 1
    #  pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
      #pbld, n$, *sg28, "Y0.", protretinc, e$
      rotretflg = 0
    #  if swt_lock_codes = one & rot_on_x, pbld, n$, *slock, slockcomm, e$<ADD # SIGN BEFORE THIS LINE
      comment$
      if not(index), n$, sgabsinc, e$
      uninhibit_eof_probe$
      n$, "M2", e$
      mergesub$
      clearsub$
      mergeaux$
      clearaux$
      "%", e$

That should comment the codes in that section

  • Like 1
Link to comment
Share on other sites
1 minute ago, RustyG said:

just tried it, no go, still has the lock unlock before the M2 and then %, 

I can't work out if you want the lock codes or not.

In your original post you asked to get rid of them completely, now you want them or not?

Link to comment
Share on other sites

the machine needs the lock codes to rotate, it does not lock, unlock automatically, also I want the machine to return to machine B0 at the end of the program for a few reasons. One of which we need it to be at B0 for pallet rotation, secondly if we are running parts out of the vises it may be faster for the operator to load parts from the operator door rather then shuttle the pallet out and load parts that way

Just now, nickbe10 said:

I can't work out if you want the lock codes or not.

In your original post you asked to get rid of them completely, now you want them or not?

worst case I was going to remove the redundant code at the end of the program, best case I would have it return to machine B0 as I stated in my above comment, sorry for the confusion

Link to comment
Share on other sites

Well, I jusr made the edit in the post you shared...from what I understand this end of program

This is what I am getting

N1300 M98 P65341057
N1310 G28 B0.
N1320 (1/2 ENDMILL / ROUGH EXCESS STOCK OFF /Z+.01)
N1330 G90 G54.1 P31 X-1.3763 Y-2.0172 Z1.
N1340 M98 P65341057
N1350 G28 B0.
N1360 (1/2 ENDMILL / ROUGH EXCESS STOCK OFF /Z+.01)
N1370 G90 G54.1 P30 X-1.3763 Y-2.0172 Z1.
N1380 M98 P65341057
N1390 G28 B0.
N1400 (1/2 ENDMILL / ROUGH EXCESS STOCK OFF /Z+.01)
N1410 G90 G54.1 P29 X-1.3763 Y-2.0172 Z1.
N1420 M98 P65341057
N1430 M05
N1440 G91 G28 Z0.
N1450 G90
N1460 G28 B0.
N1470 M2

OKK 3X HMC_FANUC.zip

 

with this peof

 

peof$            #End of file for non-zero tool @end
      pretract
      #if swt_lock_codes = one & rot_on_x, pbld, n$, *sunlock, sunlockcomm, e$
      rotretflg = 1
     #pbld, n$, *sg28, "X0.", "Y0.", protretinc, e$
      pbld, n$, *sg28, protretinc, e$
      rotretflg = 0
      #if swt_lock_codes = one & rot_on_x, pbld, n$, *slock, slockcomm, e$
      comment$
      if not(index), n$, sgabsinc, e$
      uninhibit_eof_probe$
      n$, "M2", e$
      mergesub$
      clearsub$
      mergeaux$
      clearaux$
      "%", e$

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