Articles on: Learning & FAQ

Description of the Virtual DI Function for the A6 Series Servo Motor

In our A6-RS series servo drives, a Virtual DI/DO module is provided. Below is a detailed explanation of how to use this function.


Application of Virtual DI


First of all, "Virtual" refers to digital input interfaces simulated internally by the driver via software or bus communication. They allow functions such as servo enable, reset, limit, and homing to be triggered through communication commands or internal logic without connecting to physical DI terminals. This simplifies electrical design, reduces costs, and enables flexible internal control logic.



When the servo driver is connected to a host controller (e.g., PLC) via fieldbus, it is not necessary to wire each I/O output point of the PLC to the DI/DO terminals of the drive (as shown in the figure above). Instead, specific data frames (e.g., MODBUS RS485 commands) can be sent via communication to trigger the virtual DI functions inside the drive, saving significant wiring and I/O module costs.


Additionally, although the physical DI interfaces on the A6-RS series servo drives are limited (we provide 8 DI ports), there are cases where the required functions (e.g., forward limit, reverse limit, emergency stop, gain switching, home signal, servo enable, etc.) exceed the number of physical DI terminals. In such cases, non-critical or non-safety-related functions can be configured as virtual DIs and controlled via communication.


Example:


Suppose I want to use the built-in multi-segment speed function of the A6 servo. At least 6 DI ports are required:


  1. DI1 configured as Servo Enable
  2. DI2 configured as Emergency Stop (for protective measures in emergency situations)
  3. DI3~DI6 configured as multi-segment switching inputs, enabling 16 different speed stages


Now, I also want to use one DI to change the motor rotation direction and one DI as a home switch:


  1. DI7 configured as Speed Command Direction (using an external switch to reverse motor rotation)
  2. DI8 configured as Home Switch (connected to a home sensor for motor homing)



At this point, all 8 physical DIs of the drive are used. What if I also want to connect external limit switches but have no DI ports left?


Here, virtual DIs can be used. For example, enable and direction change can be triggered via virtual DIs, freeing up physical DI ports for limit switches.


Operation Instructions


1. Function Description


By modifying the Bit positions of the corresponding functions in parameters F30.31 ~ F30.36, trigger signals can be sent to realize DI/DO functions via 485 communication. The virtual DI functions are located in parameter groups F30.31 ~ F30.36:



F30.31 (16-bit unsigned):

  • Bit0 corresponds to DI Function 1 (Servo Enable)
  • Bit1 corresponds to DI Function 2 (Fault Reset)
  • And so on.


F30.32 (16-bit unsigned):

  • Bit0 corresponds to DI Function 17 (Speed Command Direction)
  • Bit1 corresponds to DI Function 18 (Torque Command Direction)
  • And so on.


F30.33 (16-bit unsigned):

  • Bit0 corresponds to DI Function 33 (Position Capture Enable)
  • Bit1 corresponds to DI Function 34 (Position Step)
  • And so on.


F30.34 (16-bit unsigned):

  • Currently no corresponding DI functions (as there are only 37 DI functions total; Bits 49–64 are not used).


F30.35 (16-bit unsigned):

  • Bit0 corresponds to DO Function 1 (Servo Ready)
  • Bit1 corresponds to DO Function 2 (Motor Rotating)
  • And so on.


F30.36 (16-bit unsigned):


  • Bit0 corresponds to DO Function 17 (Torque Arrival)
  • Bit1 corresponds to DO Function 18 (EMD Output)
  • And so on.


2. Practical Steps (using F30.31 as an example)


  1. Enable Function 1 (Servo Enable) alone – Write 1 to Bit0:
  • BIN: 0000 0000 0000 0001
  • HEX: 0x0001
  • 485 command: 01 06 30 31 00 01

(The value written in the software is also in hexadecimal, consistent with the 485 command.)



  1. Enable Function 2 (Fault Reset) alone – Write 1 to Bit1:


  • BIN: 0000 0000 0000 0010
  • HEX: 0x0002
  • 485 command: 01 06 30 31 00 02



  1. Enable Function 16 (Position Command Direction) alone – Write 1 to Bit15:


  • BIN: 1000 0000 0000 0000
  • HEX: 0x8000
  • 485 command: 01 06 30 31 80 00


  1. Trigger two virtual DIs simultaneously (e.g., Functions 1 and 2):


  • BIN: 0000 0000 0000 0011
  • HEX: 0x0003
  • 485 command: 01 06 30 31 00 03


  1. Trigger three virtual DIs simultaneously (e.g., Functions 1, 2, and 4):
  • BIN: 0000 0000 0000 1011
  • HEX: 0x000B
  • 485 command: 01 06 30 31 00 0B


  1. Trigger sixteen virtual DIs simultaneously (e.g., Functions 1–16):


  • BIN: 1111 1111 1111 1111
  • HEX: 0xFFFF
  • 485 command: 01 06 30 31 FF FF


Note: Triggering multiple virtual DIs at the same time may cause drive alarms due to function conflicts. The above examples are for demonstration only. In practice, not all functions can be triggered arbitrarily, as some DI functions conflict with each other.


The same logic applies to triggering other DI/DO functions in F30.32 ~ F30.36.


Usage Precautions


Since there is no limit on the number of virtual DIs, theoretically all 37 DI functions can be triggered simultaneously. However, please note: if a function has already been triggered by a virtual DI, do not assign or trigger the same function on a physical DI terminal. Doing so will trigger an alarm (DI Function Duplication).



For safety-critical signals such as Emergency Stop and Safety Limits, we strongly advise against using virtual DI control only. Communication-based control carries risks such as delay, loss of connection, or interference. For such safety-related signals, industry practice is to use physical DI terminals connected to the drive’s Safe Torque Off (STO) or DI ports.


Additionally, virtual DIs rely on the communication cycle (e.g., the scan cycle of RS485 is typically tens to hundreds of milliseconds). While the response is sufficient for most applications, physical DIs offer better performance for hardware synchronization requiring nanosecond or microsecond response times.

Updated on: 31/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!