# Scale an axis

**URL:** <https://forum.deltamotion.com/t/scale-an-axis/69>\
**Category:** RMCTools\
**Created:** [February 12, 2009, 2:07am UTC](https://forum.deltamotion.com/t/scale-an-axis/69 "2009-02-12T02:07:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Jacob\_Paso](https://forum.deltamotion.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@Jacob\_Paso](https://forum.deltamotion.com/u/Jacob_Paso)\
**Post date:** [February 12, 2009, 5:56pm UTC](https://forum.deltamotion.com/t/scale-an-axis/69/2 "2009-02-12T17:56:10Z")

</div>

I think the problem is that you are not taking into account the voltage at zero weight. Also, you can’t just set the actual position to zero when the weight is zero, because the actual position is in scaled position units, but the scale hasn’t been properly set yet, so it will be wrong. Anyhow, here is how to do it:

From the equation for a line, y = mx + b, the equations for calculating m and b are:

m = (y1 - y0)/(x1-x0)  
b = y0 - m_x0, or b = y1 - m_x1

m is the scale, b is the offset, x is volts, and y is position.

The procedure for calculating these is just like our Position/Counts scaling method:

1. With no weight (y0 = 0) on the scale, record the voltage (x0), call this something like VoltsZeroWieght.
2. With the calibrated weight (y1), record the voltage (x1), call this something like VoltsCalWeight.
3. Now, from the equation for m above, the scale is (CalWeight - 0)/(VoltsCalWeight-VoltsZeroWeight)
4. From the equation for m above, the Offset is: 0 - Scale \* VoltsZeroWeight

---

_[View the full topic](https://forum.deltamotion.com/t/scale-an-axis/69)._
