On 7/4/23 20:09, John Dammeyer wrote:
On 7/4/23 18:18, gene heskett wrote:
On 7/4/23 16:49, John Dammeyer wrote:
Hi Gene,
I think you are overthinking the problem. .
Lets clarify where the error is, because the turn around at the bottom
of the hole is synchronized, the turn around at the top is not.
So where is it when the error was reported?
The error occurred after the I3 completed. Recall I3 tells the spindle to turn
3x as fast CCW as it turned in the other direction CW so 600 RPM.
The spindle is started earlier with an S200 M5. If the spindle is up to speed
at 200 RPM the knee heads up accelerating up to 10 IPM and the tap threads the
hole. At the bottom of the hole the spindle is instructed to slow down and the
Z axis tracks that from 10 IPM down to 0 IPM so that the thread isn't ruined or
tap broken.
Once the spindle is completely stopped (and the Z axis would be too) the
spindle is accelerated up to 600 RPM CCW and at the same time the knee is
accelerated to 30 IPM which is also 3x the amount when it went down. It has
no trouble following that because I suspect the acceleration is likely based
smaller of the two accelerations which is the Z axis acceleration. After all
it's a tracking operation so it may not even use the max accel values or the
min of the two so they can both keep up.
Now, at the top of the hole once the tap is out the synchronized motion is
complete and the spindle direction now has to be reversed to return to where it
was set with the M5 CW rotation. Here's where it screws up.
It's no longer _required_ to have the Z axis track so I suspect the Spindle
MAX_ACCEL value is now used. However from the Z axis perspective it may still
be trying to track the CCW spindle until the spindle is stopped. Therefore we
have the spindle with a MAX_ACCEL value of 300 and a Z axis MAX_ACCEL value of
10. The Joint2 axis (Z) just can't keep up and that’s when the following error
happens.
That Z following until the spindle is completely stopped is a
possibility I hadn't considered. And I don't read src code that easily.
I have always considered the sync was released when z had been withdrawn
to the starting point even though inertia is going to make it over shoot
and either motion or the PID's are going to force the reset to the
starting position, doing it independently. So if you're correct then
we've both learned something. And your fix would appear to be the
correct one. If the z is your knee, turning that around and bringing it
back up to 2 or 4 thou is the hardest part of the job.
I also don't have any machines with a heavy knee. Out of sight, out of
mind. I'll get my coat now.
So by reducing my spindle acceleration to a more reasonable value which doesn't
really appear to create problems the Z axis, which I suspect still has tracking
enabled can now keep up as the spindle slows. And now I can speed out at I6 or
1200 RPM which it does without any Joint 2 tracking errors.
John
That reads like the spindle stop time is overly long to me.
Nope.
Actually the spindle stops so quickly that I can hear the splines
rattle in the pulley driver.
The stop should be so violent the rattle is preloaded to silence.
Do like I've done, add 2 timers in your hal file, one triggered by the
motions direction output, to start when the reverse come in, and is
stopped when the spindle has has stopped as indicated by another timer
set to retrigger for 10 milliseonds on every edge the comes out of the
spindle encoder. The idea it to use this 10 ms lag to indicate the
spindle is slowed enough to be reversed w/o tripping breakers all the
way to the substation, and display the time the first timer is stopped
at in a pyvcp box. I have additional hal stuff to block the reverse from
the spindle control until t is everything but dea stopped, then and only
then do I allow the reversed direction signal into the spindle control,
and the same limit3 then ramps it back up to the chosen speed, with a
mux4 steering the input to the limit3. So the stop is a very fast ramp
down, and the accel ramps it back up to the same speed in the other
direction. 3k max spindle speed fwd to 3k speed in reverse, in under 400
ms. z s/b able to follow that. If not, slow the limit3, giving z a
chance to catch up.� That is assuming the following fault is being
blamed on z..
I'm still convinced a lengthy stop is the problem.
Z is following the encoder.
So block the direction change by making a stop out of it until its
stopped, then allow the direction change thru and ramp it back up to
speed.� To do that right needs a 4 quadrant control.
Your stepper/servo's may be quite precise, but are they true 4 quadrant
control? IDK, but very few stepper drives we can afford are.
Jon's pwm-servo is, a vfd programmed correctly is. Both can stop the
motor by sucking the spin back out, storing that recovered energy in the
psu's filter caps, then using that over voltage to re-accell the motor
in the other direction and the only problem is the few ms of the
resultant over voltage on the filter caps. The over voltage spike is
there and gone again long before the caps fail short from overheating
due to the leakage at that voltage peak. I think that high voltage pulse
helps to keep an electrolytic formed. Both of my bigger machines are
past due for a 5 year recommended shotgun replacement with no sign of
ageing yet.
You may need to check the addf order in your half file, the basic rule
is that all addf's should be in an order where a single signal coming in
from the machine, should fall thru all processing and go back out to the
machine in the write at the bottom of same invocation of that thread.
Violate that rule and all sorts of problems can crawl out of the woodwork.
We need an analyzer script to check that Andy.� Hint hint ;o)>
� I suspect that the spindle stops and then starts back in the
clockwise direction� too quickly and the Z axis can't do that fast enough.
My spindle is an AC Servo run with step/dir so I could change some
values in the ini file.
[SPINDLE_9]
MAX_VELOCITY = 50.0
#MAX_ACCELERATION = 30.0
MAX_ACCELERATION = 300.0
# The values below should be 25% larger than MAX_VELOCITY and
MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 62.50
STEPGEN_MAXACCEL = 375.00
The acceleration values of the spindle are dramatically faster than
the Z axis.
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.05
MIN_FERROR = 0.01
# 3.2:1 Max Speed
MAX_VELOCITY = 2.50
MAX_ACCELERATION = 10.0
# The values below should be 25% larger than MAX_VELOCITY and
MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 2.75
STEPGEN_MAXACCEL = 20.0
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
.
Cheers, Gene Heskett.
Cheers, Gene Heskett.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users