That behavior seems very strange. I suspect there may be more than one problem. I think there could be an issue with signs causing your forward/reverse problems...you may need an absolute value component somewhere. The PWM output includes an implicit absolute value (ie: the values +0.5 and -0.5 produce the same output) which might explain why it seems to work better. Halscope can help sort out these sorts of issues.
It also sounds like you may have a separate problem with the encoder index. Not a lot of folks have used indexed encoders with the BeagleBone, so it could be a software issue or a problem with signal integrity. Are you sure your encoder signals are clean at the BeagleBone? What do you get running halscope on the index-enable signal (while also monitoring position and rawcounts)? On 11/6/2016 9:33 AM, Sag ich Dir nich wrote: > Hi, > > i am using a Cramps board and want to control a spindle with an encoder to > spin > in both directions with working PID but the problem is: > > *_1_*. The PID only works correctly in cw direction, if i reverse the > direction > the spindle reverses but the PID does not try to hold the velocity. It only > does > that when i set the PID minimum output to -8500 (if i set it to the maximum > rpm > 8750 the spindle does full speed in either direction even when i command > 100rpm). > the problem with that is when i turn the spindle on and manually turning it > faster than the commanded speed, it speeds up to maximum speed. (seems like > the > PID tries to slow down but does not reverse the direction so it is in a loop > trying to slow down by decreasing the speed but actually increasing it (i > dont > know how to explain it better)) > > working spindle reverse is important to me because i want to do rigid tapping. > > is it possible to have a encoded spindle with spindle soft start? > > *_2_*. sometimes the Spindle stutters every second one or sometimes two times > in > a row when turning cw with the working PID. When in reverse without working > PID > (only PWM) it does not happen. > > *_3_*. the index pulse is often undetected (i am using a 512ppr encoder with > A,B > and index pulse, i also soldered pull-up-resistors to improve rise times like > the instruction said) > > so currently i am using the eQEP 0, which shares two signals on the A and B > pins, maybe the stutter is gone when i use eQEP 1 or 2 because they have only > one signal attached? > The Pins for eQEP 1 and 2 are not setup in the setup.sh file, can i just add > them? > > i uploaded my whole machine config > > i hope someone can help me > > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email > to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://groups.google.com/d/optout. > -- Charles Steinkuehler [email protected] -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
