AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

How-to

Servo positioning instructions from a PLC: DRVI, DRVA, PLSV

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

Short answer

Command the drive with pulse and direction: the pulse train on one of the first three high-speed outputs, direction on any output. Choose PLSV for speed control, DRVI for a relative move and DRVA for an absolute move, and use the 32-bit instruction forms when a speed or position command must exceed 32767.

On this page
  1. Which command format should the servo drive be set to?
  2. Which PLC output should carry the pulse train?
  3. Which instruction runs the axis at a speed with no destination?
  4. Which instruction moves a relative distance?
  5. Which instruction moves to an absolute position?
  6. When does a speed or position command need the 32-bit form?
  7. How do you commission the first move without crashing the machine?
  8. Questions asked

Three FX positioning instructions cover almost every pulse-command servo move: PLSV for speed control, DRVI for a relative move and DRVA for an absolute move. Command the drive in pulse-and-direction mode, put the pulse train on one of the first three high-speed outputs, hold direction on any other output, and step up to the 32-bit instruction forms whenever a distance or speed operand must exceed 32767. This article walks the instruction choice per move type, the output assignment, the pulse-count arithmetic and a commissioning sequence that finds wiring and mode mistakes before they find your machine.

Which command format should the servo drive be set to? #

Set the drive's command input mode to pulse and direction: one PLC output carries the pulse train and a second output holds a steady direction level, and the drive converts the pulse count and that level into shaft position.

Pulse and direction is the usual arrangement on an FX3G for this job, and it is what the three instructions below assume. A/B quadrature is a different interface: two channels whose phase relationship decides rotation, and two signals labelled A and B are not interchangeable with pulse and direction merely because both interfaces use two wires. Configure the pulse-input selection in the drive's parameters before any ladder is written, and match the PLC output circuit to the drive's pulse-input circuit from the wiring diagrams of both devices — Servo drive pulse and direction wiring on a retrofit covers that wire-side work. If the drive accepts only A/B quadrature and has no pulse-and-direction mode, settle that interface mismatch first, because no amount of ladder repairs it.

Which PLC output should carry the pulse train? #

Put the pulse train on one of the first three outputs of the FX3G, which are its high-speed outputs, and put the direction signal on any suitable output, because direction only holds a level and never has to switch at pulse rate.

A controlled pulse train is beyond an ordinary output coil: cyclic scan updates cannot emit a high-speed pulse relationship, which Why a PLC digital output cannot make a stepper pulse train shows from scan timing. High-speed pulse outputs are transistor outputs; a relay-output unit cannot switch at pulse rates. Keep the pulse control line at least 100 mm (3.94 in) away from main-circuit and power wiring — the guideline in the FX3S/FX3G/FX3GC/FX3U/FX3UC user's manual, Positioning Control Edition, given because noise on control lines can cause malfunctions. For the finished wire-by-wire picture, a walkthrough of wiring a servo drive to a PLC pulse-train interface shows one complete hook-up.

Which instruction runs the axis at a speed with no destination? #

Use PLSV for speed control: it emits pulses at the speed operand you load and keeps emitting until you switch the instruction off, so jog, conveyor feed and any motion without a target coordinate belong to PLSV.

PLSV commands a speed, not a destination, so it is the wrong tool for a fixed index. The FX positioning family catalog lists the RAMP instruction for approximating acceleration to different speeds, which means a PLSV application that changes speed mid-run gets its ramp from your sequence logic rather than from the instruction.

Which instruction moves a relative distance? #

Use DRVI for a relative move: the operands are a distance in pulses and a speed, and the axis travels exactly that far from wherever it happens to be when the command starts.

DRVI and DRVA are one-speed positioning instructions in the FX family, so each command runs one profile at one speed. Relative moves measure from the current position, so every error already in the axis is carried forward into the next move — the accumulation behind why a pulse-command servo axis loses position between moves. Convert the machine distance into a pulse count before you write the operand — How to Calculate Step and Direction Servo Pulse Scaling walks that arithmetic — and let the count's size decide between the 16-bit and 32-bit forms.

Which instruction moves to an absolute position? #

Use DRVA when the machine holds a known zero: the command targets a coordinate in the established coordinate system, so the move finishes at that coordinate regardless of where the axis sits when the command starts.

DRVA is only as good as the origin behind it. Establish the machine origin before the first absolute command, and re-establish it after any power-off or fault that can clear position memory, according to how the drive's encoder holds position. An absolute command issued against a wrong origin lays the same offset onto every part, which is why the origin is a commissioning step and not an afterthought.

When does a speed or position command need the 32-bit form? #

Use the 32-bit versions of DRVI, DRVA and PLSV whenever a distance or speed operand must be greater than 32767, the largest value the 16-bit instruction forms can carry.

A worked example shows where the threshold bites. Suppose a direct-coupled ball screw with a 5 mm lead, taken from the machine drawing, and a drive electronic gear of 10000 command pulses per motor revolution — an example value; read yours from the drive's electronic gear parameters. The axis then needs 10000 ÷ 5 = 2000 pulses per millimetre. A 40 mm index becomes 40 mm × 2000 pulses/mm = 80000 pulses, which is greater than 32767, so the distance operand forces the 32-bit DRVI form. The same index at 300 mm/min is 300 ÷ 60 = 5 mm/s, so the pulse rate is 5 mm/s × 2000 pulses/mm = 10000 pulses per second, comfortably inside what the 16-bit form carries — the distance decides, not the speed. These are example inputs, not a measured result. Take the exact operand order, the supported devices and the completion behavior from the Positioning Control Edition manual for your FX variant; those details decide the final ladder.

How do you commission the first move without crashing the machine? #

Commission the first move at low speed and short travel with everyone clear of the mechanism: prove the ready state, the direction level and pulse activity at the drive terminals before any production cycle, and keep limits and interlocks live throughout.

Then run the sequence:

  1. Configure the drive's pulse-input mode to pulse and direction, and record the setting beside the PLC output assignment.
  2. Reserve one of the first three outputs for the pulse train and a separate output for direction.
  3. Establish the machine origin before any DRVA command exists in the sequence.
  4. Load speed and distance operands from controlled registers or fixed commissioning values.
  5. Trigger the move with a one-shot start, and block the next move until the current command completes or stops as the manual describes.
  6. Confirm the drive reports ready with no active fault, and check the direction level before pulses start.
  7. Command a short, slow DRVI move, record the commanded pulse count, the indicated position change and the physical direction, then reverse the command and confirm direction follows.
  8. Test DRVA only once the origin exists, and try PLSV on an axis that can run clear.
  9. If pulses appear at the PLC but not at the drive, chase wiring, commons and interface compatibility; if pulses reach the drive but the shaft stands still, check the drive's input mode, enable and inhibit conditions; if the distance comes out wrong, recompute the pulse count from the drive gearing and the mechanical travel per revolution.

The decision, in one line for each case: PLSV when speed is the command, DRVI when the distance is measured from here, DRVA when a coordinate is the target, the 32-bit forms past 32767, and the pulse train on one of the first three outputs with direction beside it.

Questions asked

How many servo axes can one FX3G command in pulse and direction?

Each pulse-command axis needs its own high-speed pulse output, and the FX3G provides three, so three single axes in pulse and direction is the practical ceiling. The output count differs across the FX family, so confirm it for your exact variant in the positioning manual, and never share one pulse output between two axes.

What units does the speed operand use in PLSV and DRVI?

The speed operand is a pulse rate: pulses arriving at the drive each second. Convert machine speed through your own scaling — with the worked example's 2000 pulses per millimetre, a 300 mm/min feed becomes 5 mm/s, so 10000 pulses per second. Compute the rate from your electronic gear and screw lead, never from another machine's numbers.

Does DRVA work before the machine has been homed?

No. DRVA targets a coordinate in the coordinate system the PLC has established, and homing is what establishes it. Without a homing pass, the command is measured from whatever zero the PLC believes in, so every absolute move inherits the same offset. Re-home after any event that can lose the reference, and interlock homing ahead of the first absolute command in the cycle.

Keep reading

  • Troubleshooting

    Servo pulse input mode mismatch causes motion without rotation

    A servo axis only moves on accepted command pulses. If the PLC output channels and the drive's selected input mode describe different interfaces (A/B versus pulse/direction), a held coil or a start bit looks running on screen while the shaft twitches briefly and stops. Match the channel mapping to the drive's input mode and command with a pulse-generating instruction.

    Servo and stepper motion

  • Comparison

    A step and direction servo drive versus an open-loop stepper

    A step and direction servo drive takes the same pulse train as an open-loop stepper drive but closes the position loop inside the drive on the motor's encoder counts, so lost steps become a following-error fault instead of silent drift. The deciding arithmetic is the pulse budget: steps per inch times feed gives the steps per second your controller must supply, and a high-count encoder can exhaust that budget before the motor runs out of torque.

    Servo and stepper motion

  • How-to

    Configuring a PLC pulse-output servo axis before PLS2 moves

    The drives are not plug and play: keep command scaling in one place, the drive's gearing or the PLC program, and stay under the 100 kHz pulse ceiling, which at 10,000 pulses per revolution caps the motor at 600 rpm. Prove direction, limits and homing first, then tune for the load.

    Servo and stepper motion