Reverse spindle no pwm

More
22 Mar 2012 03:17 #18698 by cmorley
Replied by cmorley on topic Re:Reverse spindle no pwm
motion.spindle-speed-out pin is negative when the spindle is reversed.

PWM type 1 sets the output to zero with negative input ( so the docs say )

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

More
22 Mar 2012 15:02 #18708 by PCW
Replied by PCW on topic Re:Reverse spindle no pwm
Are you sure? thats true for mode 0 but the pwmgen manual says no such thing for mode 1

If PWMGEN does output 0 PWM in mode 1, then its serisouly broken and should be fixed(since mode 1 has a direction output and the only way to make direction high is a negative input)

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

More
22 Mar 2012 20:58 #18715 by BigJohnT
Replied by BigJohnT on topic Re:Reverse spindle no pwm
This is from the pwmgen man page:

type 1: pwm/direction

Two output pins, pwm and dir. The duty cycle on pwm varies as a function of the input value. dir is low for positive inputs and high for negative inputs.


John

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

More
23 Mar 2012 05:06 #18733 by cmorley
Replied by cmorley on topic Re:Reverse spindle no pwm
sorry your right. I miss read.

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

More
23 Mar 2012 08:56 #18735 by grandixximo
this would be how to use abs to have pwm on reverse spindle rotation (negative speed out)


# load abs component
loadrt abs count=1
# add abs to thread
addf abs.0 servo-thread
# hijack the spindle speed out and send it to abs in
net speed-to-positive abs.0.in <= motion.spindle-speed-out
# send the always positive abs output to pwmgen
net spindle-speed-cmd <= abs.0.out => pwmgen.0.value

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

More
23 Mar 2012 12:48 #18742 by BigJohnT
Replied by BigJohnT on topic Re:Reverse spindle no pwm
PCW wrote:

Is it really ABS thats needed or the proper PWM mode?
PWM mode 1 should do the right thing without adding any other comps
if PWM mode 1 does not do the right thing, the PWM comp needs to be fixed


I just got my LAN back up and copied the stepconf file to a Linux computer and ran StepConf and created the configuration files. The mode set by stepconf is 0, so it is behaving as it should with off for negative inputs.

This may be a short coming of Stepconf not picking mode 1 when a direction pin is used...

John

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

More
24 Mar 2012 01:50 #18749 by cmorley
Replied by cmorley on topic Re:Reverse spindle no pwm
There actually is no direction signal available. There is a spindle cw and spindle ccw signal that could be used.
So should we add the direction signal and if it is selected then the PWM should be type 1 other wise type 0 ?
Or add a checkbox for positive PWM only? I think I favor the direction signal.
the only problem i see is it is not obvious how stepconf will pick what type of PWM ( unless we use the checkbox)

Chris M

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

More
24 Mar 2012 02:25 #18750 by PCW
Replied by PCW on topic Re:Reverse spindle no pwm
I think what John means is if the user wants a reversable spindle, PWM mode1 should be used. In this case the PWMGEN works with positive and negative inputs and generates a direction output that can drive a physical output pin. For non reversable spindles, PWM mode 0 shoulld be used

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

More
24 Mar 2012 04:43 - 24 Mar 2012 04:48 #18751 by cmorley
Replied by cmorley on topic Re:Reverse spindle no pwm
well one can use the cw and ccw signals to select the direction.
What i mean is there needs to be a way to let stepconf know that the user wants a PWM signal that is always positive or positive and negative.
And it needs to be done in such a way that it is obvious to the user.

right now it seems it ignores negative PWM but does set the ccw signal.
Last edit: 24 Mar 2012 04:48 by cmorley.

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

More
24 Mar 2012 10:21 #18752 by Rick G
Replied by Rick G on topic Re:Reverse spindle no pwm

There is a spindle cw and spindle ccw signal that could be used.
So should we add the direction signal and if it is selected then the PWM should be type 1 other wise type 0 ?
Or add a checkbox for positive PWM only? I think I favor the direction signal.


That makes sense to me.
It seems the most common combinations would be;
A spindle that only goes one direction.
A spindle that always uses a positive pwm signal and reverses with a signal pin, such as the VFD and Mesa combination I use.
A spindle that uses a positive and negative signal to select direction and speed.

Rick G

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

Time to create page: 0.166 seconds
Powered by Kunena Forum