AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

How-to

Wire draw absolute encoder scaling by measured endpoints

Sensors, encoders and machine vision on the machine Published 7 min read By AutomateDirectUSA engineering team

Short answer

Capture the raw Ethernet count with every scale disabled, record R1 at the machine's 0 in mark and R2 at its 150 in mark, and scale in the program that owns the connection: position = (raw count - R1) × 150 / (R2 - R1). The datasheet figures - 262144 counts per revolution and a 1073741824-count range - only predict a nominal span near 2,594,204 counts over 3810 mm; that prediction is a diagnostic check, not the scale factor.

On this page
  1. Start from the raw count, not the datasheet
  2. Capture the two endpoint counts
  3. Worked example: scaling a 150 in wire draw stroke
  4. Rule out rollover and data-format faults
  5. Verify the scale and leave a diagnostic trail
  6. Questions asked

Do not map the encoder's full count range onto the stroke. Capture the raw count exactly as the Ethernet connection delivers it, record R1 at the machine's zero position and R2 at its 150 in mark, and scale in the program that owns that connection: position in inches = (raw count - R1) × 150 / (R2 - R1). The specification values - 262144 counts per revolution and a 1073741824-count total - are not the scale factor. They predict a nominal span of about 2,594,204 counts across a 3810 mm stroke, and that prediction is the check that tells you the captured data is real before you commit the calibration. That gap between count range and installed travel is why max travel range can exceed an absolute encoder range, and it is why the endpoints, not the datasheet, decide.

Start from the raw count, not the datasheet #

The value you scale is the count exactly as delivered to the device or program that reads the encoder over Ethernet. Find that reader first - a controller tag, a field in a gateway, an input in your software - and disable every scale, offset, preset, clamp and unit conversion on the path while you measure. If an old scale stays applied, you are calibrating a number that was already scaled once.

Confirm what the reader receives before you move the machine. The user manual for the 842E family of EtherNet/IP absolute encoders (document 842E-UM001) documents the position as a 32-bit current position value and requires the input data in Data-DINT format; take the exact assembly and data-type names from your own encoder's integration manual. A field read with the wrong sign, or with reversed word order, produces enormous jumps that imitate scaling faults but are not.

Jog the axis slowly through its stroke and read the raw value against this table:

Raw count behavior while jogging What it tells you
Changes smoothly and steadily through the whole stroke The data path is sound; record the endpoint counts
Decreases as the wire extends Direction is reversed; the two-point equation absorbs it in a negative denominator
Jumps by an enormous value at one position Rollover, sign or word-order fault; fix before scaling
Freezes or stutters Not a scaling fault; repair the connection or mapping first

Only a count that behaves like the first row is worth recording.

Capture the two endpoint counts #

One safety note first: a draw wire is spring-retracted, so never pull it past its rated 5.2 m stroke and never let it release unchecked; the BCG13 data sheet rates the mechanism for 4 m/s² wire acceleration, IP50 enclosure and IP67 mounted mechanics (IEC 60529).

  1. In the program that owns the Ethernet connection, display the raw position as a signed 32-bit value with every correction disabled.
  2. Approach the machine's defined 0 in position from its normal operating direction and record the raw count as R1. Do not force the reading to zero; an absolute encoder can legitimately report a large count at mechanical zero.
  3. Move to the far endpoint - physically measured on the machine with its own scale or a calibrated tape, not assumed from the datasheet - and record the raw count as R2. The calibration is exactly as accurate as these two physical measurements.
  4. Return to each endpoint from the same direction and confirm the counts repeat within the accuracy the machine needs. If they wander, fix wire attachment, wire tracking, mounting slip or the count acquisition first; no equation repairs a moving zero.
  5. After the scale is in, visit each endpoint from the opposite direction as well. The gap between approach directions is mechanical hysteresis and wire slack, and it belongs in the machine's error budget, never in the scale.

If the count falls as the wire extends, R2 is smaller than R1 and the denominator goes negative; the result still climbs from the zero reading to the far endpoint's length, and no second inversion belongs anywhere else in the program.

Worked example: scaling a 150 in wire draw stroke #

The inputs, and where each comes from:

  • Stroke endpoints: L1 = 0 in and L2 = 150 in (3810 mm), the span the application needs, measured on the machine.
  • Counts per revolution: 262144, and total multi-turn range 1073741824 counts, from the encoder specification sheet for the unit.
  • Wire length per encoder revolution: 385 mm, from the wire draw model documentation.
  • Endpoint readings: R1 = 5,000,000 counts and R2 = 7,594,204 counts. These are example raw values for this worked case; a real installation records its own.

The rule, in words: the scale factor is the measured stroke length divided by the measured count span, and the position is the count's distance above R1 multiplied by that factor.

The arithmetic:

  • Nominal span check: 3810 mm / 385 mm per revolution = 9.896104 revolutions; 9.896104 × 262144 counts per revolution = 2,594,204 counts. Equivalently, 2,594,204 / 150 = 17,294.7 counts per inch.
  • Measured span: 7,594,204 - 5,000,000 = 2,594,204 counts.
  • Scale factor: 150 in / 2,594,204 counts = 5.78212 × 10^-5 in per count.
  • Position equation: position (in) = (raw count - 5,000,000) × 5.78212 × 10^-5.
  • Test point: raw count 6,000,000 gives (6,000,000 - 5,000,000) × 5.78212 × 10^-5 = 57.8 in.

Decision: the measured span matches the nominal prediction to the count, so the raw mapping and the mechanics are sound - commit the two-point scale with the factor above. Treat a measured span within about 2 percent of nominal, roughly 2,542,000 to 2,646,000 counts, as sound too; that band is a rule of thumb, not a specification. Outside the band, do not tune the scale: a span near half or double the prediction points at sign or word order, a span of zero means both endpoints recorded the same reading, and a wildly large span points at turn-count misinterpretation. Scaling the raw count across its full multi-turn range instead would stretch positions about 414 times, and scaling by counts per revolution alone returns revolutions, not inches, until the 385 mm-per-revolution conversion is applied. This is a calculated example for these inputs, not a measured test result.

Rule out rollover and data-format faults #

The total resolution of 1073741824 counts is 0x40000000 in hex - half of the signed 32-bit maximum of 2,147,483,647 - and it divides into 4096 full revolutions. Those numbers describe the encoder's multi-turn counting range, not the installed stroke: the whole 5.2 m wire spans only about 3.54 million counts (3,540,646), roughly a third of one percent of the range.

Check rollover before committing the scale. Record raw readings across the entire stroke and confirm consecutive differences stay small; one enormous step near a single position means the count crossed a numeric boundary. If the stroke crosses one, unwrap the count and scale the unwrapped result, or move the mechanical zero or preset so the stroke sits inside one continuous region - and document how that preset behaves across power cycles and encoder replacements, the same territory as troubleshooting an absolute encoder multi-turn counter alarm.

Data format is the other silent corruptor. A reader that assembles the 32-bit field in the wrong word order, or interprets it unsigned across the boundary, returns a span that cannot resemble the nominal 2,594,204 counts. Take the field layout and its Data-DINT requirement from the encoder's integration manual rather than guessing at bit positions.

Verify the scale and leave a diagnostic trail #

  1. Return to the zero mark: the scaled value must read 0.0 in. Move to the far endpoint: it must read the length you measured there.
  2. Check at least one independently measured intermediate position. In the worked case, a raw count of 6,000,000 must sit where the machine actually measures 57.8 in.
  3. Cycle zero, midpoint and full stroke in both directions and confirm the value is monotonic and repeats at each mark. Correct endpoints with an off midpoint mean nonlinearity - wire drift or drum variation - which a two-point linear scale cannot repair.
  4. Power the system down and up. The count is absolute, so it returns through a power cycle - what survives a power cycle in an absolute versus a quadrature encoder - and the scale constants live in your program, so the position must come back identical. If you set a preset during rollover work, verify its documented power-cycle behavior.
  5. Record R1, R2, how each physical endpoint was measured, the count direction and the exact location of the scaling code. The next technician recalibrates from that note instead of reverse-engineering the program.

Implementation details that matter: do the division in floating point so the scale does not truncate, apply any display rounding after the scale rather than to the raw count, and keep one unclamped diagnostic copy of the scaled position so overtravel and calibration faults stay visible.

The decision, restated: commit the scale when three things hold - the raw count moves monotonically, the measured span sits inside the sanity band around the nominal prediction, and both endpoints repeat from the operating direction. Anything else is a data-path or mechanical fault, and the two-point equation is the last step, not the diagnosis.

Questions asked

Do the two endpoints have to be the full design stroke?

No. Any two precisely measured lengths work. Use position = L1 + (raw - R1) × (L2 - L1) / (R2 - R1), with both lengths in the same unit, and the result reads directly in that unit. The shortcut used in the article is this formula with the zero mark and the full design span, so pick whichever two lengths the machine can actually reach and measure. What matters is that both positions are measured, not assumed, and that the same two counts become the constants R1 and R2.

What does the stated .001 resolution on a wire draw specification mean?

In the specification supplied with the unit, that value carries no unit, so it cannot serve as inches per count or as a scale factor, and it should not be treated as 0.001 in. If an accuracy decision needs the figure, read its definition and unit from the manufacturer's documentation for the exact part. The endpoint calibration already defines the installed resolution: the worked example resolves about 17,294.7 counts per inch, roughly 58 millionths of an inch per count.

Do the endpoint constants need re-teaching after a power cycle?

No. The position is absolute, so the count survives power off and the recorded R1 and R2 stay valid. Re-check the zero reading after anything that can move the mechanics or the count: wire reattachment, mounting or bracket work, an encoder or reader replacement, or a preset change made while fixing a rollover. Those events move the count at the zero mark, which is why R1, the measuring method and the date belong in the machine file beside the scale constants.

Keep reading

  • Troubleshooting

    Absolute Encoder Error Persists After Battery and Encoder Replacement

    When an absolute-encoder alarm survives a new battery and a new encoder, stop buying parts and split the chain: verify 3.6 V at the encoder-side battery connector, continuity-check the cable and shield, confirm the controller interface, then run the documented mastering or initialization the axis needs after any encoder swap.

    Sensors, encoders and machine vision on the machine

  • Selection guide

    Absolute encoder input card response time vs count rate

    Keep the 3-9 ms DC input card. Gray code changes one bit per count, so at a 10 ms count rate each input holds its level for two counts, 20 ms, against a 9 ms worst-case delay, and no transition is lost. The lag to budget is card delay plus PLC scan, about one to three encoder counts, which cam-switch replacement tolerates; the 0.8 ms card buys less than one count, so it is not worth a PLC family change.

    Sensors, encoders and machine vision on the machine

  • How-to

    Capturing Serial Absolute Encoder Data at Machine Startup

    A terminal board cannot read an absolute encoder's startup position until the amplifier's own interface document pins down the levels, the master, the request/reply timing and the framing. Verify those, decode one axis, validate it against a known move, then replicate the channel to all four axes.

    Sensors, encoders and machine vision on the machine