AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

How-to

Switching a hydraulic rotary axis between position and speed control

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

Short answer

Switch modes as a state machine: hold with position control at joystick neutral, leave neutral into traversal without position control, scale override.velocity with the deflection, decelerate to a verified standstill, then write the hold target to the stopped angle before re-enabling position control. Speed mode provides no force limiting, so supervise differential pressure against a torque-derived threshold in your own cyclic logic.

On this page
  1. How do you switch a hydraulic axis from position hold to joystick speed control?
  2. How much deadband does a joystick need around neutral?
  3. How do you turn joystick deflection into a velocity the axis will follow?
  4. How do you stop the axis and hand it back to position control?
  5. How do you limit force when speed mode offers no force limiting?
  6. How do you convert differential pressure at the motor ports into torque?
  7. Which states should the sequence run through, and in what order?
  8. Questions asked

A hydraulic rotation axis that must hold its angle whenever the operator leaves the joystick at neutral, and turn at a speed proportional to the deflection everywhere else, needs two controllers working to a schedule rather than one controller doing both jobs at once. Hold with the position controller. Move by switching the axis to traversal without position control and driving its velocity override from the joystick. Stop by ramping the override to zero and writing a fresh hold target at the stopped angle. Limit force yourself, because that speed mode provides no force limiting: supervise differential pressure in your own cyclic logic. The sequence below suits a ladle bucket, a turntable or any rotary axis driven directly by hydraulic motors, and each section ends with the decision to commission.

How do you switch a hydraulic axis from position hold to joystick speed control? #

You command the documented traversal without position control — the SIMOTION function for a positioning axis that runs on its speed loop alone — and you drive its velocity override, override.velocity, with the calibrated joystick deflection instead of a fixed speed target.

On SIMOTION the mode is documented as traversing of the positioning axis without position control: the position loop opens and the axis runs on its velocity loop, the same loop you close when you follow PID speed control of a hydraulic motor with pulse feedback. On an S7-1500T the axis functions documentation describes the same operation as switching the position control off and on again, carried out with the Motion Control instructions while the axis runs in non-position-controlled mode. Either way, the mode change is a commanded event, never a timed one.

The override is where first attempts stall. override.velocity scales the velocity of the motion that is already running; it does not start a motion, and it carries no direction of its own beyond the sign you give it. So give the traverse a fixed base speed, command it, confirm the controller reports the motion accepted and active, hold the override at zero, and only then start the cyclic writes. Check the documented range and sign behavior of the override for the installed release before you trust the mapping.

Opening the position loop does not open the safety net: encoder feedback, dynamic limits and motion supervision all stay in force during a traverse without position control.

Decision: position control owns the axis at neutral; the joystick leaving the deadband commands the traverse without position control; override.velocity, not a new position target, is the only knob that sets the speed after that.

How much deadband does a joystick need around neutral? #

Start at 5 percent of full deflection each side of center as a rule of thumb, then set the final band from measurement: it must sit above the joystick's electrical noise and its centering drift while the axis holds.

Log the raw input for a few hundred controller scans while the stick sits untouched at rest. The band has to clear two measured things: the noise on the signal and the mechanical centering drift as the stick ages. A reading that wanders within ±1 percent of full scale at rest leaves the 5 percent starting band with room to spare; a noisier input moves the band up, not the other way round.

Scale the region outside the band so the command leaves zero continuously: with band b and deflection d, both as fractions of full stroke, the usable command is (|d| − b) ÷ (1 − b) on each side. A band with a raw pass-through at its edge puts a step into the command, and a step into a proportional valve on a heavy rotary axis is a jolt the operator feels in the load.

Treat the stick as any proportional command, with the same one-span, one-neutral discipline used when controlling hydraulic cylinder position from a 0-10V analog input. The band-and-rescale recipe is standard, and this short guide to implementing joystick deadband in robot control code shows the logic, which transfers unchanged.

Decision: 5 percent of full deflection per side is the commissioning starting point; the rest-state log sets the final number.

How do you turn joystick deflection into a velocity the axis will follow? #

Write override.velocity once per controller cycle as a signed fraction of the axis speed limit: direction from the sign of the deflection, magnitude from a monotonic map that leaves zero at the deadband edge and reaches 1.0 at full stroke.

The map is the formula from the deadband section, applied cyclically while the traverse is active, and left untouched in Hold. It must be monotonic — more deflection gives more speed in the same direction, never a wiggle that flips the sign — because a non-monotonic map reads as jitter at the valve and in the operator's hands.

Verify the sign at commissioning with a small override and the machine clear: a positive write must increase actual position in the positive direction of the configured encoder. Then let the axis limits finish the job. Acceleration and deceleration settings on the axis turn a snapped stick into a ramp; filter the joystick signal for noise, but do not try to build the ramp into the joystick scaling and assume the valve will behave. The pattern of an axis continuously tracking a hand command is worked through in make a servo jog follow a joystick velocity demand, and those commissioning checks transfer directly.

Decision: one cyclic, sign-checked override.velocity write per pass, shaped by the monotonic map and bounded by the axis dynamic limits.

How do you stop the axis and hand it back to position control? #

Ramp the override to zero, wait until actual velocity falls into a standstill window you commissioned — for example 0.5 rev/min on an axis commanded at 5 rev/min — then write the hold target to the stopped angle before re-enabling position control.

Deceleration belongs to the hand-back, not to the joystick. When the stick re-enters the deadband, ramp the override toward zero and let the velocity loop stop the rotating mass. A standstill window of about one percent of the commanded speed is a workable criterion: against a 5 rev/min command that is 0.5 rev/min, and the hand-back waits until actual velocity stays inside that window.

Then write the hold target, and write it to the angle where the axis actually stopped. Reusing the target from before the move is the classic fault in this sequence: the position controller wakes up, sees a large error against the old angle and drives the bucket back the moment it takes over. Writing the target while the axis still turns produces the same correction as a step. Use the documented procedure for setting the hold position on your axis, then switch position control back on.

If the position loop overshoots on takeover, the vendor's TIA Portal guidance for technology objects names vtc, the speed control loop substitute time, as the parameter to examine; soften the takeover there rather than by delaying the hand-back.

Decision: hand back in a fixed order — ramp, standstill window, new target, position control on — and treat any hand-back at appreciable speed as a fault in the sequence, not a behavior to tune around.

How do you limit force when speed mode offers no force limiting? #

You supervise differential pressure yourself: the SIMOTION documentation states plainly that force limiting is not possible in speed mode, so the limit lives in your own cyclic program, comparing a signed pressure difference against a torque-derived threshold every pass.

The function manual is explicit about the override-driven speed mode: force limiting is not possible there, and the limiting logic belongs in a cyclic program of your own. Put the check in the fastest task the motion system shares with the axis, so the comparison runs every pass rather than every few hundred milliseconds.

Measure both ports, validate each channel against an independent reference such as a calibrated gauge, and compute a signed difference Δp = pA − pB with one convention fixed for the whole machine. Decide what the limit protects before you set it: driving torque in one direction of rotation, in both directions, or magnitude regardless of sign. An overrunning load complicates the choice, because the bucket can keep turning the motor while the circuit absorbs its energy, and a lower speed command then does not by itself lower the pressure.

React to an exceedance by ramping override.velocity toward zero and raising whatever alarm the risk assessment defines, not by dropping the axis into an uncontrolled coast. Keep the roles separate, too: this supervision is a process control, not a safeguard. Protection against uncontrolled movement under gravity or lost pressure has to come from the hydraulic circuit itself — a counterbalance valve or a brake, sized in the machine's risk assessment — which is what ISO 4413, the general safety standard for hydraulic fluid power systems, expects of the system design.

Decision: the force limit is a signed-Δp threshold checked every pass in your cyclic task, with ramp-down as the reaction, and the load-holding hardware is designed separately from it.

How do you convert differential pressure at the motor ports into torque? #

Torque is proportional to the pressure difference across the motor ports: T = Δp·V·ηhm ÷ (2π), with Δp in pascals and V the displacement per revolution in cubic meters read from the motor datasheet, never an assumed pressure-to-torque factor.

The following is a calculated example for the stated inputs, not a measured result — take displacement and efficiency from the datasheet of the exact motor fitted. Inputs: displacement V = 500 cm³/rev = 5.0e-4 m³/rev and hydraulic-mechanical efficiency ηhm = 0.90, both datasheet values; measured differential pressure Δp = 100 bar = 1.0e7 Pa. Then:

T = 1.0e7 Pa × 5.0e-4 m³/rev × 0.90 ÷ 6.2832 rad/rev ≈ 716 N·m

Step by step: 1.0e7 Pa × 5.0e-4 m³/rev = 5.0e3 N·m per revolution; × 0.90 = 4.5e3 N·m per revolution; ÷ 6.2832 = 716 N·m. With the motor bolted directly to the rotation axis — one motor revolution per axis revolution — that figure is the torque at the axis. Through a reduction with ratio i, multiply by i and by the gearbox efficiency.

The same formula runs backwards to set the threshold. With a 25 percent headroom policy over the working Δp, the cyclic threshold is 125 bar, which the arithmetic puts at 716 × 1.25 ≈ 895 N·m of driving torque at the motor. Compare pressure in the logic, not torque: the sensors deliver pressure, so 125 bar is the number the cyclic comparison checks.

Decision: derive the Δp threshold from your motor's datasheet displacement and efficiency and from the torque limit you commission — with these example inputs, 125 bar — and check it in whichever directions you decided to protect.

Which states should the sequence run through, and in what order? #

Run four states — hold, traverse, decelerate, re-hold — and allow a transition only on the evidence in the table, because two owners of the same axis is exactly how a rotating bucket gets commanded back to an angle it already left.

State Who owns the axis Leaving the state
Hold Position control on the stored hold target Joystick leaves the deadband
Traverse Motion command without position control; override.velocity follows the stick Joystick re-enters the deadband, or the Δp threshold trips
Decelerate Velocity loop with the override ramping to zero Actual velocity stays inside the standstill window
Re-hold Fresh hold target at the stopped angle; position control back on Operator moves the stick out of the deadband again

One full joystick cycle then runs like this:

  1. At power-up, keep position control active on the stored hold target and confirm from the rest-state log that the joystick reads inside the deadband.
  2. On the joystick leaving the deadband, command the traverse without position control and confirm the motion is accepted and reported active before the first override write.
  3. In every pass of Traverse, write override.velocity from the scaled, sign-checked deflection and compute the signed Δp from the two validated pressure channels.
  4. Compare Δp with the threshold every pass; on an exceedance, ramp the override toward zero and raise the alarm the risk assessment defines.
  5. On the joystick returning to the deadband, ramp the override to zero and stay in Decelerate until actual velocity remains inside the standstill window.
  6. Write the hold target to the actual stopped angle, re-enable position control, and verify the axis holds before the next traverse is permitted.

Decision: one owner at a time, evidence for every transition, and step 6 completed before Traverse is allowed again — that ordering is what keeps the bucket from being commanded back to an angle it has already left.

Questions asked

Does an absolute encoder remove the need to re-home after a joystick move?

It removes the need for a referencing run, because the stopped angle is known immediately after every power cycle and every move. It does not remove the target write: the position controller holds whatever target was last stored in it, so after each stop you still write the hold target to the actual angle. Skip that write and the axis drives back to the previous target the instant position control is re-enabled.

How fast should the cyclic differential-pressure check run?

Run it in the fastest cyclic task the motion system shares with the axis, so the limit is evaluated every few milliseconds. A check parked in a slow background task can miss a fast stall: sampled every 100 milliseconds, a pressure rise that builds and passes between samples is invisible for a full period. Filter each pressure channel enough to kill noise, but not so much that the comparison reacts late.

What changes when a gearbox sits between the hydraulic motor and the rotation axis?

Both conversions change. Axis torque becomes motor torque multiplied by the reduction ratio and the gearbox efficiency, so the same differential pressure delivers much more torque at the axis, and the pressure threshold must be recalculated from the torque limit you want there. Axis speed divides by the ratio, so the end speed of the joystick map and the standstill window are commissioned in axis units. The state sequence itself does not change.

What keeps a faulted joystick signal from commanding full speed?

Two layers. First, the axis dynamic limits: acceleration and deceleration settings turn even a full-scale demand into a ramp, so nothing on the machine ever sees a velocity step. Second, plausibility checking on the input: if the raw reading leaves its configured span or freezes while deflection should change, treat it as a fault, ramp the override to zero and return to the hold state instead of trusting the map.

Keep reading

  • 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

  • Troubleshooting

    Make a Servo Jog Follow a Joystick Velocity Demand

    A velocity jog reads its speed operand only when the instruction executes, so a running jog ignores the joystick value until you re-execute it. Strobe the jog every scan with the scaled stick velocity and keep a deadband at neutral; any lag left after that is the acceleration limit, not the command path.

    Servo and stepper motion

  • Troubleshooting

    Why PI Tuning Is Slow on a High-Inertia Hydraulic Drive

    Your manual voltage-decrement test took the motor from 2100 to 2000 RPM in about 1 s, while the tuned PI loop manages about 3.3 RPM/s — roughly 30 times slower — so the hydraulics can respond and the slowness points to output scaling, output limits or valve-command mismatch. Fix those, then retune against the measured benchmark.

    Pneumatics and hydraulics