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:

Help with okuma macro


Recommended Posts

I would like to probe a diameter.  Save that diameter to a variable.  Then probe a z and subtract that z from half that diameter.  Basically I want to probe the top of a round and shift z to the center.  I use the easy set CALL O9023 macros and there is a shift var.  If is where Fanuc Macro B I understand that language somewhat.

 

thanks,

steve austin

Link to comment
Share on other sites

I can see a couple of issues here. First off you may not be probing on the outer tangency of the sphere, thus the radius measured will not be the true radius of said sphere. By shifting the measured radius you will not be in the true center of the sphere. If the sphere is always a known value, you could probe outside to find center, probe top, then probe outside again to center taking into consideration for the stylus radius.  Here is the code:

NPRB1
(ASSUMING X0. Y0. Z0. IS CENTER OF SPHERE)
(ASSUMING 1.0 SPHERICAL DIAMETER)
(ASSUMING 6MM STYLUS TIP)
T99 M06
G15 H1
G00 X0. Y0. M05
G56 HA Z2. M09
CALL O9832 (PROBE ON)
CALL O9810 PZ=.6 PF=100. (SAFE MOVE)
CALL O9814 PD=1. PZ=-.1181 (MEASURE BOSS DIAMETER)
VC1=VS75 (LOG MEASURED X POSITION)
VC2=VS76 (LOG MEASURED Y POSITION)
CALL O9810 PX=VC1 PY=VC2 (MOVE TO TRUE CENTER)
CALL O9811 PZ=.5 (MEASURE TOP OF SPHERE)
VC3=VS77 (LOG MEASURED Z POSITION)
CALL O9810 PX=VC1 PY=VC2 (MOVE TO TRUE CENTER)
CALL O9814 PD=1. PZ=-.1181 (MEASURE BOSS DIAMETER)
VC4=VS78 (LOG MEASURED DIAMETER)
CALL O9810 PZ=2. PF=300. (SAFE RETRACT)
CALL O9833 (PROBE OFF)
VC5=VC3-[VC4/2] (CALCULATE TO CENTER OF SPHERE)
G11 Z=VC5 (PARALLEL SHIFT OF COORDINATE SYSTEM)
M01


RUN TOOLS BELOW
...
...
G10 (CANCEL G11 SHIFT)
(NOTE: RESET WILL ALSO CLEAR THE G11 SHIFT)
M30
 

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
  • 2 years later...

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