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:

Macro frustration


Recommended Posts

I have this macro that will calculate the work offset numbers from any angle to any angle with any given point(It is mike lynch's macro). And I am trying to prove the numbers using excel/calculator and they just do not jive and it is driving me nuts.

The problem boils down to how the controller is doing the math.

#108=-35.4335
#531=-47.9680

#111=#108-#531

On my calculator/excel #111=12.5345. On the control (Fanuc 30i A btw) it is 12.5325. I can draw this point in mastercam and the control is correct. I have a compound angle app that also gives me the number in the control yet my calculator/excel does not solve this the same way. WTF am I missing??

Link to comment
Share on other sites

I have checked this so many times I have lost count. I have rerun the program many times and still get the same results. I have the macro expression calculator and it solves to 12.5345. For whatever reason the 12.5325 number works out correctly when I draw the points in mastercam and rotate about center.

Link to comment
Share on other sites

Unless otherwise specified, Excel is going to give you linear type values. You're probably going to need to build some trig into your Excel formula to get the right number.

I've got an excel spreadsheet that calculates #19700 parameter value changes for me based on feature error, angle and position. It only gets me close. The probing MACRO stuff gets me the rest of the way.

I'm sure Excel can do it all, and do it correcvtly, I just don't know how to. :shrug:

JM2CFWIW

Link to comment
Share on other sites
9 hours ago, cncappsjames said:

Unless otherwise specified, Excel is going to give you linear type values. You're probably going to need to build some trig into your Excel formula to get the right number.

I've got an excel spreadsheet that calculates #19700 parameter value changes for me based on feature error, angle and position. It only gets me close. The probing MACRO stuff gets me the rest of the way.

I'm sure Excel can do it all, and do it correcvtly, I just don't know how to. :shrug:

JM2CFWIW

I have my excel formulas worked out. For the trig stuff you just need to use RADIANS to get the correct answer. If I change this one value my excel spreadsheet (and my calculator lol) works out correctly. I can't understand why the control solves this macro as 12.5325. If I do #111=[-35.4335]-[-47.968] it solves as 12.5345.

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