Configuring a custom VFD and spindle

I have successfully configured a custom VFD and spindle to work with my Onefinity. Here are my notes to hopefully help others get their VFD working.

I started with the Buildbotics How to use a VFD spindle driver documentation.

My VFD is the TECO Westinghouse E510.


You will need to wire the controller to the VFD using RS485.

On the VFD side, you may have screw terminals, an RJ45, or some other type of connector. My VFD has an RJ45, so I wired up an ethernet jack in a single gang box using a 110 punchdown connector. This allows me to use a standard ethernet cable to plug into the VFD.

On the controller side, you can either use the breakout board adapter, or get a 25 pin RS232 connector and solder the wires. I went with the breakout board adapter.

RS485 uses two wires. On the E510, they connect to pins 1 and 2 on the RJ45. On the controller, they connect to pins 13 and 14. The Buildbotics docs say that it doesn’t matter which wire is connected to the A or B terminal and it will just “figure it out”. That was not the case for the E510. For the E510, pin 1 from the VFD must be connected to pin 14 on the controller and pin 2 from the VFD must be connected to pin 13 on the controller.

VFD Configuration

There are several settings you must program on your VFD to enable RS485 control. The primary configuration is in the communication section. For the E510, that is section 09. The values here must match those in the controller Modbus Configuration. Here is the programming for the E510:

  • 09-00 (StationAddress): 1
  • 09-01 (Communication Mode Selection): 0 (MODBUS)
  • 09-02 (Baud Rate Setting): 3 (9600)
  • 09-03 (Stop Bit Selection): 1 (2 Stop Bit)
  • 09-04 (Parity Selection): 0 (No Parity)
  • 09-05 (Communication Data Bit Selection): 0 (8 Bit Data)

The protocol requires 11 bits: 1 start bit, 8 data bits, and either parity and 1 stop bit, or no parity and 2 stop bits. The protocol has a CRC so the parity is redundant and typically set to none with 2 stop bits.

After you set the communication programming, you may have to cycle power on your VFD as I did for the E510.

You must also tell your VFD to accept the run and frequency commands from RS485. For the E510, this is programmed as:

  • 00-02 (Main Run Command Source Selection): 2 (Communication Control RS485)
  • 00-05 (Main Frequency Command Source Selection): 5 (Communication Setting Frequency)

Controller Configuration

Open the fly-out menu and select Tool. Depending on the version of firmware you have, you may need to first select PWM Spindle for the tool-type, then uncheck rapid-auto-off (see the Troubleshooting section for why). Now, select Custom Modbus VFD for the tool-type. Set the other tool configuration parameters as appropriate.

In my case, I’m using the 800w Huanyang spindle, so I have those options set as:

  • tool-reversed: unchecked
  • max-spin: 24000
  • min-spin: 0
  • tool-enable-mode: disabled
  • tool-direction-mode: disabled

The modbus configuration section is where you set the communication parameters of the RS485 and they must match the configuration on the VFD. I’m using the following settings:

  • bus-id: 1
  • baud: 9600
  • parity: none
  • multi-write: unchecked

The modbus program is 100% dependent on your VFD. When you select a code on the front panel of your VFD to read or change a value, that is a register. The modbus program is a way for the controller to read and write those registers in your VFD. When you create the modbus program in the UI, you are mapping a function that the controller understands to a register, and value in the case of a write, that the VFD understands. The controller commands you need to map to your VFD is completely dependent on your VFD. You have to read the Buildbotics description of each command and your VFD manual to figure out the mapping. Your VFD may have an additional manual (this is the case for the E510) for the RS485 protocol.

You will most likely not need to map all of the controller commands to your VFD. At an absolute minimum, the controller needs to know the max frequency for your spindle so it can calculate the frequency to set based on the RPM you set for a given tool, how to set the frequency, how to read the frequency, and how to start/stop the spindle.

For the E510 VFD, here is the modbus program I’m using:

  • max-freq-read → Address 258
  • freq-set → Address 9474
  • stop-write → Address 9473, Value: 0
  • forward-write → Address 9473, Value: 1
  • freq-read → Address 3089

To set the max frequency on the E510, you enter the maximum frequency by programming location 01-02 to 400 (my spindle) on the front panel. The communication manual tells you that the register address of 01-02 as entered on the display is 0x0102 (hex) which is 258 decimal. To set the frequency, you write location 25-02 which is 0x2502 or 9474 decimal. The other commands follow a similar pattern.


Don’t email Buildbotics - they will refer you to Onefinity. Don’t email Onefinity - they will refer you to the forums.

When you create your modbus program, the Failures column should contain all zeros. If any command has a failure greater than zero, it means the command is not working. In my case, I had to reverse the wires on the breakout board. I figured this out by using an oscilloscope to look at the bus. You have to use two probes and subtract the two signals since RS485 is differential. I then had the scope decode the signal as RS232 and I was able to see the proper command being sent from the controller and no reply from the VFD.

If you are using the Buildbotics post for Fusion 360, the spindle will automatically start and the CNC will immediately begin milling before the spindle is at full speed. This is because the Buildbotics firmware does not wait for the spindle to reach the speed that it just set before continuing to execute your gcode. The workaround for this is to put a delay in your gcode right after the speed set. For example:

s18000 m3
g4 p10

I’m going to try to hack the Buildbotics post to do this automatically. I have also asked Onefinity to make this an option in their official Fusion 360 post.

If you are using an older version of the firmware, you may have a problem where the spindle slows down during a rapid then speeds back up. This is because there is an option in the controller called rapid-auto-off (mainly for lasers) that will set the speed of your spindle to 0 during a rapid. The option for setting rapid-auto-off is only available on the PWM Spindle. The workaround for this problem is to select the PWM Spindle, uncheck rapid-auto-off, then select Custom Modbus VFD. This problem is being fixed in the next release of the Buildbotics firmware.

If the controller does not display the RPM correctly, you may need to change your VFD display. In my case, I had the VFD displaying RPM instead of frequency. When the controller was reading the frequency, it got back the RPM value so I had to change the display back to frequency.

I hope this helps!


Hi Bryan, did you manage to do this?

Just hunted through the forum and found the pp with the pause option. Cheers.

Has anyone ever used a FULING VFD with Onefinity controller that could share the wiring, setting and experience?

Hi Mauro, did you get your Fuling inverter running, I have the addresses required.

Does anybody have the modbus addresses for a H100/V70 inverter? I have figured out a config that runs on the machine but it shows errors even though it works :slight_smile:

Hey Sid,

you can use the ModBus address you like, but you got to make sure that it’s the same address that you set on the VFD and on the Onefinity CNC controller.

Further Reading

Further Reading

  • The H100/V70 VFD already had an appearance in this forum here and here.

    (easy to find by searching for

If you get an error on the VFD, you got to look up what the error means in the VFD manual.

If you get a timeout error on the Tool Configuration Tab of the Onefinity, that means for the Onefinity, there is nothing detected at the pins 13 and 14 on the DB-25 I/O port. Make sure you have the same ModBus settings on the VFD and on the Onefinity Controller. If you have a termination resistor DIP switch on your VFD, you got to switch it on. Note that if you have only timeouts, this may also be this issue.

Welcome to the forum!

Thanx for responding Aiph5u, Im probable using the wrong terminology, im looking for the freq- set, freq-read, forward-write, … addresses for a custom spindle

Hey Sid,

do you mean settings inside the VFD, in order to suit your spindle?

If so, this should be found in your spindle manual.

EDIT: Do you mean the settings in 8.Creating a Custom VFD Program?

If so, you should not need this, since under ‘tool-type’ in Onefinity CNC Controller’s Tool Configuration Tab, you should be able select “V70”. Did you try it with this?

EDIT: I don’t run the Onefinity CNC controller, however by looking at the source code of the Onefinity Firmware 1.0.9 (unlike Buildbotics Firmware v0.4.14 or higher), it seems that the ‘V70’ VFD is not offered under ‘tool-type’, can you confirm this?

At least the ‘V70’ entry is not found in Onefinity’s Firmware file src/resources/config-template.json nor in the file src/pug/templates/tool-view.pug. However it is well present in the source:

# 1.0.9/onefinity-firmware-master/src/avr/src/vfd_spindle.c

const vfd_reg_t v70_regs[] PROGMEM = {
  {REG_MAX_FREQ_READ, 0x0005, 0}, // Maximum operating frequency
  {REG_FREQ_SET,      0x0201, 0}, // Set frequency in 0.1Hz
  {REG_STOP_WRITE,    0x0200, 0}, // Stop
  {REG_FWD_WRITE,     0x0200, 1}, // Run forward
  {REG_REV_WRITE,     0x0200, 5}, // Run reverse
  {REG_FREQ_READ,     0x0220, 0}, // Read operating frequency
  {REG_STATUS_READ,   0x0210, 0}, // Read status

which would translate to the following settings for 8. Creating a custom VFD program:

Command Address Value Comment
max-freq-read 5 0 Maximum operating frequency
freq-set 513 0 Set frequency in 0.1Hz
stop-write 512 0 Stop
fwd-write 512 1 Run forward
rev-write 512 5 Run reverse
freq-read 544 0 Read operating frequency
status-read 528 0 Read status

As for the default settings for the VFD, in Buildbotics v1.0.1 firmware, it says in


        h2 Notes
        p Set the following using the VFD's front panel.
            th Address
            th Value
            th Meaning
            th Description
            td.reg-addr F001
            td.reg-value 2
            td Communication port
            td Control mode
            td.reg-addr F002
            td.reg-value 2
            td Communication port
            td Frequency setting selection
            td.reg-addr F163
            td.reg-value 1
            td Slave address
            td Must match #[tt bus-id] above
            td.reg-addr F164
            td.reg-value 1
            td 9600 BAUD
            td Must match #[tt baud] above
            td.reg-addr F165
            td.reg-value 3
            td 8 data, no parity, 1 stop, RTU
            td Must match #[tt parity] above
          | Other settings according to the
            target="_blank") Stepper Online V70 VFD manual

which translates to:


Set the following using the VFD's front panel.

Address Value Meaning Description
F001 2 Communication port Control mode
F002 2 Communication port Frequency setting selection
F163 1 Slave address Must match #[tt bus-id] above
F164 1 9600 BAUD Must match #[tt baud] above
F165 3 8 data, no parity, 1 stop, RTU Must match #[tt parity] above

Other settings according to the Stepper Online V70 VFD manual

NOTE: I don’t run the Onefinity CNC controller, I just had a look at the firmware! I cannot test anything.

Those are the numbers I came up with, but when entered shows errors

Hey Sid,

Did you set the settings inside the VFD correctly?

Hey Sid,

are you using a shielded, twisted pair cable?

Yes, all the vfd settings are as called for, and working, the spindle starts, stops, goes to s command rpm, verified by vfd hertz reading, it just shows failures and the modbus status flashes between OK & CRC error

Hey Sid,

in the future, could you please provide such information in the first post.

P.S. my controller doesnt have the v70 config, it is the v1.0.9 version, I know Buildbotics has the H100 and V70 configs, and I sent an email to Doug but he didnt seem to willing to support a Onefinity user.

for the testing I have been using twisted non sheilded wires, for the permanent install they will be shielded

1 Like

Well above I’ve shown you the settings for a custom VFD entry, from the buildbotics source code.

This is to expect. Your support is <>, which will tell you they don’t support spindles / VFDs :slight_smile:

Hey Sid,

a VFD and its spindle cable usually is a source of heavy EMI. That’s why a shielded spindle cable like shown here is strongly recommended, otherwise you have to expect disturbances. The same applies to the VFD itself, which is usually enclosed in a earthed control cabinet like shown here.

Usually for the ModBus communication cable, a twisted-pair cable is enough, however you can still have hum if you have not grounded everything properly.

Also I would look for poor connections, e.g. this issue already mentioned above, however there are even issues known like this:

Aiph5u, Thanx for your time and assistance in verifying my numbers. I will let the board know if I find a solution for the errors

Thanx, Sid

1 Like

All control and spindle cables have been replaced with grounded shielded cables, except the twisted rs485 test cable