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:

Probing macro for B-center on Okuma P300?


danielm
 Share

Recommended Posts

From an old comment for 5th axis, but this works just as good for 4 axis. You'd change the positions from Y&Z to X&Z

from this comment  CHECK HERE

 

On 3/6/2018 at 7:24 AM, Guess_who said:

If anyone cares, I created a similar program to find the -Y- and -Z- centerline based on 3 points. 

Basically, store the following variables then run the below code. It will set your 19700's. 

#750= 1st Y position

#751= 1st Z position

#752= 2nd Y position

#753= 2nd Z position

#754= 3rd Y position

#755= 3rd Z position

 

 


(MATH TO CALCULATE CL OF Y IS WITH 3 POINTS) 
#101=[[#750*#750]+[#751*#751]]*[#753-#755] 
#102=[[#752*#752]+[#753*#753]]*[#755-#751] 
#103=[[#754*#754]+[#755*#755]]*[#751-#753] 
#104=#101+#102+#103
#105=#750*[#753-#755]
#106=#751*[#752-#754]
#107=#752*#755 
#108=#754*#753 
#109=2*[#105-#106+#107-#108] 
#763=#104/#109( CALCULATE Y CENTERLINE)
#763=#763*100000 

(MATH TO CALCULATE CL OF Z IS WITH 3 POINTS) 
#101=[[#750*#750]+[#751*#751]]*[#754-#752] 
#102=[[#752*#752]+[#753*#753]]*[#750-#754] 
#103=[[#754*#754]+[#755*#755]]*[#752-#750] 
#104=#101+#102+#103
#105=#750*[#753-#755]
#106=#751*[#752-#754]
#107=#752*#755 
#108=#754*#753 
#109=2*[#105-#106+#107-#108] 
#764=#104/#109( CALCULATE Z CENTERLINE)
#764=#764*100000 
 
M00( PRESS START AGAIN TO UPDATE 19700 ETC)
( PRESS START AGAIN TO UPDATE 19700 ETC) 
(UPDATE 19700) 
G10G90L52
N19701R#763
G11
G10G90L52
N19702R#764
G11

 

 

  • Like 1
Link to comment
Share on other sites
55 minutes ago, Guess_who said:

From an old comment for 5th axis, but this works just as good for 4 axis. You'd change the positions from Y&Z to X&Z

from this comment  CHECK HERE

 

I'm pretty new to Okuma Macro lingo.....Its completely different than FANUC.    

Appreciate the tips tho.   

I'm sure that there's an OSP program that probes a sphere in three different B angles and then calculates for the center of rotation.   Im needing it more to educate myself  OSP macro logic than actually needing it for a job.     Hopefully I can find one.

 

Again....Thanks.

 

55 minutes ago, Guess_who said:

 

 

Link to comment
Share on other sites
55 minutes ago, danielm said:

 

I'm pretty new to Okuma Macro lingo.....Its completely different than FANUC.    

Appreciate the tips tho.   

I'm sure that there's an OSP program that probes a sphere in three different B angles and then calculates for the center of rotation.   Im needing it more to educate myself  OSP macro logic than actually needing it for a job.     Hopefully I can find one.

 

Again....Thanks.

7

 

Well, I'm no Okuma expert, but the macro math is the same. I believe Okuma can set anything as a variable , but mainly they use VC1 thru VC199

But you can also set anything as a variable like RAY1 or RAY2. Whatever

So change #101 to VC1, and change #102 to VC2, etc. And most other things are the same like EQ, LT, LE. GOTO

Does that all make sense?  

EDIT - I think I can convert this for you if you want. 

 

Try this, I think it will get you close. Your centerlines will be stored in V63 and V64

V50= 1st X position

V51= 1st Z position

V52= 2nd X position

V53= 2nd Z position

V54= 3rd X position

V55= 3rd Z position

(MATH TO CALCULATE CL OF Y IS WITH 3 POINTS) 
VC1=[[VC50*VC50]+[VC51*VC51]]*[VC53-VC55] 
VC2=[[VC52*VC52]+[VC53*VC53]]*[VC55-VC51] 
VC3=[[VC54*VC54]+[VC55*VC55]]*[VC51-VC53] 
VC4=VC1+VC2+VC3
VC5=VC50*[VC53-VC55]
VC6=VC51*[VC52-VC54]
VC7=VC52*VC55 
VC8=VC54*VC53 
VC9=2*[VC5-VC6+VC7-VC8] 
V63=VC4/VC9( CALCULATE Y CENTERLINE)
 

(MATH TO CALCULATE CL OF Z IS WITH 3 POINTS) 
VC1=[[VC50*VC50]+[VC51*VC51]]*[VC54-VC52] 
VC2=[[VC52*VC52]+[VC53*VC53]]*[VC50-VC54] 
VC3=[[VC54*VC54]+[VC55*VC55]]*[VC52-VC50] 
VC4=VC1+VC2+VC3
VC5=VC50*[VC53-VC55]
VC6=VC51*[VC52-VC54]
VC7=VC52*VC55 
VC8=VC54*VC53 
VC9=2*[VC5-VC6+VC7-VC8] 
V64=VC4/VC9( CALCULATE Z CENTERLINE)

 

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