Articles on: Learning & FAQ

In Speed Mode, How to Control the Running Direction of a Servo Motor via Modbus Commands?

When controlling a servo motor in speed mode via Modbus, it is common to need to reverse the direction. So how can you change the motor's rotation direction using only RS485 commands? Below are several solutions we recommend:


1. Switch via Digital Input (DI)


Servo drivers typically have multiple digital input (DI) ports that support freely assignable functions. Simply select an unused DI and set its function to “Speed Command Direction” (the exact naming may vary by servo brand, but the principle is the same). When in speed mode, triggering this DI will reverse the direction.


Setup steps:


  • Configure the DI function (Speed Command Direction) using the driver software or the keypad/display.
  • Locate the register address for the DI port (the driver manual explains how to trigger DI signals).
  • Write the trigger command based on the register address.


Example using our A6 series servo:


To reverse the running direction:

  1. Set the function of DI1 to 17 (Speed Command Direction):

01 06 04 00 00 11

  1. Trigger DI1 to make the motor run in reverse (C04.01=1):

01 06 04 01 00 01

To reverse again (back to forward), set C04.01=0:

01 06 04 01 00 00


2. Switch by Writing a Negative Speed Value


In the speed command register of the servo driver, the written value distinguishes between positive and negative.

  • When the written speed value is positive, the motor runs forward.
  • When the written speed value is negative, the motor runs in reverse.


Example command:


Forward: 01 06 12 06 02 58 CRC CRC (Register 12 06, speed value 600 decimal = 02 58 hex)

Reverse: Write the negative value corresponding to 01 06 12 06 FF FF FF FF FF FF FD A8 CRC CRC(hex representation of -600: FF FF FF FF FF F FD A8 on 32/64-bit).


Note: While this method is simpler and more direct, it is not suitable for complex operating conditions. For pre-set motions such as multi-speed operation, writing a negative value during runtime may be ineffective.


Updated on: 28/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!