[ Vfdmod ] An easy VFD control over MODBUS RTU

More
6 years 6 months ago - 6 years 4 months ago #162435 by aekhv
Hello everyone!

I wrote my own HAL userspace component - it's called Vfdmod - to control any VFD that supports standard MODBUS RTU transfer mode.


Features
  • Setting command speed with MODBUS function codes 0x06 (write holding register) and 0x10 (write multiple holding registers).
  • Setting control word with MODBUS function codes 0x06, 0x10, 0x05 (write coil) and 0x0F (write multiple coils).
  • Reading any count of user defined parameters with MODBUS function codes 0x01 and 0x03.
  • Four types of user defined parameters are supported: bit, float, s32 and u32.
  • Built-in PyVcp generator.
  • RS485 connection state monitoring including total error count and last error code.
  • Auto reconnection attempts when USB-to-RS485 adapter was physically re-plugged.
  • Huanyang VFDs are not supported because they use non-standard MODBUS function codes.

Screenshots




Examples
  • Configuration file for Tecorp HC1C+ (low cost chinese VFD):
    Code:
    [Common] MaxSpeedRPM=24000 MinSpeedRPM=3000 AtSpeedThreshold=0.01 [RS485] SlaveAddress=1 SerialDevice=/dev/rs485 BaudRate=19200 DataBits=8 Parity=N StopBits=1 [Control] Address=0x2000 RunForwardValue=0x000A RunReverseValue=0x0006 FaultResetValue=0x0010 StopValue=0x0001 [SpindleRpmIn] Address=0x2001 Multiplier=1 Divider=6 [SpindleRpmOut] Address=0x0004 Multiplier=10 Divider=1 [Command frequency] Address=0x0001 Multiplier=1 Divider=10 PinType=float PinName=command-frequency [Output frequency] Address=0x0002 Multiplier=1 Divider=10 PinType=float PinName=output-frequency [Output current] Address=0x0003 Multiplier=1 Divider=10 PinType=float PinName=output-current [DC bus voltage] Address=0x0005 Multiplier=1 Divider=10 PinType=float PinName=dc-bus-voltage [Temperature] Address=0x0006 Multiplier=1 Divider=10 PinType=float PinName=temperature
Last edit: 6 years 4 months ago by aekhv. Reason: Updated
The following user(s) said Thank You: tommylight, besriworld, taloot, COFHAL, Aciera, sdwyer, bbsr_5a, TannerFrisby, mantimei

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #162462 by Todd Zuercher
Replied by Todd Zuercher on topic [ Vfdmod ] An easy VFD control over MODBUS RTU
Sounds a lot like Mb2hal. How is your component different/better?

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #162469 by bbsr_5a
seams onlyinteresting for longtime users to see the state of the VFD
most wont need it as they just use the error channel to stop f somthing happens
but it is good to have it there

What VFD did you test this

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago - 6 years 6 months ago #162521 by aekhv

Todd Zuercher wrote: Sounds a lot like Mb2hal. How is your component different/better?

It's hard to answer because I didn't work with mb2hal :)
Last edit: 6 years 6 months ago by aekhv.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #163001 by Todd Zuercher
Replied by Todd Zuercher on topic [ Vfdmod ] An easy VFD control over MODBUS RTU
Your new component may be mostly replicating the same function of the pre-existing Mb2hal component. You might want to look into it

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #164147 by COFHAL
Excellent work, could you post your hal file? I have questions about how you control your spindle.

Please Log in or Create an account to join the conversation.

Time to create page: 0.154 seconds
Powered by Kunena Forum