Hello Guest it is April 13, 2021, 01:25:45 PM

Author Topic: Motor Tuning in Mach 4, Very Stuck  (Read 1785 times)

0 Members and 1 Guest are viewing this topic.

Re: Motor Tuning in Mach 4, Very Stuck
« Reply #20 on: January 26, 2019, 10:16:22 PM »
Hi,

Quote
also just a quick question when i press "ref all" all 3 axis barley move to the home switches any idea what i might have done

That has to do with homing also call referencing and it is adjustable. Don't bother with it until you have the motors
dialed in. If you cannot move a precise distance then you are going nowhere.

Try this MDI:
Code: [Select]
g0 x100
x0
x100
x0
x100
x0
x100
x0
x100
x0

Does it move backwards and forwards, 100 mm per move? Does it move flat stick?
If so now try the Y axis:

Code: [Select]
g0 y100
y0
y100
y0
y100
y0
y100
y0
y100
y0
y100
y0

If the Y axis is moving backwards and forwards OK then try some linear interpolated moves:

Code: [Select]
g0 x100y100
x0y0
x100y100
x0y0
x100y100
x0y0
x100y100
x0y0

If all these work OK then you can start thinking about tuning your motors. By tuning I do not mean fiddling with the
Steps per Unit. Those settings are now made and unless you change motor settings or ballscrews you shouldn't ever have
to touch them again.

I would concentrate on acceleration first. Acceleration (linear) is equivalent to torque (rotation) so to explore the
torque capacity of your motors at various speeds is where you want to go. You might achieve a high speed say, but have
to dial back on the acceleration in order to avoid losing steps. I think that is a mistake, increase acceleration as much
as you can and THEN increase max velocity until the onset of losing steps.

Try quadrupling your acceleration to 1000 mm/sec2. Run the same test as above. How did it go?
If it went well double the acceleration again, now up to 2000mm/sec2. It is now very likely your machine
is flopping around like a fish. Industrial production machines have accelerations of 1g-5g that is 10,000mm/sec2
up to 50,000mm/sec2. Hobby machines cant usually get within a bulls roar of that and they try to throw themselves
around the room if you try.

What you are trying to achieve is the highest acceleration your motors can deliver consistent with the machine not flexing
alarmingly AND your heart rate  stay below 200BPM! You might chose to back off from max by 10-20% and allow some headroom.

Now you want to start increasing the maximum velocity until it starts losing steps. Given that your steppers are closed loop
the drive will try (try being the operative word) to catch up on lost steps. Usually what happens if it starts losing steps the drive
faults 'following error'. You know then that you hit the limit. Back off 25% and run your tests again. What you are trying to
achieve is the maximum RELIABLE speed with the steppers having still plenty of torque to accommodate both  good acceleration
and cutting forces.

A thorough investigation of your motors and machine capabilities will probably take a couple of days. Try to be methodical about it.
Often, once you tune your machine, those settings will stay the same over the life of the machine. It really does pay to explore
the limits. So many machines around the globe are actually way more capable than the owner realizes and he will merrily be
using but a fraction of the machines capability because of his inexperience/impatience/disorganization at the time he set those
limits.

Craig
My wife left with my best friend...
     and I miss him!
Re: Motor Tuning in Mach 4, Very Stuck
« Reply #21 on: January 27, 2019, 12:29:56 AM »
HI Craig ive spent the past few hours running various lines of g code and by my measurements x and y are accurate every time, i cant thank you enough for the help i certainly would not have been able to work through it with out you.

On the other note of tuning i have my motors running both x and y lines of code at

7000 velocity
3500 acceleration

it moves well and ive realized the rubber feet im using to the cabinet  have a bit of flex in the so they will go but should i keep pushing? the machine flies around hahaha

also i have changed my homing to 40% but there is next to no movement still, any ideas?
« Last Edit: January 27, 2019, 12:33:29 AM by homebuilt »
Re: Motor Tuning in Mach 4, Very Stuck
« Reply #22 on: January 27, 2019, 01:02:55 AM »
Hi,
acceleration of 3500 is pretty impressive. When machining parts the accuracy of the corners is very much determined
by the acceleration the machine can attain. For this reason I recommend the max acceleration your motors and machine can handle.

I would push it to 5000, then 7500....until you find the limit. It may well be that your machine starts careening around the workshop
and that will constitute the effective max acceleration.

If it transpires, and from your description it sounds probable that the mechanics of the machine will limit the acceleration
but that will allow you to bump up the max velocity.

The very real fact is that steppers lose torque at high speeds, closed loop steppers are no exception. It is normal for instance that
the low speed torque, or holding torque, is reduced to half at 500 rpm and reduced to  a quarter at 1000 rpm. There again
being closed loop does not change those characteristics. My suggestion was to use 500 rpm as a starting point for your
max velocity. Now that you have really upped the acceleration and are probably approaching the effective max acceleration
now you can start turning up the speed.

I would try 10000 mm/min, that is equivalent to the steppers doing 2000 rpm. Particularly if you have to limit the acceleration
to prevent the machine from rocking around you may find 10000mm/min doable. That would be a very impressive result  for
steppers.

Craig
My wife left with my best friend...
     and I miss him!
Re: Motor Tuning in Mach 4, Very Stuck
« Reply #23 on: January 27, 2019, 01:17:53 AM »
Hi,
where about are you setting your Homing parameters? From your description:

Quote
also i have changed my homing to 40% but there is next to no movement still, any ideas?

You are using Configure/Control (Mach)/Homing-SoftLimits tab. That is not correct, at least for the approach and backoff
speeds. They are set in the ESS plugin. It is a bit confusing but some of the Mach settings are ignored in preference to
the ESS plugin. Speeds and index homing certainly. Softlimits, Home in Place and Home Order are all still set in the Mach
plugin, not the ESS plugin. You will have to experiment some to determine which settings are applied.

Note that the ESS has two speeds, the approach speed, which exactly as described is the speed at which it approaches the
home switch. It can afford to be reasonably fast, provided it doesn't hammer the switch with overrun. The back off speed
can be much slower and therefore more accurate. When the axis backs off the switch, that is the moment that the machine
coordinates are reset. Accordingly the accuracy is determined principally by the back off speed.

Craig
My wife left with my best friend...
     and I miss him!
Re: Motor Tuning in Mach 4, Very Stuck
« Reply #24 on: January 28, 2019, 02:39:43 AM »
Hi Craig so I've been busy yesterday checking and double checking measurements. And I can confidently say your settings were spot on I managed to get the thing up to 14000 before my heart rate went up and stripped a coupling hahaha so I've taken 20% off and I'm happy there. Boy she moves in still waiting on my new VFD so I can fiddle with it actually cutting but a huge step forward. Mate thanks again

While I have you I've been having a play with fusion 360 and made a simple 200mmX200mm X 10mm box I wanted to cut out around the outside. I've generated the g code and loaded the file into mach pushed everything into the middle and zeroed the DROs and hit the big go button but it just sorts of stutters for a split second the doesn't move. Bit of a long shot but am I missing anything else in this process?