603,337 active members*
3,630 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Phase Converters > ModBus/RS485 manual commands to H100 VFD?
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    103

    ModBus/RS485 manual commands to H100 VFD?

    Trying to figure out how to send/receive info to my H100 VFD (Page 79). I have cheap a RS485 attached to both my RaspberryPi (USB) and my VFD (Twisted pair). I am able to get some basic communication, I think, using the mbpoll Linux command. My goal is to figure out 3 commands. On/Off, Set RPM, Current RPM. Any help would be wonderful. Modbus is beyond my current skill set.

    Code:
    $ mbpoll -a 1 -b 19200 -t 3 -r 1 -c 4 /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
    
    Protocol configuration: Modbus RTU
    Slave configuration...: address = [1]
                            start reference = 1, count = 4
    Communication.........: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0,      19200-8E1
                            t/o 1.00 s, poll rate 1000 ms
    Data type.............: 16-bit register, input register table
    
    -- Polling slave 1... Ctrl-C to stop)
    [1]:    0
    [2]:    0
    [3]:    0
    [4]:    0

  2. #2
    Join Date
    Jul 2024
    Posts
    1

    Re: ModBus/RS485 manual commands to H100 VFD?

    Trying to figure out how to send/receive info to my H100 VFD (Page 79). I have cheap a RS485 attached to both my RaspberryPi (USB) and my VFD (Twisted pair). I am able to get some basic communication, I think, using the mbpoll Linux command. My goal is to figure out 3 commands. On/Off, Set RPM, Current RPM. Any help would be wonderful. Modbus is beyond my current skill set.
    geometry dash lite
    Code:
    $ mbpoll -a 1 -b 19200 -t 3 -r 1 -c 4 /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
    
    Protocol configuration: Modbus RTU
    Slave configuration...: address = [1]
                            start reference = 1, count = 4
    Communication.........: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0,      19200-8E1
                            t/o 1.00 s, poll rate 1000 ms
    Data type.............: 16-bit register, input register table
    
    -- Polling slave 1... Ctrl-C to stop)
    [1]:    0
    [2]:    0
    [3]:    0
    [4]:    0
    Hello, I think you should use the pymodbus library in Python. Here's an example code snippet that demonstrates how to achieve your goals of turning the VFD on/off, setting the RPM, and reading the current RPM:

    Code:
    python
    from pymodbus.client.sync import ModbusSerialClient
    
    # Configure the Modbus client
    client = ModbusSerialClient(method='rtu', port='/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0', baudrate=19200, parity='E', stopbits=1, bytesize=8, timeout=1)
    
    # Connect to the Modbus device
    client.connect()
    
    # Function to turn the VFD on/off
    def set_vfd_state(state):
        # Write to coil address 0 to turn the VFD on or off (assuming coil address 0 controls the VFD state)
        client.write_coil(0, state)
    
    # Function to set the RPM
    def set_rpm(rpm):
        # Write the desired RPM to holding register address 0 (assuming register address 0 is used to set the RPM)
        client.write_register(0, rpm)
    
    # Function to read the current RPM
    def get_current_rpm():
        # Read the value from input register address 0 (assuming register address 0 holds the current RPM)
        result = client.read_input_registers(0, 1)
        if result.isError():
            return None
        else:
            return result.registers[0]
    
    # Example usage
    set_vfd_state(True)  # Turn the VFD on
    set_rpm(1000)       # Set the RPM to 1000
    current_rpm = get_current_rpm()  # Read the current RPM
    
    print("Current RPM:", current_rpm)
    
    # Disconnect from the Modbus device
    client.close()
    Make sure you have the pymodbus library installed (pip install pymodbus) before running this code. Adjust the coil and register addresses according to the documentation of your specific VFD model (Page 79).

Similar Threads

  1. Huanyang VFD RS485 / Modbus
    By scotta in forum Phase Converters
    Replies: 130
    Last Post: 05-15-2022, 03:13 PM
  2. MACHTRIC S800E 2,2kw VFD (Mach3) RS485 Modbus
    By Enforced227 in forum Spindles / VFD
    Replies: 88
    Last Post: 11-17-2016, 08:44 AM
  3. RS485 commands for Huanyang VFD (HY02D223B)
    By bouni in forum Spindles / VFD
    Replies: 2
    Last Post: 05-07-2015, 04:32 PM
  4. Hitachi X200 VFD, RS485 MODBUS, and Mach3
    By MechanoMan in forum Spindles / VFD
    Replies: 11
    Last Post: 08-17-2014, 09:50 PM
  5. Spindle vfd control via modbus & rs485?
    By Pplug in forum Techno CNC
    Replies: 0
    Last Post: 05-25-2011, 01:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •