Scaling Calculator

The line between a raw value and what it stands for: counts to position, Hz to speed, a signal to a value.

Scale
Scaling

Measured points

Counts
Position
Point 1
inc
Point 2
inc

From the encoder

Encoder
PPR
Mechanics
i
Top speed

Check a point
Counts
Position
Check
inc
—
Measured
same counts

—

Target
—
Use the measured point as
Results

How it works

Every scaling here is one straight line: value = gain × raw + offset. Two measured points fix it: gain = (value₂ − value₁) / (raw₂ − raw₁) and offset = value₁ − gain × raw₁. The gain is the scaling factor a PLC or NC axis asks for, and 1 / gain is the same thing the other way round: counts per millimetre, hertz per metre a minute.

Worked example. An encoder reads 0 at the home position and 100 000 counts 2500 mm further on. gain = 2500 / 100000 = 0.025 mm per count, 40 counts per millimetre, offset 0. The encoder itself says the same: 1000 pulses per turn, read ×4, on a 100 mm feed, is 100 / 4000 = 0.025 mm.

Measured points define the line whenever they are filled in. The mechanics give the theoretical line: on its own it is the line, next to measured points it is the dashed comparison, and the measured one is divided by it. A factor of 0.97 means the belt runs 3 % slower than the motor and roller say it should. Each scaling has its own theory.

Encoder counts

feed ÷ (PPR × evaluation × ratio)

Position per count from the pulses per turn, the ×1/×2/×4 evaluation, the feed per turn and the gear ratio. Also the pulse rate at top speed, to check the input terminal.

Drive frequency

n ÷ f ÷ i × π × D

Speed per hertz from the motor's rated speed at its rated frequency, the gearbox ratio and the roller diameter. Measured below it: slip.

Speed setpoint

π × D ÷ i

Speed per setpoint turn from the gearbox and the roller: the effective feed constant of the axis.

Analog input

raw range → value range

A 4–20 mA or 0–10 V signal arrives as a raw integer, 0–27648 or 0–32767. Map its ends to the sensor's range and read any value in between.

Check a point looks up any raw value on the line, or slides along it. Type what you measured there and the difference is shown, as a value and a percentage; if that point is the better one, make it point 1 or 2 and the line moves through it. A target value gives the raw value that reaches it: the frequency for a conveyor speed, the count for a position.

The offset is where the line crosses zero. For an encoder it is the reference position; for a drive it should be 0, and a line that does not pass through zero points to a minimum frequency, a dead band or a measuring error.

Questions

What is encoder scaling?

The factor that turns encoder counts into a position: millimetres or degrees per count. It follows from the pulses per revolution, the ×1, ×2 or ×4 evaluation, the feed per revolution and any gear ratio in between, or from two positions measured against the count. TwinCAT calls it the scaling factor; Siemens works with length units per revolution.

How do I calculate a scaling factor from two points?

Measure the real value at two raw readings that lie well apart. The gain is the change in value divided by the change in raw reading, and the offset is the value at a raw reading of zero: gain = (y₂ − y₁) / (x₂ − x₁), offset = y₁ − gain × x₁.

Why is the measured conveyor speed lower than the frequency says?

An induction motor runs below its synchronous speed under load (slip), a belt can slip on its roller, and the effective roller diameter includes the belt thickness. The calculator divides the measured scaling by the theoretical one; a factor of 0.97 means the belt runs 3 % slower than motor, gearbox and roller predict.

How do I scale a 4–20 mA signal in a PLC?

The analog input delivers a raw integer, for example 0–27648 or 0–32767 across 4–20 mA. Map the raw value at 4 mA to the sensor's lower range value and the raw value at 20 mA to its upper one; every reading in between scales linearly. A raw value below zero means the current fell under 4 mA, usually a broken wire.

What does the check point do?

It looks up any raw value on the line, or slides along it. Type what you measured at that point and the difference to the line is shown as a value and a percentage. If that measurement is the better one, make it point 1 or point 2 and the line moves through it.

How precise is the calculation?

The line is fitted server-side in Python Decimal in the units you typed, and rounding is display-only. The plotted line is sampled from the same fit, with every measured point and the check point included exactly.

Need saved scalings and PDF export?

View Plans