AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Torque Mode Servo Contact Measurement: Force Before Position

Servo and stepper motion Published 8 min read By AutomateDirectUSA engineering team

Short answer

To measure a part by touching it, run the servo axis in torque-control mode so contact appears as a torque rise rather than a following-error or overload fault, set the contact threshold above a measured unloaded stroke, and capture the encoder position in the same control cycle that accepts contact. Position mode treats a blocked axis as an error to correct, which fights the measurement.

On this page
  1. Why does a blocked axis in position mode fault instead of measuring?
  2. Why does torque mode turn contact into a measurement signal?
  3. How high should the contact threshold be set?
  4. How fast can the axis approach before position error ruins the measurement?
  5. How do you convert the captured encoder position into a dimension?
  6. What must the controller do after contact, and when contact never comes?
  7. Questions asked

Run the measuring axis in torque-control mode, not position mode. In torque mode a blocked axis simply draws the commanded torque while the drive keeps reporting position and current, so contact becomes a signal you can threshold and measure. In position mode the drive treats the same blocked axis as an error to correct and will trip an overload or position-deviation alarm before your sequence finishes. This article explains why that difference decides the measurement, how to set the contact threshold from a recorded empty stroke, and how to convert the captured encoder value into a dimension.

Why does a blocked axis in position mode fault instead of measuring? #

In position mode the position loop keeps trying to remove following error after the actuator is blocked, so torque climbs toward the drive limit and the drive answers with an overload or position-deviation alarm. The encoder stays readable, but the fault stops the cycle before you capture a controlled measurement. The fault arrives because a blocked axis in position mode is, by definition, an axis the loop cannot satisfy.

That is why the familiar mid-cycle faults behave the way they do: a hard obstruction reads the same as the overload conditions described in why a servo drive trips an overload alarm mid cycle, and the position error the loop accumulates is exactly the error-counter condition covered in servo error counter overflow alarm: check torque saturation first. You can read the encoder during those faults, but you are reading a system that is failing, not measuring. The remedy on those pages — cure the blockage — is the opposite of what a gauge wants, because here the blockage is the measurement.

A second problem is force. A position loop blocked at the product has no force command; it pushes with whatever torque removes error, up to the limit. The part sees an uncontrolled, rising force that compresses it and deflects the machine structure, and the recorded position drifts while that happens.

Why does torque mode turn contact into a measurement signal? #

In torque mode the drive regulates the commanded torque instead of a position target, so resistance at the product is a load condition, not a loop error. The axis approaches at whatever speed the motion falls out of the torque command, the encoder position stays available to the controller over the communications link the whole time, and contact shows up as the current needed to hold the command against the reaction force. No alarm fires, because nothing the drive regulates has been violated.

That is the whole decision: torque mode treats the stop as data, position mode treats it as a fault. The cost is responsibility. Torque mode establishes no travel limit by itself, so the machine controller must own the approach speed, direction, maximum travel and retraction. If the product is missing, the axis keeps moving until the controller stops it at the permitted endpoint — torque mode will not save it, and it is not a safety function.

How high should the contact threshold be set? #

Set the contact threshold above the highest torque the unloaded axis draws anywhere on the measuring stroke, plus a margin you can justify from repeated empty runs, and below the level that would compress the product or exceed the motor and drive ratings. There is no universal percentage; the number comes from your recorded empty strokes, and a worked example below shows the arithmetic.

The procedure is:

  1. Verify the actuator moves freely over the full measuring range; fix binding, misalignment and inconsistent drag first, because they pollute the threshold data.
  2. Run repeated empty strokes at the exact approach speed, direction and temperature range you will use in production, and record the torque or current feedback.
  3. Mark the unloaded envelope — acceleration, constant-speed and deceleration regions differ, so evaluate the constant-speed measuring region separately.
  4. Set the threshold above that envelope's worst case with a margin, and require the signal to stay beyond the threshold for a persistence interval or several consecutive controller samples, so one friction spike does not count as contact.
  5. If the unloaded envelope and the contact level overlap — high friction, high acceleration near the measuring zone — current-based contact detection cannot separate the conditions. Reduce mechanical friction, slow the approach into the measuring zone, or add a dedicated contact sensor.

Worked example #

Calculated example for these inputs only; take your own values from the drive's monitoring data and the machine's measured empty strokes.

  • Ball screw lead: 10 mm per screw revolution, servo coupled 1:1 to the screw.
  • Recorded unloaded torque envelope at the approach speed: worst case 0.8 N·m.
  • Chosen margin: 50% of that envelope → threshold = 0.8 × 1.5 = 1.2 N·m.
  • Motor rated torque (from the motor's rating data for the installed frame): 3.0 N·m, so the threshold sits at 1.2 / 3.0 = 40% of rated — inside the continuous region for a short contact, but confirm the continuous and peak ratings in the drive and motor rating data for your own dwell time.
  • Approach speed: 20 mm/s; controller cycle and drive feedback update: 10 ms total from contact to stop command; overrun ≈ 20 mm/s × 0.010 s = 0.2 mm, plus the deceleration distance, which sets the acceptance bias you calibrate out.
  • Encoder scaling (from the drive's electronic-gear and encoder documentation for the installed drive): 10000 counts per motor revolution, direct drive → 10000 / 10 mm = 1000 counts per mm.

If a production contact reads, say, 1.9 N·m against a 1.2 N·m threshold for 20 ms of persistence, that is accepted contact, and the encoder value captured in the same cycle converts through 1000 counts/mm.

How fast can the axis approach before position error ruins the measurement? #

Slow the approach until the distance traveled between physical contact, threshold acceptance and the stop response is small compared with the tolerance you are measuring. Every millisecond of latency moves the axis farther past the true surface, and the recorded position inherits that bias. The lever is approach speed, because latency is roughly fixed: in the example above, 20 mm/s with 10 ms of latency costs about 0.2 mm of overrun, while 5 mm/s under the same latency costs 0.05 mm. If you are measuring to tenths of a millimeter, the second speed is the one that works.

Capture the encoder position in the same controller task and cycle that evaluates the threshold, not in a later scan or a network poll, so unrelated delays do not move the recorded point away from the detection event. Reduce or retract the torque promptly after capture: continued holding torque compresses the product and shifts the apparent contact location after you have already recorded it.

How do you convert the captured encoder position into a dimension? #

Convert the encoder change into actuator travel with the actual scaling, transmission ratio and lead of your installed mechanism — take those values from the drive and actuator documentation for the parts you have, not from an example. The relationship, with the transmission ratio defined as motor revolutions per screw revolution:

travel_mm = (encoder_counts_change / counts_per_motor_rev) × lead_mm / transmission_ratio

For the example mechanism (10000 counts per motor revolution, 10 mm lead, 1:1 coupling), a captured change of 32500 counts from the datum gives 32500 / 10000 × 10 / 1 = 32.5 mm of travel. Whether that number is the dimension itself depends on your datum: if the captured position is distance from a fixed reference face to the probe tip at contact, the part width is that travel corrected for probe-tip geometry and the calibrated contact bias. Calibrate the whole chain — datum, overrun, compression — on a reference part of known width, then the correction becomes a constant instead of an unknown.

If the drive faults anyway on a production run, the alarm text and its corrective action live in the drive manual's troubleshooting chapter — the kind of fault-to-action listing found in chapter 11 of the SureServo 2 manual — and the isolation method in servo drive encoder phase alarm: isolate wiring, encoder or drive applies when the position feedback itself is in doubt.

What must the controller do after contact, and when contact never comes? #

After accepted contact: stop the approach, capture position, current and drive status together, retract, and hand the dimension to the machine logic. When contact never comes: stop at the maximum permitted approach travel, retract, and report a missing-product or detection-failure condition in the machine logic — never drive into the mechanical endpoint and treat whatever the drive faults with as the measurement. The controller, not the torque command, owns both outcomes; that responsibility is the price of the fault-free measurement, and the alarm-driven behavior behind why a servo shows a high torque alarm at standstill is what you are avoiding by owning it.

One safety note: torque-limited contact bounds motor force, not travel or stored energy elsewhere on the machine. Keep the hardware travel limits, guarding and stop functions your machine's risk assessment requires; this method lives inside them and does not replace them.

The decision: for a gauge that measures a part by pressing on it, use torque-control mode, set the contact threshold from measured empty strokes plus a margin, approach slowly enough that latency overrun fits the tolerance, capture the encoder value in the same cycle that accepts contact, and let the controller enforce travel and retraction. Position mode will fault at exactly the moment you need a reading, so it is the wrong mode for this job.

Questions asked

How many consecutive samples should confirm contact before I accept the measurement?

Choose the persistence from your controller cycle time and approach speed, not from a fixed count. Divide the distance the axis may safely travel after true contact by the approach speed to get the allowed acceptance delay, then require enough consecutive samples that one noisy scan cannot trigger it. On a 1 ms cycle with a 0.05 mm acceptance budget at 5 mm/s, roughly ten samples is a reasonable example.

Can a stepper axis do contact measurement the same way?

Not cleanly. An open-loop stepper does not report motor current or true shaft position the way a closed-loop servo drive does, so you have no torque feedback to threshold and no encoder value to capture at contact. For dimension measurement by touch, a servo with torque mode and a readable encoder is the practical choice; a stepper belongs on the move-and-probe stations elsewhere on this site.

What happens if the product is soft and compresses under the probe?

Compression shifts the apparent contact point: the axis keeps moving after first touch while force builds to the threshold, so the recorded position sits deeper than the true surface. Lower the threshold, slow the approach, and retract promptly after capture to limit the offset, then calibrate on a known reference part so the remaining bias becomes a correction rather than an error.

Is torque mode a safety function or a replacement for hard limits?

No. Torque mode bounds the motor's force, not its travel, and it does nothing for stored energy elsewhere on the machine. Keep the hardware travel limits, guards and stop functions the machine's risk assessment calls for, and treat torque-limited contact as a measurement method inside those protections, not a substitute for them.

Keep reading

  • Troubleshooting

    Servo error counter overflow alarm: check torque saturation first

    An error counter overflow alarm — alarm 29 on the drive family that numbers it that way — means the position error counter passed 134217728 counts, so the motor stopped following the command. Check the torque monitor first: output torque saturated at the limit points at the torque limit set-up, Pr5E on that family, or at a load the motor cannot move; torque below the limit points at the command pulses, the encoder wiring or the gains.

    Servo and stepper motion

  • Comparison

    Brushless AC Servo Position Control and Holding Torque for a Lathe

    A brushless AC servo matches brushed DC accuracy on a lathe axis when the drive commutates sinusoidally, runs in torque mode with a motor-mounted encoder, and sits behind a reduction. It holds by active current through the position loop within the continuous stall rating, and a brake covers power-off hold.

    Servo and stepper motion

  • Selection guide

    Counting Real Axes Before Selecting a Gantry Motion Controller

    Count independent servos, not marketing axes: this machine is 13 controlled axes (1 X, 4 Y, 4 Z, 4 C), so the controller must coordinate 13. Size the payload forces first — 300 N horizontal and about 1,772 N accelerating up on Z — then use a PLC with integrated motion driving servos on one deterministic fieldbus unless robot-style kinematics or conveyor tracking saves real development time.

    Servo and stepper motion