![MachMotion 2000 Series Operating Manual Download Page 19](http://html1.mh-extra.com/html/machmotion/2000-series/2000-series_operating-manual_3218583019.webp)
The Numerator, Denominator, and Offset values associated with an analog signal all deal scaling the user values of
the I/O point to the physical values of the I/O point. Analog values are represented by a certain number of bits, which is
often unwieldy for user use. For instance, a 16 bit analog value is represented by the range 0 to 65535, however an
operator probably prefers to think of it in terms of volts or percentage.
The Numerator is calculated as the range of values that the user wants to use. If they have a +/- 10V analog signal
that they want to think of in percentages, then the range is -100 to 100, and the which in turn makes the numerator
value 200 (100 - (-100) = 200). Alternatively, if they have a 0-10V analog signal, the range would be 0 to 100, making
the numerator value 100 (100 - 0 = 200). The numerator is the maximum of the range minus the minimum of the
range.
The Denominator is the range of physical values that the signal can support. For this, you need to know the number
of bits in the signal and if the signal is +/- or only positive voltage. The maximum value for the signal range will be
2^(bits - 1), and the minimum value will either be 0 or -(2^(bits - 1). For the 16 bit 0-10V, that works out to 2^(16 - 1)
= 2^15 = 65535 at the high end and 0 at the low end. If it were +/- 10V, then the low end would be -65535. The value
for the denominator is then the high end value minus the low end value. For our examples, either (65535 - 0 = 65535)
or (65535 - (-65535) = 131070.
The Offset is calculated from the numerator and denominator values. First, we need our m value, which we will get by
dividing the numerator by the denominator. Then we will use the upper values of the numerator range and the
denominator range to get the offset value. The offset is (upper numerator - m*(upper denominator)).
Beckhoff Slice Type
Bit Width
Denominator Lower
Denominator Upper
Denominator Value
Calculating Analog Scaling
16 bit +/- 10V Analog Output
Numerator range: -100 to 100
Numerator value: 100 - (-100) = 200
Denominator upper value: 2^(16 - 1) = 65535
Denominator lower value: -1 * (2^(16 - 1)) = -65535
Denominator range: -65535 to 65535
Denominator value: 65535 - (-65535) = 131070
m value: 200 / 131070 = 0.00152
Offset: 100 - (65535 * 0.00152) = 0
Numerator: 200
Denominator: 131070
Offset: 0