Zeroing and adjusting with rotated CSR?

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Zeroing and adjusting with rotated CSR?

Post by Toaster »

This might be a tough one to explain on this forum so bear with me here:

I'm working on a zeroing script that detects the angle of a jig, and then sets the WCS offsets. I have the angle detection part down. (thanks to this forum).

The script hits two points on the jig and calculates the angle of the jig and then writes that angle to the current WCS.

If you've never done this before, it rotates the axis of X and Y, so if you have your axis rotates 45 degrees when you type into MDI "X12" your machine will actually move along X and Y because the X axis is now rotated 45 degrees.

If you JOG however, the jog moves aren't rotated. So if you jog along X with a rotated axis you'll see your X and Y move in your DRO because even though you're moving your machine physically straight, it's axes are angled. Make sense so far?

So here's where I'm stuck:

In my script, after I've rotated the axes I then want to zero X and Y to my jig. I have two fixed blocks in my jig that I'd like to zero to. They're NOT in the corner of the jig, they're set 1" inwards on both X and Y.

So normally if I wanted to do this I'd probe in from X, tap the jig, subtract my probe diameter and the offset of the block (in this case 1") and set my position there. That's easy.

The problem arises when my axes are rotated.... So let's say I have my axes rotated 45 degrees (this is extreme but it makes for an easy example). If I set my X axes to be equal to the machine coordinates + 1" it will actually set my X and Y to something like .5". If I was unrotated this would make my X axis 1" wherever it physically is located.

So the question is, without doing a whole bunch of fancy math, is there a way that I can easily "zero" my axes when I'm in a rotated axis situation?

I know Centroid can do this because I can do it manually with the probing routines, I'm just trying to automate this so I can save time each time I use a jig..

Swissi are you there? :)
cncsnw
Posts: 3765
Joined: Wed Mar 24, 2010 5:48 pm

Re: Zeroing and adjusting with rotated CSR?

Post by cncsnw »

The method that is easiest to understand will be to make whatever moves you need to make to put the tool/spindle/probe at the place you want to have become X0Y0, then execute 'G92 X0 Y0".
Muzzer
Posts: 728
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: Zeroing and adjusting with rotated CSR?

Post by Muzzer »

You did a handy little primer on this which is very helpful here http://www.cncsnw.com/G92G52M26.htm
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Zeroing and adjusting with rotated CSR?

Post by Toaster »

That did it! THANK YOU!
cnc_smith
Posts: 237
Joined: Mon Nov 20, 2017 10:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: Zeroing and adjusting with rotated CSR?

Post by cnc_smith »

Toaster,

If you are setting part X and Y 0.0 before you run the program you can use the probing cycles if you have that option. Your example at 45 degrees you just have to have the starting position further from the surface to allow clearance for the probe to move because it will only be moving 1 axis at a time based on machine position moves not with CSR angle. I have used the outside corner like you example said with using outside corner on a corner that is not at the corner of the fixture. After probing the tip will move over the corner and you can set it to what every X and Y you want. The example with an outside corner it will probe one side move to the other side and based on the angle of each side will move to the intersection of those side even with CSR on. While doing the probing with CSR on you will see CSR turned off and see the DRO display X an Y for the positions without CSR. When the probing cycle is done it will turn CSR back on. If you ESC during a probing cycle it will automatically turn CSR back on.
Dana

When requesting support, please ALWAYS post a current report.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Toaster
Posts: 195
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Zeroing and adjusting with rotated CSR?

Post by Toaster »

Thanks for the suggestion CNC smith, that's a bit how I was doing things before. The goal of this script is to fully automate the process so that one can just load the script and be guided through zeroing this particular jig. Now that I have the G92 stuff in the it's WAY easier, and it works!

Now I can take this jig, slap it down on the table, run this script and put the probe in the "starting area". (just to the left of the first block) and the rest happens automatically. Great for quick changeovers and for rookie operators!
Post Reply