Huanyang VFD RS485 / Modbus - Page 3

Page 3 of 7 FirstFirst 123456 ... LastLast
Results 41 to 60 of 129

Thread: Huanyang VFD RS485 / Modbus

  1. #41
    Registered
    Join Date
    Sep 2010
    Location
    Ukraine
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default

    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
    Gold Member acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1778
    Downloads
    0
    Uploads
    0

    Default

    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
    Gold Member acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1778
    Downloads
    0
    Uploads
    0

    Default

    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.

    Last edited by acondit; 07-16-2011 at 11:40 AM. Reason: Added link to 2.4.6 binaries


  4. #44
    Registered
    Join Date
    Sep 2010
    Location
    Ukraine
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default

    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
    Gold Member acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1778
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Sep 2010
    Location
    Ukraine
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Dec 2011
    Location
    Lithuania
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Oct 2011
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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



  9. #49
    Member phomann's Avatar
    Join Date
    Aug 2005
    Location
    Australia
    Posts
    1091
    Downloads
    0
    Uploads
    0

    Default

    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


  10. #50
    Member
    Join Date
    Feb 2007
    Location
    usa
    Posts
    711
    Downloads
    2
    Uploads
    0

    Default

    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
    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
    Registered
    Join Date
    Oct 2011
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    thank you very much for your help alan_3301, now when I run emc2 I get this error:





  12. #52
    Member
    Join Date
    Feb 2007
    Location
    usa
    Posts
    711
    Downloads
    2
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Oct 2011
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Oct 2011
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    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

    thank you again for advice



  15. #55
    Member
    Join Date
    Feb 2007
    Location
    usa
    Posts
    711
    Downloads
    2
    Uploads
    0

    Default

    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

    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
    Member
    Join Date
    Feb 2007
    Location
    usa
    Posts
    711
    Downloads
    2
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Aug 2012
    Location
    Israel
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default

    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
    Member
    Join Date
    Feb 2007
    Location
    usa
    Posts
    711
    Downloads
    2
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Aug 2012
    Location
    Israel
    Posts
    14
    Downloads
    0
    Uploads
    0

    Default

    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 Huanyang VFD RS485 / Modbus-inverter-jpg  


  20. #60
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24220
    Downloads
    0
    Uploads
    0

    Default

    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 FirstFirst 123456 ... LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Huanyang VFD RS485 / Modbus

Huanyang VFD RS485 / Modbus