Remotely controlling the Huanyang VFD with LinuxCNC over RS485 Modbus

  Рет қаралды 43,733

Marco Reps

Marco Reps

8 жыл бұрын

Get a Motor + VFD set: bit.ly/2IO0cP5
1. Get a couple of those cheat RS485 USB Adapters
2. Connect to VFD with a twisted pair cable
3. Configure the VFD like this:
PD001 = 2
PD002 = 2
PD163 = 1
PD164 = 1
PD165 = 3
4. Make a fresh LinuxCNC config without any spindle pins
5. Put into the custom.hal:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm-abs =▷ vfd.speed-command
net spindle-cw motion.spindle-forward =▷ vfd.spindle-forward
net spindle-ccw motion.spindle-reverse =▷ vfd.spindle-reverse
net on motion.spindle-on =▷ vfd.spindle-on
7. Change the ▷to pointy brackets which youtube wont let me put in my description ...
8. Put into the custom_postgui.hal:
setp vfd.enable 1
Seems like it's been a little bit foggy when these videos were shot...

Пікірлер: 39
@eemaniac
@eemaniac 2 жыл бұрын
Thanks for your video. This was great to get me started although I found that LinuxCNC v2.8 has change a little in that you can now have multiple spindles, so you need to specify which spindle to control. custom.hal changes as follows: loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 net spindle-cmd-rpm-abs => vfd.speed-command net spindle-cw spindle.0.forward => vfd.spindle-forward net spindle-ccw spindle.0.reverse => vfd.spindle-reverse net on spindle.0.on => vfd.spindle-on Hope this helps someone!
@billstrahan4791
@billstrahan4791 4 жыл бұрын
Thanks so much! I just got my spindle working with LinuxCNC and this video made it very straightforward. I appreciate you taking the time to do this!
@johnross3752
@johnross3752 3 жыл бұрын
? Did you ave to conect Ground wire..Can it do fwr-rev , start-stop
@billstrahan4791
@billstrahan4791 3 жыл бұрын
@@johnross3752 On mine the ground was wired to the 4th pin on the plug already. It has full control from Linuxcnc. Spindle on-forward on-reverse, and RPM. It's perfect.
@johnhopkins8716
@johnhopkins8716 7 жыл бұрын
Great video, thanks for sharing. I can now control my 2.2kw spindle directly from Linux CNC.
@Jonas_Aa
@Jonas_Aa 4 жыл бұрын
Tip is to use /dev/serial/by-id/foo so never have to worry if USB0 changes to something else.
@matter9
@matter9 Жыл бұрын
Excellent I’m looking forward to trying this!
@arno8312
@arno8312 7 жыл бұрын
Awesome video with every needed tips. My new spindle was ready to work in less than 10mn. many thanks !
@odinfranklin2656
@odinfranklin2656 2 жыл бұрын
i know im asking the wrong place but does anyone know a tool to log back into an instagram account? I was stupid lost the account password. I would love any help you can give me!
@finnesteban2313
@finnesteban2313 2 жыл бұрын
@Odin Franklin instablaster :)
@odinfranklin2656
@odinfranklin2656 2 жыл бұрын
@Finn Esteban Thanks for your reply. I found the site thru google and im trying it out now. I see it takes quite some time so I will reply here later when my account password hopefully is recovered.
@odinfranklin2656
@odinfranklin2656 2 жыл бұрын
@Finn Esteban it worked and I actually got access to my account again. Im so happy:D Thanks so much, you really help me out :D
@finnesteban2313
@finnesteban2313 2 жыл бұрын
@Odin Franklin Glad I could help xD
@daxur89
@daxur89 5 жыл бұрын
Good day, I need to control a spindle speed from a CNC milling machine, the machine have a parallel port board for the stepper motors, and apparently that especific board does not emit an analog signal to use with the VFD, do you know how can I solve this problem without removing the board the machine already has?
@16siemon
@16siemon 6 жыл бұрын
But you dont compare the actual rpm since the spindle will slow down under load from what i can see? Or am i missing something
@randyluckini2866
@randyluckini2866 7 жыл бұрын
Thanks for posting. I have 2.7.8 Linuxcnc, Mesa system. Trying to get a cnc mill up and running. I am running servo encoder system. I am new to linuxcnc. is there a copy of the files needed to run this VFD or do I need to somehow make the ini, hal files? I see you used stepconfig to generate your files. I am not sure if I need to use pncconf wizard (and if I do.. I am lost in the instructions). all my current files have been copied from a linuxcnc member with the same machine with postgui.hal
@saldot79
@saldot79 8 жыл бұрын
Thanks alot for the guide! I followed tour guide and while it worked in windows using spindle talker 2 it didn't work in LinuxCNC. Got an error message: ERROR Communication time out (-12) error reading settings from VFD, retrying WAIT_DATA(): comms timeout After a few nights of troubleshooting and watching your video about 10 more times I decided to replace the USB->rs485 adapter which solved the issue. (doh)
@vladdaniel864
@vladdaniel864 7 жыл бұрын
i get an error on the dev part. u change the ttyusb to /dev/ttyS0 because i have a rs232 to 485 converter.
@loiclecourtois1745
@loiclecourtois1745 7 жыл бұрын
Bonjour es ce que c'est compatible avec linuxcnc2.5 ? Merci
@gacherumburu9958
@gacherumburu9958 5 жыл бұрын
👍👍👍
@MrStarTraveler
@MrStarTraveler 2 жыл бұрын
The custom.hal script, as shown in the video, will not work for LinuxCNC 2.8+ (at least it didn't for me) This is how it should look now: loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 net spindle-cmd-rpm-abs => vfd.speed-command net spindle-fwd spindle.0.forward => vfd.spindle-forward net spindle-rev spindle.0.reverse => vfd.spindle-reverse net on spindle.0.on => vfd.spindle-on The main change is: "motion.spindle-forward/reverse/on" becomes "spindle.0.forward/reverse/on". The most shocking thing was that I couldn't actually control the speed before I changed spindle-cw/ccw to spindle-fwd/rev. I could only start and stop the spindle before that. It was a shot in the dark. I didn't believe it would change anything but it did. P.S. Always use filtered USB cables! (As shown in the video) Those USB-to-RS485 adapters glitch out even if you sneeze at them.
@MrStarTraveler
@MrStarTraveler 9 ай бұрын
Ah! We're at it again! in 2.10.0 spindle doesn't fully work again. I can only turn it on and off, and control the direction. No speed control once more. I tried to return the spindle-fwd/rev back to spindle-cw/ccw but it didn't help. I'm at a loss again.
@MrStarTraveler
@MrStarTraveler 9 ай бұрын
YESSSS !!! I GOT IT RUNNING !!! I used an ancient spell, called: Looking at the documentation. XD Gee, who knew the documentation might have some answers for me. XD So now that I got the self deprecating humor out of the way let me describe how I got it to work: Firs my old custom.hal: loadusr -Wn vfd hy_vfd -n vfd -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -p none -r 9600 net spindle-cmd-rpm-abs => vfd.speed-command net spindle-fwd spindle.0.forward => vfd.spindle-forward net spindle-rev spindle.0.reverse => vfd.spindle-reverse net on spindle.0.on => vfd.spindle-on those net things are actually variables of type net. So lets take the second line: We have a variable of type net with name spindle-fwd and since net means connection the value of this variable is going to be two things: connecting what to what. In this case, the source signal spindle.0.forward to (=>) the VFD component vfd.spindle-forward. Notice however the first line does not follow this format. It seems that spindle-cmd-rpm-abs is both the name of the variable and the source signal?! I don't know how that worked before but apparently it doesn't any more. So after consulting with the documentation I tried replacing the first net with: net spindle-speed-cmd spindle.0.speed-out => vfd.speed-command this worked, the +/- buttons appeared and they were correctly controlling the speed. Also the spindle started responding to the MDI commands in linuxcnc. One small hick up was that the RPM panel that I've setup in linuxcnc didn't show the RPM. But I knew why. The GUI panel is an XML script that indirectly depends on the variable spindle-cmd-rpm-abs which in this case is replaced by spindle-speed-cmd so I either had to change the name of the variable in two different files or just: loadusr -Wn vfd hy_vfd -n vfd -d /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -p none -r 9600 #type, name val: source -> destiantion net spindle-cmd-rpm-abs spindle.0.speed-out => vfd.speed-command net spindle-fwd spindle.0.forward => vfd.spindle-forward net spindle-rev spindle.0.reverse => vfd.spindle-reverse net on spindle.0.on => vfd.spindle-on As you can see I just plugged the spindle.0.speed-out at the appropriate place in the old line that was controlling the spindle speed. And that fixed it! Hope that helps! :)
@vladdaniel864
@vladdaniel864 7 жыл бұрын
ok got to work. my fault wrong typing.now the rpm is off i type M3S1000 and it gives me 8007rpm.
@jthadcast
@jthadcast 8 жыл бұрын
Thanks for posting will try it. I have 0 exp with linux coding so could you explain the $ 1s /dev/ttyUSB* that pops up at 3.00 mark, is the $ 1s the (Wn vfd hy_vfd -n vfd -d) is that a 'component' in the default linuxcnc with ubuntu 10.x? Linuxcnc fails to load and I get errors with line 4 loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 Works great with fresh wheezy install!
@reps
@reps 8 жыл бұрын
Thats an L, not a 1 :) $ ls /dev/ttyUSB* lists all USB telecommunication devices such as RS485 adapters. If there are multiple, ttyUSB0 might the the wrong one. And I would recommend a fresh installation, because the ubuntu 10.04 image is too old.
@jthadcast
@jthadcast 8 жыл бұрын
thanks I will try another as I just use a live disc, which "image" do you use ubuntu, someone told me linuxcnc 2.7 only works with 10.04?
@reps
@reps 8 жыл бұрын
Debian Wheezyfrom the linuxcnc website: www.linuxcnc.org/linuxcnc-2.7-wheezy.iso
@grantlesueur
@grantlesueur 7 жыл бұрын
Gut gemacht. Does it mean that Linus cnc would pass M3 spindle on, M5 spindle off, and Snnn speed commands interpreted from GCode or is your implementation just to remote control from the screen.
@reps
@reps 7 жыл бұрын
Interprets gcode too!
@grantlesueur
@grantlesueur 7 жыл бұрын
***** could you share the modbus registers you read and write and what each value means. VFD documentation is terrible. Or share PM me the data map.
@andersmeiniche2746
@andersmeiniche2746 Жыл бұрын
At least you got some with the crystal in them ;) i bought 10 and not one of them got the crystal 12M :(
@JurassicLures
@JurassicLures 7 жыл бұрын
Hey Will it work with Huanyang VFD HY01D523B ?
@reps
@reps 7 жыл бұрын
Dunno, but I think it will! Why should they implement the RS485 differently for that unit
@JurassicLures
@JurassicLures 7 жыл бұрын
Hey, can u help me with my VFD configure? drive.google.com/open?id=0B6mwFaph3DUmS1JueEZFZ1JaX2s link to my VFD ebook .
@reps
@reps 7 жыл бұрын
Tried this? make-a-project.blogspot.de/2013/05/connecting-huanyang-hy01d523b-vfd-speed.html
@blejarodjaci
@blejarodjaci 5 жыл бұрын
Everything you wanted to know about Modbus: www.chipkin.com/files/liz/MODBUS_2010Nov12.pdf
Weeny solder bot (LinuxCNC on A4 paper size)
58:03
iforce2d
Рет қаралды 97 М.
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 202 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
MODBUS Over RS485 / Variable Frequency Drive
7:17
0033mer
Рет қаралды 3,6 М.
2.2kW Chinese Spindle & HY VFD Setup/Testing
11:14
Christoph Lehner
Рет қаралды 46 М.
Triggering an IOT relay with a Huanyang VFD
10:50
Jason Stewart
Рет қаралды 2,8 М.
Mach3 RS485 spindle control - CNCnutz Episode 147
15:18
CNCnutz (Peter Passuello)
Рет қаралды 43 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 183 М.
Spindle VFD setup part 2.0 - External Spindle Control (Journey so far)
12:36
Mesa 7i96S - first powerup
10:31
The Feral Engineer
Рет қаралды 11 М.
Huanyang VFD 2.2kw (pt2/2) - Programming
14:11
russtuff
Рет қаралды 97 М.
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН