Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Sweeney 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,
-
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.
-
Maybe write a macro... I don't know...never wrote one before.
-
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.
-
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.
-
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 ... :)
-
That's an option I can investigate.
-
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
-
maybe a simple macro can create the GCode. dont know how "perfect" the liearity has to be
'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()