On Wed, 2 Feb 2022, Thaddeus Waldner wrote:
Date: Wed, 2 Feb 2022 01:39:29 -0600
From: Thaddeus Waldner <thadw...@gmail.com>
Reply-To: "Enhanced Machine Controller (EMC)"
<emc-users@lists.sourceforge.net>
To: Enhanced Machine Controller <emc-users@lists.sourceforge.net>
Subject: [Emc-users] Stepper PID
??Hi,
I have a pi4 running the 2.8.2 iso. I have it connected to a Mesa 7i96 and from
there I??m driving small stepper motors with tmc2209 ??stepstick?? drivers. I
think my step rate at max speed is around 8khz
I get around +-70us? Max latency.
I??ve been having an issue with what I think is latency which makes the
steppers sound like they have bad bearings. Raising the servo period to 2ms
made it worse. So I tried a faster servo thread and discovered the issue pretty
much goes away with the servo period at 250us. At that rate I start running
into joint following issues. 5A I then learned that with the servo period at
1ms, if I lower the stepper PID P parameter to 100 instead of the 1000 set by
the configuration wizard, the noise goes away completely and the steppers run
buttery smooth.
I have a few questions:
1) what are the implications of running the PID stepper with p=100?
Worse following error
2>) why is servo thread jitter even making into the stepper pulse train with a
Mesa Ethernet card and no communication errors? Do I have anything
misconfigured?
The problem is that the PID loop makes bogus velocity corrections because of
position sample time jitter (which may be as high as a few hunderd usec on
RPI4 Ethernet)
I suspect that you are not using the DPLL, or that it is not setup properly.
For a RPI4 I would suggest these settings:
setp hm2_7i76e.0.dpll.01.timer-us -200
set hm2_7i76e.0.stepgen.timer-number 1
These should reduce the stepgenb position sampling jitter to a
fraction of 1 usec.
Thanks
Peter Wallace
Mesa Electronics
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users