controlling a HY VFD via RS485, fails to respond

More
7 years 6 months ago #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
7 years 6 months ago #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
7 years 6 months ago #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
7 years 6 months ago #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.163 seconds
Powered by Kunena Forum