vfdb_vfd - HAL userspace component for Delta VFD-B Variable Frequency Drives


vfdb_vfd [OPTIONS]


This manual page explains the vfdb_vfd component. This component reads and writes to the VFD-B device via a Modbus connection.

vfdb_vfd is for use with LinuxCNC.


The VFD-B ships in a configuration that can not talk to this driver. The VFD-B must be reconfigured via the face plate by the integrator before it will work. This section gives a brief description of what changes need to be made, consult your Delta VFD-B manual for more details.

Switch the VFD-B to Modbus RTU frame format:

Switch parameter 09-04 from the factory default of 0 (Ascii framing) to 3, 4, or 5 (RTU framing). The setting you choose will determine several serial parameters in addition to the Modbus framing protocol.

Set the frequency control source to be Modbus, not the keypad:

Switch parameter 02-00 from factory default of 00 (keypad control) to 5 (control from RS-485).

Set the run/stop control source to be Modbus, not the keypad:

Switch parameter 02-01 from the factory default of 0 (control from keypad) to 3 (control from Modbus, with Stop enabled on the keypad).


−n −−name <halname>

set the HAL component name

−d −−debug

Turn on debugging messages. Also toggled by sending a USR1 signal to the vfdb_vfd process.

−m −−modbus−debug

Turn on Modbus debugging messages. This will cause all Modbus messages to be printed in hex on the terminal. Also toggled by sending a USR2 signal to the vfdb_vfd process.

−I −−ini <inifilename>

take configuration from this ini file. Defaults to environment variable INI_FILE_NAME. Most vfdb_vfd configuration comes from the ini file, not from command-line arguments.

−S −−section <section name>

take configuration from this section in the ini file. Defaults to ’VFD-B’.

−r −−report−device

report device propertiers on console at startup



Set to a non-zero value to enable general debug output from the VFD-B driver. Optional.


Set to a non-zero value to enable modbus debug output from the VFD-B driver. Optional.


Serial port device file to use for Modbus communication with the VFD-B. Defaults to ’/dev/ttyS0’.


Modbus baud rate. Defaults to 19200.


Modbus data bits. Defaults to 8.


Modbus parity. Defaults to Even. Accepts ’Even’, ’Odd’, or ’None’.


Modbus stop bits. Defaults to 1.


Modbus target number of the VFD-B to speak to. Defaults to 1.


Only read the less important variables from the VFD-B once in this many poll cycles. Defaults to 10.


If the connection to the VFD-B is broken, wait this many seconds before reconnecting. Defaults to 1.


The frequency of the motor (in Hz) and the corresponding speed of the motor (in RPM). This information is provided by the motor manufacturer, and is generally printed on the motor’s name plate.


<name>.at−speed (bit, out)

True when drive is at commanded speed (see speed−tolerance below)

<name>.enable (bit, in)

Enable the VFD. If False, all operating parameters are still read but control is released and panel control is enabled (subject to VFD setup).

<name>.frequency−command (float, out)

Current target frequency in HZ as set through speed−command (which is in RPM), from the VFD.

<name>.frequency−out (float, out)

Current output frequency of the VFD.

<name>.inverter−load−percentage (float, out)

Current load report from VFD.

<name>.is−e−stopped (bit, out)

The VFD is in emergency stop status (blinking "E" on panel).

<name>.is−stopped (bit, out)

True when the VFD reports 0 Hz output.

<name>.jog−mode (bit, in)

1 for ON and 0 for OFF, enables the VFD-B ’jog mode’. Speed control is disabled. This might be useful for spindle orientation.

<name>.max−rpm (float, out)

Actual RPM limit based on maximum frequency the VFD may generate, and the motors nameplate values. For instance, if nameplate−HZ is 50, and nameplate−RPM is 1410, but the VFD may generate up to 80Hz, then max−rpm would read as 2256 (80*1410/50). The frequency limit is read from the VFD at startup. To increase the upper frequency limit, the UL and FH parameters must be changed on the panel. See the VFD-B manual for instructions how to set the maximum frequency.

<name>.modbus−ok (bit, out)

True when the Modbus session is successfully established and the last 10 transactions returned without error.

<name>.motor−RPM (float, out)

Estimated current RPM value, from the VFD.

<name>.motor−RPS (float, out)

Estimated current RPS value, from the VFD.

<name>.output−voltage (float, out)

From the VFD.

<name>.output−current (float, out)

From the VFD.

<name>.speed−command (float, in)

Speed sent to VFD in RPM. It is an error to send a speed faster than the Motor Max RPM as set in the VFD.

<name>.spindle−on (bit, in)

1 for ON and 0 for OFF sent to VFD, only on when running.

<name>.max−speed (bit, in)

Ignore the loop-time parameter and run Modbus at maximum speed, at the expense of higher CPU usage. Suggested use during spindle positioning.

<name>.status (s32, out)

Drive Status of the VFD (see the VFD manual). A bitmap.

<name>.error−count (s32, out)

Total number of transactions returning a Modbus error.

<name>.error−code (s32, out)

Most recent Error Code from VFD.

<name>.frequency−limit (float, out)

Upper limit read from VFD setup.


<name>.loop−time (float, RW)

How often the Modbus is polled (default interval 0.1 seconds).

<name>.nameplate−HZ (float, RW)

Nameplate Hz of motor (default 50). Used to calculate target frequency (together with nameplate−RPM ) for a target RPM value as given by speed−command.

<name>.nameplate−RPM (float, RW)

Nameplate RPM of motor (default 1410)

<name>.rpm−limit (float, RW)

Do-not-exceed soft limit for motor RPM (defaults to nameplate−RPM ).

<name>.tolerance (float, RW)

Speed tolerance (default 0.01) for determining wether spindle is at speed (0.01 meaning: output frequency is within 1% of target frequency).


The vfdb_vfd driver takes precedence over panel control while it is enabled (see .enable pin), effectively disabling the panel. Clearing the .enable pin re-enables the panel. Pins and parameters can still be set, but will not be written to the VFD untile the .enable pin is set. Operating parameters are still read while bus control is disabled.

Exiting the vfdb_vfd driver in a controlled way will release the VFD from the bus and restore panel control.

See the LinuxCNC Integrators Manual for more information. For a detailed register description of the Delta VFD-B, see the VFD manual.


Yishin Li; based on vfd11_vfd by Michael Haberler.