Hello Guest it is March 28, 2024, 04:57:14 AM

Author Topic: Feed rate accelerating/decelerating question.  (Read 1288 times)

0 Members and 1 Guest are viewing this topic.

Feed rate accelerating/decelerating question.
« on: February 05, 2020, 10:27:37 AM »
Is there a way in Mach3 to accelerate/decelerate the feed on a single axis from point A to point B? 
Example; x10 to x 100 with a starting feed of,say, 30ipm and a final feed of 5ipm.

Thanks,
Re: Feed rate accelerating/decelerating question.
« Reply #1 on: February 06, 2020, 08:58:03 PM »
I would just hand write Gcode for this. Not sure Mach has a setting that would do exactly what you want.

I would do linear moves, puncuated with different feedrates. Should approximate what you want. Their m ay be an elegant way to do this in G code, but I dont know. Writing the code should get you closer.
Re: Feed rate accelerating/decelerating question.
« Reply #2 on: February 07, 2020, 08:40:32 AM »
Maybe write a macro... I don't know...never wrote one before.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Feed rate accelerating/decelerating question.
« Reply #3 on: February 08, 2020, 01:28:05 AM »
Unfortunately using the F### command to alter the feed-rate breaks the constant velocity chain so the motion will be jerky if you string a number of linear moves with different feed-rates together.

What exactly do you want to achieve with a varying feed-rate ?

Tweakie.
PEACE
Re: Feed rate accelerating/decelerating question.
« Reply #4 on: February 08, 2020, 08:41:25 AM »
It's a rather unique application.  I built a custom rig that is used to simulate tectonic movement and fault propagation using kaolin clay as  an analog to crustal plates.
There is a curiosity of how the clay will react in a scenario where the fault displacement is accelerating/decelerating.  Stopping the movement once initiated can alter the properties of the clay.   A step transition between feed rates may not be a problem because the resting time will be so short it may not affect the clay at all but a smooth transition would be best.

Youtube channel of many of these experiments if you're curious; https://www.youtube.com/channel/UCsIXxKMAWTxZQJiiqZSHnFA/feed

The steppers drive a 100:1 reduction gear box which then drive an X,Y table that the rig is built on.  You'll see in the videos most of the experiments run for hours to displace 50mm... not very exciting to watch in real time.

   
Re: Feed rate accelerating/decelerating question.
« Reply #5 on: February 08, 2020, 01:32:40 PM »
Couldn't you just tune the axis in motor tuning to the acceleration rate that would mathematically do what you want ?
There would only be one stopping point where the accel would switch to decel.
Guessing ...  :)
Re: Feed rate accelerating/decelerating question.
« Reply #6 on: February 08, 2020, 04:33:50 PM »
That's an option I can investigate.
Re: Feed rate accelerating/decelerating question.
« Reply #7 on: February 08, 2020, 07:03:06 PM »
Hi,
I don't think Mach3 is going to offer you a solution.

Machs trajectory planner outputs PVT ( Position, Velocity over Time) data in 1 ms time slices. To calculate the trajectory it
assumes machine has a fixed maximum acceleration, and after the acceleration period a fixed speed, be it a feed rate or a max rapid
traverse rate followed by a deceleration to its final end point. This is called a second order planner, that is to say the second differential
(calculus) is constant.

There are third order trajectory planners, that is third order differential is constant sometimes called 'constant jerk planners'.
Even such planners do not allow for varying maximum accelerations.

The motion you are contemplating is an example of kinematic motion where the trajectory is the solution of a differential equation
involving position, velocity an acceleration.

To my knowledge no CNC solution is arranged that way.

You might like to investigate various hexapod machines (also called hexapod robots) as they have a kinematic motion planner,
maybe you could adapt the idea to your machine.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Feed rate accelerating/decelerating question.
« Reply #8 on: February 09, 2020, 05:58:18 AM »
maybe a simple macro can create the GCode. dont know how "perfect" the liearity has to be

Code: [Select]
'set the varaibles
StartX = 100.0
EndX = 10.0
StartSpeed = 5
EndSpeed = 10
StepOver = 0.1

'do some calc's

Steps =  ABS(Startx-EndX)/StepOver
StepPer = (EndX-StartX)/Steps
SpeedChangePer = (EndSpeed - StartSpeed) /Steps


DoOEMButton (169)                    'close all open files
OpenTeachFile "Test.tap"

Code "G64" 'use CV mode
Code "G0 X"&StartX

AktX = StartX
AktF = StartSpeed

For i = 1 to Steps
AktX = AktX + StepPer
Code "G1 X" &AktX &" F" &AktF
AktF = AktF + SpeedChangePer
next i

Code "M30"

CloseTeachFile
Call LoadTeachFile()

« Last Edit: February 09, 2020, 06:00:01 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.