585,708 active members*
3,857 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Phase Converters > Huanyang VFD RS485 / Modbus
Page 3 of 7 12345
Results 41 to 60 of 131
  1. #41
    Join Date
    Sep 2010
    Posts
    0
    Hi, scotta!
    I'm trying to use your components. I installed the component and copied hal files.
    There's a problem when starting EMC2.

    EMC2 - 2.6.0~pre
    Machine configuration directory is '/home/pkm/emc2/configs/machine'
    Machine configuration file is 'machine.ini'
    Starting EMC2...
    spindle-vfd: device='/dev/ttyS0', baud=19200, bits=8, parity='none', stopbits=1, address=1, verbose=1, PID=1433
    Opening /dev/ttyS0 at 19200 bauds (none)
    RTAPI: ERROR: version mismatch 1 vs 0
    HAL: ERROR: rtapi init failed
    spindle-vfd: ERROR: hal_init failed
    custom.hal:5: hy_vfd exited without becoming ready
    Shutting down and cleaning up EMC2...
    Cleanup done

    Is it because of newer EMC2 version?

  2. #42
    Join Date
    Apr 2005
    Posts
    1778
    If you are really using 2.6.0~pre you are on the bleeding edge and feeling the pain. The build-bot shows 2.5.0~pre. EMC2-2.4.6 is the latest stable release, 2.5 is coming soon.

    If you go to Index of /dists/lucid/v2.5_branch-rt/binary-i386 you can download something like "emc2_2.5.0~pre1-476-ge01d33f_i386.deb". It should be getting close to stable.

    I would suggest sticking with 2.4.6 unless you need features that are only in 2.5.

    Alan

  3. #43
    Join Date
    Apr 2005
    Posts
    1778
    If you are really using 2.6.0~pre you are on the bleeding edge and feeling the pain. The build-bot shows 2.5.0~pre. EMC2-2.4.6 is the latest stable release, 2.5 is coming soon.

    If you go to Index of /dists/lucid/v2.5_branch-rt/binary-i386 you can download something like "emc2_2.5.0~pre1-476-ge01d33f_i386.deb". It should be getting close to stable.

    I would suggest sticking with 2.4.6 unless you need features that are only in 2.5.

    Alan

    Sorry about the double post.

  4. #44
    Join Date
    Sep 2010
    Posts
    0
    acondit, thanks for helping!
    The problem is not the version but rather location.
    I found that it works with installed EMC2 and fails to run with run-in-place version. I use 2.6.0 just because it's the last version downloaded with git by default. I make changes in kinematic files and compile it for run-in-place.
    Thus I just need to change the way the component compiles. But modifying scottas' makefile for run-in-place setup is high above my programming skills.

  5. #45
    Join Date
    Apr 2005
    Posts
    1778
    You are definitely braver than I am.

    I would at least step back a level to 2.5.0~pre. You can download the source for emc2_2.5.0~pre1 from Index of /dists/lucid/v2.5_branch-rt/source.

    Then you will have something that is approaching stable to work from. I used to build stuff with Unix makefiles and the like but all this new autoconf and automake stuff just boggles my mind.

    Since it is working from the installed version, try downloading the source for that version, and make the --runinplace version. Then, if it doesn't run, you at least know it is something to do with building the runinplace.

    Alan

  6. #46
    Join Date
    Sep 2010
    Posts
    0
    Thank you, Alan!

    I try it on my experimental PC, so pre version is not a problem there.

    The component proved to work on installed 2.6.0 but I still need it run-in-place.

    Andrew

  7. #47
    Join Date
    Dec 2011
    Posts
    0
    Hello guys,

    any news with this approach ? I'm total newbie in CNC world, but I also own this Chinesse VFD. Could you please provide working config to control this device with LinuxCNC via ModBus?

    Thanks in advance!

  8. #48
    Join Date
    Oct 2011
    Posts
    0
    Hello, I begin with EMC2, I try to install the plugin vfd and I have the following error message:

    Makefile:17: .o/hy_vfd.d: Aucun fichier ou dossier de ce type
    Makefile:17: .o/hy_modbus.d: Aucun fichier ou dossier de ce type
    mkdir -p .o
    cc -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -MM -MT ".o/hy_modbus.d .o/hy_modbus.o" hy_modbus.c -o .o/hy_modbus.d.tmp \
    && mv .o/hy_modbus.d.tmp .o/hy_modbus.d
    hy_modbus.c:37:19: error: rtapi.h: Aucun fichier ou dossier de ce type
    make: *** [.o/hy_modbus.d] Erreur 1

    If somebody in an idea :idea:

  9. #49
    Join Date
    Aug 2005
    Posts
    1091
    Hi,

    Unless things have changed, the Haunyang VFDs have not implemented Modbus correctly. You will not get it to work without rewriting the Modbus master code to suit the Haunyang interface which is not Modbus.

    Cheers,

    Peter
    -------------------------------------------------
    Homann Designs - http://www.homanndesigns.com/store

  10. #50
    Join Date
    Feb 2007
    Posts
    711
    Quote Originally Posted by gnomathibus View Post
    Hello, I begin with EMC2, I try to install the plugin vfd and I have the following error message:

    Makefile:17: .o/hy_vfd.d: Aucun fichier ou dossier de ce type
    Makefile:17: .o/hy_modbus.d: Aucun fichier ou dossier de ce type
    mkdir -p .o
    cc -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -MM -MT ".o/hy_modbus.d .o/hy_modbus.o" hy_modbus.c -o .o/hy_modbus.d.tmp \
    && mv .o/hy_modbus.d.tmp .o/hy_modbus.d
    hy_modbus.c:37:19: error: rtapi.h: Aucun fichier ou dossier de ce type
    make: *** [.o/hy_modbus.d] Erreur 1

    If somebody in an idea :idea:
    If you are using linuxcnc 2.5.0, the source will have to be edited to fix. basically find and replace emc2 -> linuxcnc a bunch of times. There are probably some other things that need to be done also. What you have to do is see what the error is telling you and figure out how to fix it. for example "Aucun fichier ou dossier de ce type" No such file or folder. You need to install source and library files to be able to compile programs.

    Also, know that you don't need to compile, you only need to copy the binary executable hy-vfd to /usr/bin
    Also, the file custom-postgui.hal gets overwritten every time stepconf is run, so make a backup to copy back if you use stepconf.

    I saved my files, you can try them and see if it works for you.
    Attached Files Attached Files

  11. #51
    Join Date
    Oct 2011
    Posts
    0
    thank you very much for your help alan_3301, now when I run emc2 I get this error:


  12. #52
    Join Date
    Feb 2007
    Posts
    711
    custom.hal is trying to assign motion.spindle-forward, but it has already been assigned. what you need to do is go into your machine .hal file, find the line that mentions motion.spindle-forward and spindle-cw on the same line. comment this line out (what that means is put a # at the beginning of the line)

    See what happens with that. you should be close to getting the software side of things set.

  13. #53
    Join Date
    Oct 2011
    Posts
    0
    ok now linuxcnc is launched without error , the control panel Huanyang vfd is present but when I run the command "M3 S10000" nothing happens, yet my VFD is configured
    PD001= 2, PD002 = 2, PD163 =1, PD164 = 2 and PD165 = 3, my COM port is ttyS0
    I tested my spinle on windows with the plugin Huanyang vfd for mach3 and it works without problems



  14. #54
    Join Date
    Oct 2011
    Posts
    0
    I found it works with: loadusr spindle-Wn-hy_vfd vfd vfd-spindle-n-d / dev/ttyS0-r 19200-b 8-p none-s 1-t 1 :banana:

    thank you again for advice

  15. #55
    Join Date
    Feb 2007
    Posts
    711
    Quote Originally Posted by gnomathibus View Post
    I found it works with: loadusr spindle-Wn-hy_vfd vfd vfd-spindle-n-d / dev/ttyS0-r 19200-b 8-p none-s 1-t 1 :banana:

    thank you again for advice
    If you issue a M3 S10000 does your spindle run at 10,000rpm?
    I am having issue with my vfd and spindle going at 8x the rate at which my S command specifies.

    are you using the linuxcnc2.5 hy_vfd binary in the zip file I posted earlier, or are you using a version you compiled yourself?

    This will tell me if i need to look on the linuxcnc side of things, or the VFD.
    would you mind posting your pd008 and pd144 settings.

  16. #56
    Join Date
    Feb 2007
    Posts
    711
    I think I figured it out. When scotta wrote this program, I guess he used the default for pd004 on his VFD/Spindle.

    In the file hy_vfd.c look for
    Code:
    hzcalc = *(haldata->base_freq) / *(haldata->rated_motor_rev);
    	freq =  abs((int)(*(haldata->speed_command)*hzcalc*100));
    base_freq is pd004 (default of 50)
    rated_motor_rev is pd144 (default of 1440)

    I am assuming when he set his VFD up, and wrote the program, that he set pd144 to 3000 like the rest of us using this spindle, but left pd004 at 50?
    this would set hzcalc to 0.01666667 When I set my pd004 at 400 as instructed by the consensus. it would set hzcalc 8 times more, to 0.13333333
    Which explains why my vfd tries to run at 8x the speed of my S command.
    So to fix I will change to

    Code:
    hzcalc = 50 / *(haldata->rated_motor_rev);
    	freq =  abs((int)(*(haldata->speed_command)*hzcalc*100));
    this should work for all cases. The definition of rated_motor_rev is the speed of the motor at 50hz, so this should be good for all.
    I will test it out this week and make sure it all works.

  17. #57
    Join Date
    Aug 2012
    Posts
    14
    Alan, I find this useful and interesting. I just got a new CNC engraver with 800w VFD water cooled spindle. The VFD inverter is probably Huanyang but there is no brand or model name on the outside. The front panel has start and stop buttons and a speed potentiometer. The other buttons were hidden by a large warning sticker that i should not change parameters.
    How do I know if I can use it with code presented here?

    Anyway I have ordered a rs232 to rs485 converter from ebay and I would like to try this when it arrives.

    Thanks!


  18. #58
    Join Date
    Feb 2007
    Posts
    711
    Hi, the best thing I can tell you Is to look on back / bottom of the vfd for a model # or sticker with info. Then you can try to find a manual somewhere. It might be the same as the one floating around for the vfd that comes with the 2.2kw spindles.

    The next step would be to go through each parameter, and write down what each one is currently set at. I think you avoid should viewing pd013 as it supposedly resets all other settings, but according to my manual you have to set it to 8 to do so.

    Definitely find a manual and read what all the parameters do as much as you can stand, it will help when things arent working.

    Also, some of the VFDs did not come with the rs485 chip installed.

  19. #59
    Join Date
    Aug 2012
    Posts
    14
    Sorry, my confusion! The model that I got is HY01D523B.
    I'm attaching a photo of the front panel and interior.
    If I understand correctly, the RS485 chip is U4 (8 ping chip on the right edge under the ribbon cable and the two electrolytic capacitors).
    Attached Thumbnails Attached Thumbnails inverter.jpg  

  20. #60
    Join Date
    Dec 2003
    Posts
    24220
    I understand you intend using with EMC, but maybe by looking at details of the Huyanyang serial plug in in the Mach site will give you insight to the Parameters that were used in that plug in.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

Page 3 of 7 12345

Similar Threads

  1. Mach3+DZB200M + Modbus RS485 + brain
    By Ceyhun in forum Mach Software (ArtSoft software)
    Replies: 5
    Last Post: 10-30-2014, 12:42 PM
  2. Replies: 4
    Last Post: 01-27-2013, 06:49 PM
  3. RS485 for POWERMAX 65
    By FredCNC in forum Hypertherm Plasma
    Replies: 8
    Last Post: 08-24-2011, 02:46 AM
  4. Spindle vfd control via modbus & rs485?
    By Pplug in forum Techno CNC
    Replies: 0
    Last Post: 05-25-2011, 01:24 AM
  5. rs-232 and rs485 bus
    By eloid in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 03-13-2007, 04:39 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
  •