On Thu, 17 Jun 2021, John Dammeyer wrote:
Date: Thu, 17 Jun 2021 09:17:51 -0700
From: John Dammeyer <[email protected]>
Reply-To: "Enhanced Machine Controller (EMC)"
<[email protected]>
To: "'Enhanced Machine Controller (EMC)'" <[email protected]>
Subject: Re: [Emc-users] Setting of maximum velocity and acceleration in ini
file
From: andy pugh [mailto:[email protected]]
On Wed, 16 Jun 2021 at 13:37, suraj kumar <[email protected]> wrote:
I see, I have to set the maximum velocity and acceleration in ini file at
more than one place, like in [DISPLAY], [TRAJ], [AXIS_X], [JOINT_0]. I can
also see in [JOINT_0], I need to set two times, one for Max velocity and
acceleration and another for STEPGEN MAXVEL and MAXACCEL (25% larger than
MAX_VELOCITY and MAX_ACCELERATION).
They all do slightly different things.
Starting with the stepgens: The stepgen modules (both software and
fpga versions) have internal limits on velocity and acceleration. You
can set these to zero and no limits are applied.
The reason for this is so that it is possible to connect a stepgen to
a stepper motor and pass position/velocity commands _without_ passing
the command through a trajectory planner. A GUI, for example, can pass
a new position to the stepgen position command and
the internal limits will mean that the motor will accelerate smoothly
to position and stop.
If a system is configured with backlash compensation then the stepgen
limits need to exist too.
Then there are the joint and axis limits. These are often exactly the
same with a cartesian machine, but are not the same thing when the
kinematics is more complicated.
The [DISPLAY] section sets how high the sliders are allowed to go that
set the velocities. You might want to have these different to the
actual machine hardware limits.
And the [TRAJ] limits are the limits foro tool-point velocity in
multi-axis motion, which can be significantly higher than for a single
axis.
--
atp
I have a follow up question to Andy's answer. I recall Peter Wallace (I think
it was Peter) mentioning that the PID wasn't needed for stepper drives but
would be needed for a PWM driven spindle with encoder feedback. So for stepper
motor or servo drives driven with their own closed loop controller these aren't
needed?
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.a.do-pid-calcs servo-thread
And therefore lines like this can also be removed?
For a spindle speed controller in open loop velocity mode
there is no need for PID since you just set the stepgen rate
to the commanded spindle speed. For position mode step/dir
its a bit more complicated. You can run these with the
built-in position mode in the stepgen driver, but using a hal PID
loop provides better robustness WRT servo thread jitter, missed
cycles etc. Ideally the built-in stepgen position mode should
be implemented with a (hidden) PID for hal simplicity, but this
is a fair sized project.
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output => pid.x.output
Especially since the pid.x.___ aren't used anywhere else?
Have I got it right?
Thanks
Joihn
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users