Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: KatzYaakov on November 04, 2019, 01:17:00 AM

Title: S curve
Post by: KatzYaakov on November 04, 2019, 01:17:00 AM
we use the mach system in chines cnc
its work very good  ,and we improve ... so now i can say we almost can reach the Europa big brand(in wood cnc field)
but in one parameter i sill far back  ,it the acceleration deceleration while G1(working in the material)
if i try change to be close to that machines  ,i start get very bad working at the start ,end of working
so we add M function that change accl dccl in gcode ,so when move on G0 for example for drilling  ,we increase
but in G1 we need go very very low accll (les then 10000 mm/sec2)
as i try learn about that problem  ,i see that solution may be with the s curve
is some one meet that problem before? have an ide how mange it with mach4?
* i thought about simple solution that i can divice the movment in my pp and change acc dccl in the g code  ,but in this case  i can make it in some steps not smooth like s curve

Title: Re: S curve
Post by: KatzYaakov on November 04, 2019, 01:19:03 AM

link that explain about the S curve
Title: Re: S curve
Post by: KatzYaakov on November 18, 2019, 08:40:36 PM
its strange no any one here refer this question,most here are retrofit old Europe or USA  cnc that in there original controller for sure
have that option ,and no one mat that problem? even if cant solve but...
Title: Re: S curve
Post by: joeaverage on November 19, 2019, 01:48:20 AM

its strange no any one here refer this question

That's not quite correct, at the time that Mach4 was being planned and talked about the possibility of including
a third order planner was discussed and experimented with. Historic now ....but: (

Enjoy...all 142 posts of it!!

Title: Re: S curve
Post by: KatzYaakov on November 19, 2019, 02:07:00 AM
i not talk about cv
i talk about acceleration deceleration
its have maybi at the end some share points ,but its something else
please take alook at the  link i put its explain about this s curve
Title: Re: S curve
Post by: joeaverage on November 19, 2019, 02:21:26 AM
I'm well aware of what an S curve controller looks like. Its called third order because of the cubic term in the motion equation,
per the sample extracted from your link (attached).

If you read Arts explanation the Tempest Planner is a third order planner with 'extra bits'.

I believe the upshot was that the developers of Mach4, Art at that time had already sold to NFS, saw Arts work as interesting
but were more focused on producing a working CNC solution and the complication presented by a third order planner would
only delay that. The third order planner was never adopted by NFS.

Smurph has from time to time mentioned that he would like to revisit that decision. Now that mach4 is very definitely a working
CNC solution the intellectual investment in upgrading to a third order planner might be very welcome indeed.

Title: Re: S curve
Post by: KatzYaakov on November 19, 2019, 02:33:02 AM
Thanks alot for that answer ,i can wait
Title: Re: S curve
Post by: mcardoso on November 19, 2019, 09:18:15 AM
As an engineer who focuses on motion control and robotics in my day job, reading through Art's write-up on Tempest really made me smile. He has a wonderful knack for being able to get his stream of consciousness thrown onto a page and make it enjoyable to read. Motion control is wonderfully complex.

I could definitely see benefits for many in including a higher order motion planner within Mach, in particular the ability to specify a maximum path deviation during movement blending, rather than just CV.

Thanks for sharing that link Craig, it was enjoyable to go through.
Title: Re: S curve
Post by: KatzYaakov on November 19, 2019, 11:23:07 PM
do you think if i as temporary solution,ill dived the end,stop path in mine post processor
(the software that create the tool path its mine ,so can do inside as i need)to several small segmets
and change the speed for each segment ,do you think can help?
second option divied to not many segment ,but change the accl dcll in this segment(in mach we use m function to change acc dccl)
Title: Re: S curve
Post by: mcardoso on November 20, 2019, 12:33:56 AM

I will admit that I am not 100% sure what your are attempting to accomplish, however I will try to provide information the best that I can.

First off, I think you really need to evaluate if S curve motion planning is something that you absolutely need, if it is just a nice feature, or just something you’re interested in but don’t need. Mach 3/4 is currently not offering S curve motion planning and I wouldn’t bank on it being changed anytime soon (although I don’t work for NFS, so I don’t know what they are actively working on :) ). If you absolutely need higher order motion planning, there are many products on the market that can offer this, although I do not know of any at the price point of Mach 4. If it isn’t absolutely necessary for you then I wouldn’t try to go down the rabbit hole. Maybe there are other, possibly more elegant and cost effective, solutions for your needs.

With all that being said, there is no reason that you can’t manage your Gcode to adjust feedrates to simulate the motion generated by higher order motion planners. Many fancy CAM suites offer features like feedrate reduction into corners and high non-rapid feedrates when the software knows you are cutting air. You might be able to set up your CAM to segment all your Gcode with variable feedrates. But again, why? That seems like a lot of work and your issues might be more easily solved in other ways.

My opinion is to leave the purchased software packages to work as they are intended to.

Can you elaborate on what is driving your interest in S curve motion?
Title: Re: S curve
Post by: KatzYaakov on November 22, 2019, 04:16:26 AM
thanks a lot for yours details answer
i build my machines  in china  ,actually i use my large experience with the Europa famous brand and try improve the chines machine ,one of the thing is that use mach4 instead of there controller
most of points we real can reach our target to build good machines
but with the accl dcll in working (G1,G2,g3) i cant reach the europe brand numbers
i use good and high power servo motors (850w) with good reducer from japan
i can tell you about numbers
we run max speed 72000 mm/min    (G0)
working speed around 15000 mm/min (G1,G2,G3)
the problem is the accl  dccl
when i just move  on G0  i can use same as europe brands  3000 mm/sec^2
BUT in G1 i cant more then 200 (if i try more i get vibration on start ,end point) while europe machines use 2000
i add now in Gcode  2 m code  ,one set to 3000
second set to 200
and in my pp each time when movement its G0 we put the correct   also when G1
but as i told you the number 200 its much less then i see in Europe brands
the only thing i can think about its ,its the s curve (all Europe brand have that option)
i want to make some test by hand change the gcode file ,if its work then ill do it in my pp
what do you think is the best:
change the acc /dccl nears corner  ,or change the speed?
do you think change 3 times the speed or accl dccl is enough for test?

Title: Re: S curve
Post by: mcardoso on November 22, 2019, 12:43:21 PM
Given that information, I think you really do have a strong case for needing S curve path planning.  When we design industrial servo motion systems at work, S curve is employed when motion smoothness and vibration suppression are of concern. Given the exact same move, the S curve will be slower than a trapezoidal, so by itself it does not give you faster motion. However you stated you are limiting the speed to keep vibration in check, which is exactly when S curve profiles would help.

Separately, you may be experiencing higher vibration due to mechanical differences between your equipment and your European competitors. S curve path planning certainly could help, but it is not a replacement for stiffer mechanics.

Unfortunately, I don't feel like I have the expertise to provide advice on modifying you Gcode/Post Processor.