Spindle encoder issues
06 Sep 2013 17:06 #38506
by ArcEye
There are some big differences between your code and mine.
You have 3 x as many ppr, I found that a 500 ppr encoder went wildly erractic above a certain speed on my setup (BOB and parport cables - no hardware cards etc) , too many pulses to cope with.
I settled upon 120 ppr purely because of physical limitations of the number of holes I could drill around a given size of disc, it works well however.
You are controlling your spindle with a PWM and using it for scaling, whereas mine is a velocity stepgen and a seperate scale componant
You also have an motion.spindle-at-speed connection
I don't know what if any effect that could have, the first impression from the scope image is that the spindle is 'hunting', which could be down to PWM or at-speed
but either way over correcting, spiking correcting again.
I don't use PWM to control anything so will leave others to advise, personally I would start disconnecting the spindle-at-speed and see if that alters anything.
I am sure that Andy calculated how many days of continual running it would take to overfill the counter once, it was not a problem.
regards
Replied by ArcEye on topic Re:Spindle encoder issues
I have tried ArcEyes exact code and various other thing with no success.
There are some big differences between your code and mine.
You have 3 x as many ppr, I found that a 500 ppr encoder went wildly erractic above a certain speed on my setup (BOB and parport cables - no hardware cards etc) , too many pulses to cope with.
I settled upon 120 ppr purely because of physical limitations of the number of holes I could drill around a given size of disc, it works well however.
You are controlling your spindle with a PWM and using it for scaling, whereas mine is a velocity stepgen and a seperate scale componant
You also have an motion.spindle-at-speed connection
I don't know what if any effect that could have, the first impression from the scope image is that the spindle is 'hunting', which could be down to PWM or at-speed
but either way over correcting, spiking correcting again.
I don't use PWM to control anything so will leave others to advise, personally I would start disconnecting the spindle-at-speed and see if that alters anything.
my spindle position also keeps increasing without resetting every revolution.
I am sure that Andy calculated how many days of continual running it would take to overfill the counter once, it was not a problem.
regards
Please Log in or Create an account to join the conversation.
06 Sep 2013 17:24 #38507
by cncbasher
Replied by cncbasher on topic Re:Spindle encoder issues
I notice your using the Parport , and i'd take a guess that the port cant cope with the high pulse rates , especialy if you have any opto's in the BOB .
also you don't say what your typical rpm is
however see if the values are more stable at lower rpm .. as Arceye suggests the scope traces show the spindle is hunting , you probably would be better off using a mesa interface to be able to cope with the higher pulse rates
you may also find your trying to control the speed too accurately , and need more of a deadband area or tolerance
also you don't say what your typical rpm is
however see if the values are more stable at lower rpm .. as Arceye suggests the scope traces show the spindle is hunting , you probably would be better off using a mesa interface to be able to cope with the higher pulse rates
you may also find your trying to control the speed too accurately , and need more of a deadband area or tolerance
Please Log in or Create an account to join the conversation.
- Bad_German
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
06 Sep 2013 17:26 #38508
by Bad_German
Replied by Bad_German on topic Re:Spindle encoder issues
Thanks for your quick reply.
I removed spindle at speed, but it had no effect.
I removed spindle at speed, but it had no effect.
Please Log in or Create an account to join the conversation.
- Bad_German
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
06 Sep 2013 18:01 #38511
by Bad_German
Replied by Bad_German on topic Re:Spindle encoder issues
The screenshots from before where only at 200RPM,
I think cncbasher is right, when I run it at 2000RPM the hall-scope can't keep up either.
thought the spindle-velocity still jumps arround the same way.
2000rpm*360ppr/60s= 12000Hz
How do I decrese the spindle control precision?
I tried to assign a PWM frequency to the Spindle controll at 50 and 200Hz (setp pwmgen.1.pwm-freq 200.0)
which made the spindle speed up and down quite noticably, is this what you mean with "the spindle is hunting"?
I will try only using the index pulse to get the speed for now.
I think cncbasher is right, when I run it at 2000RPM the hall-scope can't keep up either.
thought the spindle-velocity still jumps arround the same way.
2000rpm*360ppr/60s= 12000Hz
How do I decrese the spindle control precision?
I tried to assign a PWM frequency to the Spindle controll at 50 and 200Hz (setp pwmgen.1.pwm-freq 200.0)
which made the spindle speed up and down quite noticably, is this what you mean with "the spindle is hunting"?
I will try only using the index pulse to get the speed for now.
Please Log in or Create an account to join the conversation.
06 Sep 2013 18:35 #38512
by PCW
Replied by PCW on topic Re:Spindle encoder issues
How fast is your base thread? A perfect 360 PPR encoder (no deviation from 50% duty cycle and exact 90 degree quadrature) would need a minimum base thread rate of 24 KHz in count mode and 48 KHz in quadrature mode to track at 2000 RPM. Given normal encoder tolerances, at least 50 % should be added to these figures giving 36 KHz minimum base thread rate for count mode and 72 KHz for quadrature (27.77 uSec and 13.88 uSec respectively)
Please Log in or Create an account to join the conversation.
- Bad_German
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
06 Sep 2013 18:45 #38513
by Bad_German
my base_period is 72.356 uSec ... so way to slow,
also my spindle maxes out at 2800rpm.
Replied by Bad_German on topic Re:Spindle encoder issues
How fast is your base thread? A perfect 360 PPR encoder (no deviation from 50% duty cycle and exact 90 degree quadrature) would need a minimum base thread rate of 24 KHz in count mode and 48 KHz in quadrature mode to track at 2000 RPM. Given normal encoder tolerances, at least 50 % should be added to these figures giving 36 KHz minimum base thread rate for count mode and 72 KHz for quadrature (27.77 uSec and 13.88 uSec respectively)
my base_period is 72.356 uSec ... so way to slow,
also my spindle maxes out at 2800rpm.
Please Log in or Create an account to join the conversation.
06 Sep 2013 18:46 - 06 Sep 2013 18:47 #38514
by ArcEye
Replied by ArcEye on topic Re:Spindle encoder issues
Delete, must type faster
Last edit: 06 Sep 2013 18:47 by ArcEye.
Please Log in or Create an account to join the conversation.
Time to create page: 0.097 seconds