0
\$\begingroup\$

Hoping to get some help on setting up a NodeMCU (esp8266) with this 1 arduino library to control a Variable Frequency Drive (VFD).

I'm afraid to say that I almost need help from square one, as I'm completely new to the modbus protocol, and both the library and the VFD are (to my newbie brain atleast) very lacking.

What I have done so far is get a Node MCU and a MAX485 module hooked up, and connected it to the RS485 terminals on the VFD.

However, the only documentation that the VFD provides is the following (see screenshot). I understand that I need to somehow structure this in a Modbus RTU call as a hex value, but I honestly do not know where to even begin.

All I want to be able to accomplish is to set the frequency, and then start and stop. Potentially read a few values such as current draw, but thats overkill for now.

I'm also not attached specifically to this library, its just what I found that was compatible with ESP8266. I also have ESP32s if thats a better / easier option.

Apologies for the severe lack of actual progress here, but really hoping someone more clever than myself can help here.

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Have you tried searching for ESP32 MODBUS + "example" or "tutorial". I'm sure it's easier to adapt a working example to the specific needs of your VFD than to start from scratch. \$\endgroup\$ Jan 27 at 23:04
  • \$\begingroup\$ do you have a USB-485 adapter? Running the VFD from a PC or MAC should help get your mind around simple Modbus. \$\endgroup\$
    – david
    Jan 28 at 0:17
  • \$\begingroup\$ That table is very poorly worded. Modbus sees the world as 16bit ‘registers’ and single bit ‘contacts’ and ‘coils’. Here we’re only concerned with registers. The column ‘address/hex/word’ is simply the register address. So to stop you would write the value 2 to register 3. To go forward, write the value 1 to register 3. To get the bus voltage, read register 8. And so on. Modbus rtu is quite simple so rather than use a library, you could create the byte sequence of the modbus operations you want to do. Tools like Modscan for the PC will show you the required bytes to send. \$\endgroup\$
    – Kartman
    Jan 28 at 12:56
  • \$\begingroup\$ Thanks everyone for you help and suggestions. Spehro, I did end up finding a few examples, though not controlling a VFD specifially. David, no sadly I do not. Kartman, thank for the breakdown, thats super helpful. I’ll play around with that. Thank you! \$\endgroup\$ Jan 28 at 17:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.