Cannot control spindle speed - HY VFD on RS-485
- rubinstu
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 2
31 Jan 2025 23:04 #320265
by rubinstu
Cannot control spindle speed - HY VFD on RS-485 was created by rubinstu
I have a pretty convention setup (I think) with a Huanyang VFD connected via RS-485. Before switching to RS-485 controls, it worked fine from the control panel (on/off, fwd/rev, speed, etc.) but now that I've switch to RS-485, I cannot control the speed. I CAN turn the spindle on/off and set the fwd/rev directions from the Axis GUI. When I press the + and - buttons, I can see the speed changing in the "Spindle Speed:" GUI, but the spindle itself does not change; it's always at the minimum.
Here's a screenshot which shows the GUI, custom.hal, and some HAL display from Axis.
custom.hal:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -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
setp vfd.enable 1
Any ideas here?
Thanks
Here's a screenshot which shows the GUI, custom.hal, and some HAL display from Axis.
custom.hal:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -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
setp vfd.enable 1
Any ideas here?
Thanks
Please Log in or Create an account to join the conversation.
- rubinstu
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 2
01 Feb 2025 04:06 #320280
by rubinstu
Replied by rubinstu on topic Cannot control spindle speed - HY VFD on RS-485
I figured out the problem and I'll post it in case anyone else runs into something similar.
TL&DR: It was working all along, but the +/- increments were so small and that the set speed was always less than the minimum. If I clicked + enough times, I would eventually get it past the min and the spindle would speed up.
The longer version is that on a whim, I ran the default "LinuxCNC" carve program, and surprisingly, the speed ramped right up to 10000 RPM (not the minimum 6000). So, that told me that the speed was actually under CNC software control. The I enabled the spindle manually from the GUI and just kept clicking + until the spindle passed the min. The LED display on the VFD tracked the GUI as well.
So, a frustrating few nights of debugging, but I learned a lot about how this thing works under the hood!
TL&DR: It was working all along, but the +/- increments were so small and that the set speed was always less than the minimum. If I clicked + enough times, I would eventually get it past the min and the spindle would speed up.
The longer version is that on a whim, I ran the default "LinuxCNC" carve program, and surprisingly, the speed ramped right up to 10000 RPM (not the minimum 6000). So, that told me that the speed was actually under CNC software control. The I enabled the spindle manually from the GUI and just kept clicking + until the spindle passed the min. The LED display on the VFD tracked the GUI as well.
So, a frustrating few nights of debugging, but I learned a lot about how this thing works under the hood!
Please Log in or Create an account to join the conversation.
Time to create page: 0.046 seconds