On 2/20/2014 10:21 AM, Mark Tucker wrote:
> Ok i am not well enough conversed to explain this in detail,but i will try.
> Having recently been involved with the beaglebone/machinekit setup,i
> accidently came across a problem.
> I found that speradically the motors would make a noise like "frying an
> egg" after movement had finished.
> This after some investigation by Charles,Jeff pollard,and few others,was
> found to be the dir line hunting after a movement.
> This has turned out to be a known problem with the pru and the fact it
> is using position feedback and not velocity feedback.
> So the outcome after a few discussions was that the hal file needs
> changing to utilise the stepgen in velocity mode.
> Now i am at a complete loss how to do this,so is there anyone out there
> that can help?
> Charles is snowed under at the moment otherwise i am sure he would oblige.
> I will try attatching my hal file.
> I am sure there are others that will explain this better than me because
> of my limited knowledge.

Peter Wallace provided the following excellent advice, which I forwarded
to Mark.  I'm a bit too busy to fiddle with the HAL code for a week or
so, and was hoping someone might be able to help Mark get his HAL file
sorted out:

Quote from Peter:

The current position mode driver code makes sense for a software
implementation but suffers from some issues when used with a hardware
stepgen (and since the PRU stepgen is a asynchronous
(to servo thread) DDS it probably has the same issues)

To do this you set the stepgen in velocity mode, and set a P of around
50 and a FF1 of 1.000. The nice thing about this is you can now use the
PID comps facilites to fix a number of deficiencies in the built in
position mode code:


1. Setting the PID comps maxerror to some small value makes the stepgen
avoid large corrections based on the servo thread jitter in sampling the
stepgens position (effectively slew limiting the corrections) this make
sense for hardware or PRU based system where the stepgen DDS is a better
timing reference to short term timing than the servo thread.

2. Setting the PID comps dead zone stops the toggling

3. A tiny bit of FF2 can be used to compensate for the delay between
sampling the stepgen position and writing the new DDS rate


In my testing, if you have any significant servo thread jitter, using a
servo type config like this results in much better stepgen performance
the the built in position mode controller


freeby.mesanet.com/7i76e.zip

has an example servo mode stepgen setup


-- 
Charles Steinkuehler
[email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to