Spindle Speed Works CW But Not CCW
04 Oct 2013 19:02 #39535
by jorsborn
Spindle Speed Works CW But Not CCW was created by jorsborn
I recently added the ability to control my spindle direction. While it works just fine I lose the ability to control the spindle speed when running CCW. So...
I haven't changed anything with my HAL file other than adding the following lines...
To the existing...
Any thoughts?
- Running CW (M3) I get proper direction and speed
- Running CCW (M4) I get proper direction but no speed control. I can see via HALscope that the PWM generation ceases at this point.
I haven't changed anything with my HAL file other than adding the following lines...
net spindle-fwd motion.spindle-forward => parport.0.pin-17-out
net spindle-rev motion.spindle-reverse => parport.0.pin-01-out
To the existing...
loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
addf pwmgen.make-pulses base-thread
net spindle-speed-cmd motion.spindle-speed-out => pwmgen.0.value
net spindle-on motion.spindle-on => pwmgen.0.enable
net spindle-pwm pwmgen.0.pwm => parport.0.pin-14-out
# Set the spindle's top speed in RPM
setp pwmgen.0.scale 24000
setp pwmgen.0.offset -.006
Any thoughts?
Please Log in or Create an account to join the conversation.
04 Oct 2013 19:12 #39538
by cncbasher
Replied by cncbasher on topic Spindle Speed Works CW But Not CCW
dependent on the speed controller you have , they either have a + - pwm or only like a + pwm value , so when you select reverse , linuxcnc is supplying by default a negative pwm
where the controller you have perhaps only can accept a positive pwm level .
what speed controller or spindle interface are you using ?
where the controller you have perhaps only can accept a positive pwm level .
what speed controller or spindle interface are you using ?
Please Log in or Create an account to join the conversation.
04 Oct 2013 20:46 #39544
by jorsborn
Replied by jorsborn on topic Spindle Speed Works CW But Not CCW
I am using the HuanYang VFD which accepts a 0-10V signal for speed (PWM->Analog). However, the problem seems to be LinuxCNC and not my VFD. Looking at HAL Scope I don't see any output from PWM generator when run CCW where as I do see output when it is run CW. It's simply not manipulating the output pin.
Please Log in or Create an account to join the conversation.
05 Oct 2013 01:11 #39558
by PCW
Replied by PCW on topic Spindle Speed Works CW But Not CCW
loadrt pwmgen output_type=1
(man pwmgen)
(man pwmgen)
The following user(s) said Thank You: jorsborn
Please Log in or Create an account to join the conversation.
05 Oct 2013 03:38 #39559
by cncbasher
Replied by cncbasher on topic Spindle Speed Works CW But Not CCW
pcw's beat me to the answer , that should get you going , just post again if you still have problems
Please Log in or Create an account to join the conversation.
05 Oct 2013 11:44 #39571
by jorsborn
Replied by jorsborn on topic Spindle Speed Works CW But Not CCW
Thank you both... that solved the problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds