controlling a HY VFD via RS485, fails to respond

More
10 Apr 2019 15:33 #130601 by travis036
VFD part: HY04D023B

i followed the tutorial from:


i set the VFD parameters as described:
PD001 = 2 (use comm port)
PD002 = 2 (use comm port)
PD163 = 1 (Comm Address)
PD164 = 1 (9600 Baud)
PD165 = 3 (8N1 for RTU)

put the following in 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

put the following in custom_postgui.hal:
setp vfd.enable 1

i have verified that the RS485 USB is on /dev/ttyUSB0.

i thank you all in advance for any help.

~Travis

Please Log in or Create an account to join the conversation.

More
10 Apr 2019 16:08 - 10 Apr 2019 17:13 #130604 by farmerboy1967
Before going too far, check to see if the there is no missing components on the mainboard. Not all of the HY series of VFDs have the necessary components installed on the circuit board for serial communications to work.

You will need to remove the upper circuit board to clearly see the mainboard. There are Youtube videos of people taking it apart. I made sure mine was populated, even though I'm not using modbus at this time.

Sorry, It's been quite a while, but the components should be on the top circuit board. you just have to take the cover off to see it.

EDIT: Go here to see if you have missing parts:
www.machsupport.com/forum/index.php?topi....msg103415#msg103415

If the components on yours are there, I can't help you, but if yours are missing, from what I have read, the traces are there, they just needs to be populated with the missing components.

I don't know the name of the website off of the top of my head, but there is one that shows how to add the missing components, and the part numbers needed. You will have to Google for it.
Last edit: 10 Apr 2019 17:13 by farmerboy1967.

Please Log in or Create an account to join the conversation.

More
10 Apr 2019 18:26 #130616 by travis036
I can verify the necessary RS485 components are installed, and actually, i had it start the spindle via software, but then it stopped communicating, as the spindle reved higher and higher. but then i couldn't get control of it again, via RS485.

i even tried the tips from here: linuxcnc.org/docs/html/man/man1/hy_vfd.1.html
but still no joy.

i have a total of 5 of the RS485 USB adapters, and tried two others, in case of a fail, but no joy.

I can still revert the VFD back to manual control, but it would be so much better to control via software.

~Travis

Please Log in or Create an account to join the conversation.

More
10 Apr 2019 20:36 #130619 by slc
The baud rate for this spindle in my custom.hal file is 19200

I went round in circles for many hours getting this working because of all the variations among the drives.
If you still have no luck I will try and get all the configs tomorrow and post them here.

Please Log in or Create an account to join the conversation.

More
10 Apr 2019 21:53 #130626 by travis036
from my little knowledge of RS485, should i insert a 120Ohm termination resistor into the bus?
I will try it tomorrow, when i get a chance.

~Travis

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 06:44 #130647 by Mike_Eitel
Hi Travis
If you have to fight emv use the resistor plus twisted cables, to make it even better use a screened cable and connect screen only on pc side direct to the cubicle with a "fat" connection.
Mike

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 12:43 #130660 by slc
The relevant bits of my custom.hal file

I have no idea if this is correct or how I arrived at it several years ago, but the spindle works with this

loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -t 1 -d /dev/ttyUSB0 -p none -S24000 -r 19200 -s 1

net spindle-cmd-rpm-abs => spindle-vfd.speed-command
net spindle-cw motion.spindle-forward => spindle-vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => spindle-vfd.spindle-reverse
net on motion.spindle-on => spindle-vfd.spindle-on

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:23 #130673 by travis036
it seems to work now, with a variety of changes. i switched to a piece of CAT5e FTP cable (foil twisted pair). set baud to 9600, and changed to a different RS485 adapter. i also inserted a 120Ohm resistor at both ends of the FTP pair in use.
not sure exactly what the single solution is, but they work as a whole. i haven't grounded the FTP foil to the PC yet, but i suspect when i do, it will likely allow me to step up to 19200 baud.
i still have to correct a few parameters in the VFD, regarding the motor (rated RPM @ 50Hz, and number of poles) but it works now via RS485.

~Travis

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:32 #130675 by slc
For future reference in case I ever move a machine and have similar problems again , how long is the RS485 cable you use?

Please Log in or Create an account to join the conversation.

More
11 Apr 2019 15:42 #130677 by travis036
i didn't measure it, but i would say about 6 - 8 feet long. i would suspect longer would also work. but i didn't want to go crazy, as the computer, VFD, and CNC, are all currently within 4 feet of each other.
I plan on shielding the rest of the components in the near future, now that the proof-of-concept setup seems to work.

~Travis

Please Log in or Create an account to join the conversation.

Time to create page: 0.118 seconds
Powered by Kunena Forum