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:

Rotation Transform issues.


BM150
 Share

Recommended Posts

Im having a problem with the rotation angle. While im working in TOP view ive got it working perfectly.

However if i work from the bottom the angle is inverse. I believe this angle is calculated from TOP without caring where you want it to work.

The code is rt_cinc = atan2(sub_m2$, sub_m1$)

 

If anyone could tell me what the sub_m values are and what's the best way to solve my issue.

 

Many thanks.

 

 

Link to comment
Share on other sites

I have not encountered this, but this is my best guess:

 

sub_m1$ is the value of m1$ that is normally transferred to a subroutine.  If you are having problems with the output from a rotated plane, try using m1$.

 

There are a lot of variations of the matrix variables, such as t_wcs_m1$, drl_m1$, cm1$ and sub_m1$.  All of them are derived from the original m1$, but may have been manipulated for different outputs in different areas.

 

HTH  :cheers:

  • Like 1
Link to comment
Share on other sites

From another thread:

 

 

EX-wccprogrammer, on 13 Nov 2014 - 07:37 AM, said:

If you are going to start from scratch, you will want to start with a 'positioning' post.  The matrix has all of the data to position any number of axes that your machine has.  As you change Tool Planes in Mastercam, the matrix changes.  The content in the matrix is the difference between the WCS and Tool Plane.

 

How position for each axis is calculated depends on your machine's configuration.  My machine is Rotary on Rotary, meaning that the B axis rotary rides on the A axis rotary.  This code calculates the positions for my machine:

          if m1$ >= 0, aabs = asin(m7$)
          if m1$ < 0, aabs = 180 - asin(m7$)
          if m5$ >= 0, babs = asin(m6$)*-1
          if m5$ < 0, babs = asin(m6$) + 180

You will need to find the proper formulas that output for your machine configuration.

 

Once you have good positioning output, then you can start adding vector calculations that add simultaneous multiaxis machining.  This is where everything gets complicated.  When one axis moves, it can change the values of all of the other axes.  The calculations to keep up with 6-Axis simultaneous will be brutal.  Each additional axis that a machine has requires an exponential increase in calculations.

 

 

The same logic would apply to your application, but the variables would change.  Play with it, you will find the right formula for your machine.  :cheers:

Link to comment
Share on other sites
I have not encountered this, but this is my best guess:

 

sub_m1$ is the value of m1$ that is normally transferred to a subroutine. If you are having problems with the output from a rotated plane, try using m1$.

 

There are a lot of variations of the matrix variables, such as t_wcs_m1$, drl_m1$, cm1$ and sub_m1$. All of them are derived from the original m1$, but may have been manipulated for different outputs in different areas.

 

HTH :cheers:

 

Thank you.

The t_wcs_m1 gave me the ability to analyse where top was to wcs top.

 

Cheers

 

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