585,883 active members*
4,629 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > Anyone using scotta's hy_vfd rs485 for linuxcnc?
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    711

    Anyone using scotta's hy_vfd rs485 for linuxcnc?

    I am trying to get this working after finding the files in thread Huanyang VFD RS485 / Modbus

    The problem I am having is that nothing is going out to the serial port from the hy_vfd hal component / or linuxcnc. not sure which is not letting it through.

    I have used a serial port terminal and a serial port loopback, to verify I am using the physical com port that is attached to /dev/ttyS1
    Also I have hooked oscilloscope up to R+/R- terminals coming out of rs232-rs485 converter, and I can see mirrored square wave when typing in the serial port terminal. I am pretty sure all of this is working as it should.

    However when I launch emc2, in the terminal is displays the messages as it is loading, such as hy_vfd etc.. 19200 baud / ttyS1 etc.. then nothing else from hy_vfd is displayed in terminal. no communication errors or anything.
    Axis is working as it should, and the pyvcp component of hy_vfd is displaying correctly, and if I get a linuxcnc error, such as "cant issue MDI command while not homed" that shows up in the terminal, so it still prints there as it should. I have tried the -g and -M and --debug, but it seems like hy_vfd is just all show and no go..

    Anyone still using this program? I really want to get this all working, and it looks like the best way to control a huanyang VFD that I have seen.

    Thanks!

  2. #2
    Join Date
    Feb 2007
    Posts
    711
    I am using linuxcnc 2.5 and I think when the hy_vfd was released 2.3 or 2.4 was current. I am looking through the source code now trying to wrap my head around it with my limited and not used in 10 years programming skills.

  3. #3
    Join Date
    Feb 2007
    Posts
    711
    Ok i have been putting printf commands in the source as a debugging tool to see how far through the code I get before it hangs, and I found I get to the point of

    Code:
    // wait until EMC and AXIS is ready, ie enable bit is set
    	while (!*(haldata->enable)){
    		// do nothing until enabled
    	}
    So I need to find out what haldata->enable is connected to. I am guessing this is something that has changed since 2.4
    With axis running, i looked through halmeter and the only pin with enable in the name I could find that was false is spindle-vfd.enable

    Anyone out there?

    I will post all my files once i get it working so anyone with 2.5 who wants to use it can get it working easily. I had to change a few lines in the source from emc2 to linuxcnc already. I know I can get this working, just not that familiar with anything but basic programming and setup.

  4. #4
    Join Date
    Feb 2007
    Posts
    711
    I made this way more complicated than needed.

    Somehow my custom_postgui.hal was overwritten with another one

    what i was missing was
    Code:
    # now enable the VFD after EMC is up and running
    
    setp spindle-vfd.enable 1
    I will update if I have any other problems/solutions and If anyone is trying to get this working I can help

Similar Threads

  1. Huanyang VFD RS485 / Modbus
    By scotta in forum Phase Converters
    Replies: 130
    Last Post: 05-15-2022, 03:13 PM
  2. RS485 for POWERMAX 65
    By FredCNC in forum Hypertherm Plasma
    Replies: 8
    Last Post: 08-24-2011, 02:46 AM
  3. JRKerr 3PH Controller with Moxa RS485
    By Zathras in forum Servo Motors / Drives
    Replies: 1
    Last Post: 01-20-2008, 04:17 PM
  4. rs-232 and rs485 bus
    By eloid in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 03-13-2007, 04:39 AM
  5. RS485, educate me please
    By phantomcow2 in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 01-07-2007, 07:28 PM

Posting Permissions

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