# How to Scale a CNC Axis in Mach3

**Summary of video: **This informative five-minute video shows you, step-by-step, how to set up your axis so that the scale matches what the tables should be doing. Calculations are discussed for Teco, Mitsubishi, and Yaskawa. Types of machines include Ball Screw as well as Rack & Pinion (whether Diameter or Teeth driven). The MachMotion technician covers two ways to scale your axis in this tutorial.

**Video Transcript:**

0:08 On today's video I'm going to be telling you how to set up your axis so that the units match what the tables should be doing. Alright, so basically we have steps per, which is the main function that is going to adjust whether your table or axis whatever it is, is moving correctly or if it's out of sync. So, on each motor you have an encoder, and the encoder has a certain number of encoder counts on it, and based on the gearing and the machine coordinates, you're going to have a certain number of encoder pulses that translate to a certain distance on your machine. So if you have say a thousand encoder pulses steps per unit set then it will move a certain distance. And if you double that to 2,000, it will actually go twice as far, because it's going to be 2,000 steps per unit.

1:00 The object here is to set the number of encoder pulses per unit correctly so when you tell it on the screen to go one inch it goes one inch or millimeter or degree. Whatever you are using. To get your system set up so that the steps per matches what it needs to for your mechanics and everything, there are two main ways of doing it. There's one which is a brute force method which I'll tell you in a second, and then there's the calculation method. So to calculate it, I won’t go through the exact process. We've got a worksheet linked on this video so you can go and look at the worksheet. But these are the main pieces of information that you're going to be needing for your system for the most common mechanical configurations.

1:47 First off, you're going to need the number of encoder counts per revolution, just basically the encoder counts for your encoder. For Teco it's 10,000, Mitsubishi it's 131,072, Yaskawa it's 1,048,576. Different motion controllers have a limit on the number of pulses that they can actually output, so to avoid having super slow motion, we can use these software dividers basically to artificially reduce the number of encoder counts to allow for higher speeds (reduces precision but increases speed). So it's one of the things you might need to adjust depending on your application. Typically, we'll default to say 10, which will cut that down to 1,000. I think on the Yaskawa, we typically default that to 64. The number that you have in here is important to the calculation so you need to know what it is.

2:46 The three main types of motion systems that we typically see are ballscrew and then rack and pinion, and for rack and pinion there's actually two different ways of doing it. With the ballscrew, you'll need the ballscrew pitch, a gearbox ratio if you have one, and a pulley ratio, again, if you have one. Those will be the main elements that you will need for calculating the steps per for a ballscrew system. For the rack and pinion there's two ways, one is using the pinion diameter and the gearbox and pulley ratio, and the other is using pinion teeth and rack pitch to calculate using the pulley ratios as well.

3:27 The second method is quick, dirty, doesn't require any knowledge of what the mechanics are. It's not going to give you the exact number right away though, so it just depends on which one you want to do. So what you do, you go to config, then motortuning and pick your axis and pull the steps per value that you currently have on the axis that you are setting up, then you'll zero the axis, move it a distance on the table and then compare what the screen says, which will be the commanded distance to how far it actually moved on the table, so that will be your actual distance here. To measure it, you can use a tape measure, dial in or whatever device you want to figure out how far it actually moved. Then you multiply/divide, and this ends up with your new steps per value. You'll take that, go back to motor tuning, put it into the steps per field, hit the save access settings button so that you actually save your changes, and then go through the process again to check how close you are. You might need to do it two or three times until you get it precise enough for what you want, but this method is good if you don't know what your ballscrew pitch is or you can't see stuff or anything like that. This will always work, and this also is probably one of the better ways of doing it if you're doing it for a rotary axis because you can make one mark, do a nice precise 360 degree move and recalculate it for degrees. I hope you have a better understanding of how to scale your axis. If you'd like to find out more about MachMotion you can visit us at MachMotion.com and watch our other videos.