Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: sparkyengle on October 20, 2010, 06:50:32 AM

Title: 4th axis setup cheat sheet
Post by: sparkyengle on October 20, 2010, 06:50:32 AM
Is there a setup sheet I can use to set up a 4th axis that I built. I am confused on units and how to configure Mach. Are they in degrees? Not really sure on all of the boxes to check in the configuration section. My stepper motor has 40 rotations for every 1 rotation on my axis chuck. I am using a G540 drive so it is in microsteps...I think? Therefor I am not sure of how many steps per inch I should put in the motor tuning section....HELP
Title: Re: 4th axis setup cheat sheet
Post by: Hood on October 20, 2010, 07:44:21 AM
Normally for a rotary axis you would use degrees so steps per unit in motor tuning for it would represent steps per degree.
You have 20 steps for  the motor and 10 microsteps for the drive so that is 2000 steps per motor rev. The motor turns 40 times for one rev of the chuck so that is 80,000 steps for 360 degrees so 80,000/360 = 222.222222222222 steps per unit.

Hood
Title: Re: 4th axis setup cheat sheet
Post by: Tweakie.CNC on October 20, 2010, 11:00:14 AM
For such purposes as cutting spur gears, machining splines or flats on round stock etc etc the position of the rotary axis is usually expressed in degrees. A GCode command such as G0 A10 will rotate the axis 10 degrees and so on. To set up the axis within Mach it is necessary to specify the ‘Steps Per’ (degree) and this is achieved by taking the steps of the stepper motor and multiplying by the micro stepping setting (if any) and then multiplying by the gear ratio then dividing the result by 360. In my case this is 200 (steps) x 8 (micro steps) x 60 (reduction ratio 60:1) / 360 (degrees) = 266.6666 steps per.

Although angular mode is the most common and also the most useful way in which a rotary axis is used there are alternatives….

When engraving on the surface of a cylinder, for example, it is convenient to have the rotary axis set for movement in mm but as this will vary, depending on the diameter of the work, there is a trick to getting it just right. One method for finding the ‘Steps Per’ is to calculate how many steps are necessary for the axis to complete one revolution and divide this figure by pi. In my case this is 200 (steps) x 8 (micro steps) x 60 (reduction ratio 60:1) / 3.142 (pi) = 30553.787 steps per to enter in Mach. Now this figure represents a linear movement of 1mm around the circumference of a 1mm diameter cylinder. In order that this can be used for any diameter of cylinder another calculation has to be performed and that is 1 divided by the diameter of the work (1/diameter). The result of this calculation is then entered into the rotary axis scale DRO within Mach. My version of Mach did not have an A axis scale DRO (like the X,Y &Z axis have) so this had to be added using Screen4 (for reference the A axis scale DRO is OEM Code 62 and it’s associated LED is OEM Code 44).

As an example, to engrave on the surface of an 80mm diameter cylinder it is 1 / 80 = 0.0125 so 0.0125 is entered in the A axis scale DRO now a GCode command of G0 A10 will rotate the axis so that the surface of the 80mm diameter work rotates 10mm. Using this method means that simple, conventional, engraving programs and existing GCode programs can be used for engraving onto curved surfaces such as tumblers, cups etc.

Although perhaps not quite as accurate as when the axis has been set up for angular movement in the first place - entering pi / 360 or 0.00873 into the A axis scale DRO will allow the axis to then operate in degrees ie. G0 A10 will rotate the axis 10 degrees.

Hope this helps,

Tweakie.
Title: Re: 4th axis setup cheat sheet
Post by: Greolt on October 20, 2010, 03:33:41 PM
Another very easy way to do what Tweakie talked about in the second half of post above, is to use CNCWrapper.

http://www.cncwrapper.com/

Greg
Title: Re: 4th axis setup cheat sheet
Post by: rhtuttle on January 11, 2011, 06:21:44 PM
Trying to get my head wrapped around this subject (pun intended) and I understand the steps/degree.  If I have a 60:1 gear ratio and a 10 micro step on a 1.8 degree stepper that would be 333.333333 / degree.  Now, what is a reasonable velocity to enter?  With that gearing, if I wanted to limit my stepper RPMs to 500 ( at this velocity there would be no load so no torque problems ), I would get 8.333 revs/min so I would enter a velocity of 3000.  Is that the way to calculate it?

TIA

RT
Title: Re: 4th axis setup cheat sheet
Post by: alenz on January 12, 2011, 02:18:02 AM
Yes according to my calcs you are correct all the way, ref spreadsheet at
http://www.machsupport.com/forum/index.php/topic,16315.0.html
to see result of various input parameters.
Al
Title: Re: 4th axis setup cheat sheet
Post by: RICH on January 12, 2011, 07:11:53 AM
RT,
Even if you calc you should try different velocities to see where the rotary will start to skip and adjust max velocity  same as you would do for a linear axis.

 RICH
Title: Re: 4th axis setup cheat sheet
Post by: chrismicro305 on August 05, 2016, 01:12:10 AM
For such purposes as cutting spur gears, machining splines or flats on round stock etc etc the position of the rotary axis is usually expressed in degrees. A GCode command such as G0 A10 will rotate the axis 10 degrees and so on. To set up the axis within Mach it is necessary to specify the ‘Steps Per’ (degree) and this is achieved by taking the steps of the stepper motor and multiplying by the micro stepping setting (if any) and then multiplying by the gear ratio then dividing the result by 360. In my case this is 200 (steps) x 8 (micro steps) x 60 (reduction ratio 60:1) / 360 (degrees) = 266.6666 steps per.

Although angular mode is the most common and also the most useful way in which a rotary axis is used there are alternatives….

When engraving on the surface of a cylinder, for example, it is convenient to have the rotary axis set for movement in mm but as this will vary, depending on the diameter of the work, there is a trick to getting it just right. One method for finding the ‘Steps Per’ is to calculate how many steps are necessary for the axis to complete one revolution and divide this figure by pi. In my case this is 200 (steps) x 8 (micro steps) x 60 (reduction ratio 60:1) / 3.142 (pi) = 30553.787 steps per to enter in Mach. Now this figure represents a linear movement of 1mm around the circumference of a 1mm diameter cylinder. In order that this can be used for any diameter of cylinder another calculation has to be performed and that is 1 divided by the diameter of the work (1/diameter). The result of this calculation is then entered into the rotary axis scale DRO within Mach. My version of Mach did not have an A axis scale DRO (like the X,Y &Z axis have) so this had to be added using Screen4 (for reference the A axis scale DRO is OEM Code 62 and it’s associated LED is OEM Code 44).

As an example, to engrave on the surface of an 80mm diameter cylinder it is 1 / 80 = 0.0125 so 0.0125 is entered in the A axis scale DRO now a GCode command of G0 A10 will rotate the axis so that the surface of the 80mm diameter work rotates 10mm. Using this method means that simple, conventional, engraving programs and existing GCode programs can be used for engraving onto curved surfaces such as tumblers, cups etc.

Although perhaps not quite as accurate as when the axis has been set up for angular movement in the first place - entering pi / 360 or 0.00873 into the A axis scale DRO will allow the axis to then operate in degrees ie. G0 A10 will rotate the axis 10 degrees.

Hope this helps,

Tweakie.
Hi Tweakie I can't find the page where you enter the A axis scale. please help.
Title: Re: 4th axis setup cheat sheet
Post by: Tweakie.CNC on August 05, 2016, 02:20:25 AM
Quote
Hi Tweakie I can't find the page where you enter the A axis scale. please help.

Sorry but my first answer was absolute rubbish so this is my second try  :-[

You could go back to an earlier version of Mach3 to a time before Scale was replaced by Radius Correct or as an alternative use a screen editor and add the A axis scale DRO to your screen.

Tweakie.
Title: Re: 4th axis setup cheat sheet
Post by: chrismicro305 on August 05, 2016, 02:33:08 PM
I did that and now I only have a blank screen and I don't know how to get my screens back. I only have the top menus.
Title: Re: 4th axis setup cheat sheet
Post by: chrismicro305 on August 05, 2016, 10:37:51 PM
Okay this is what I did, First the ratio of the 3020 is 2:1 and the steps per deg. work out at 8.8987*********. This is a trial and error method but it work, go to Config>Motor Tuning and set the Steps Per to 8.8987 or (10 like I did) and  Save axis settings, then go to Settings(Alt-6) clamp a hexkey short end in the chuck so that the long end is vertical, make sure when the chuck is turning that it can swing by the base of the engraver. Above the red reset button press the Set Steps per Unit button, select the A Axis radio button and press OK. enter 360 and press OK, the chuck will start turning, wait till it stop and measure the degrees it turned enter it in the block press OK and the software will calculate the steps per unit and will update the setting do the whole procedure again until the movement is 100% 360 degrees. You are ready to go.