G2 slow feed down

If you have a question about the software please ask it here.

Re: G2 slow feed down

Postby Derek » Tue Aug 07, 2018 2:40 pm

Just because this is important to me and I won't let this go I did some testing this morning. I shot a video.


Here is the setup.
Three passes on a circle. First pass G3. Second pass same circle converted to lines in CAD with no more than .001” deviation from the arc. Third pass the same segmented line with a portion of that line replaced with a portion of the original arc.

I then run it again with the camera pointed at the screen. Watch the actual feed rates. Now both axises are moving so the acceleration differences should be tiny and my tolerances are all well above the .001" deviation.

https://www.youtube.com/watch?v=Ym4Zu1e ... e=youtu.be

Here is the code.
Code: Select all
N1 G20
N2 G0 G17 G40 G80 G90
N3 G64(CONSTANT CONTOUR OFF OR TURN ON W/G64)
N4 G54
N5 (2 1/2 Axis Profiling)

N9 G00 Z0.0937
N10 X1.9062 Y0.0000
N11 G01 Z0.0000 F30.00000
N12 G17
N13 G03 X-1.9063 I-1.9062 J0.0000 F80.00000
N14 G03 X1.9062 I1.9063 J0.0000
N15 G00 Z0.0937
N16 (2 1/2 Axis Profiling-1)
N17 (24446.199000)
N18 G01 Z0.0000 F30.00000
N19 G01 X1.9024 Y0.1197 F80.00000
N20 G01 X1.8912 Y0.2389
N21 G01 X1.8724 Y0.3572
N22 G01 X1.8463 Y0.4741
N23 G01 X1.8129 Y0.5890
N24 G01 X1.7723 Y0.7017
N25 G01 X1.7248 Y0.8116
N26 G01 X1.6704 Y0.9183
N27 G01 X1.6095 Y1.0214
N28 G01 X1.5422 Y1.1204
N29 G01 X1.4688 Y1.2151
N30 G01 X1.3896 Y1.3049
N31 G01 X1.3049 Y1.3896
N32 G01 X1.2151 Y1.4688
N33 G01 X1.1204 Y1.5422
N34 G01 X1.0214 Y1.6095
N35 G01 X0.9183 Y1.6704
N36 G01 X0.8116 Y1.7248
N37 G01 X0.7017 Y1.7723
N38 G01 X0.5890 Y1.8129
N39 G01 X0.4741 Y1.8463
N40 G01 X0.3572 Y1.8724
N41 G01 X0.2389 Y1.8912
N42 G01 X0.1197 Y1.9024
N43 G01 X0.0000 Y1.9062
N44 G01 X-0.1197 Y1.9024
N45 G01 X-0.2389 Y1.8912
N46 G01 X-0.3572 Y1.8724
N47 G01 X-0.4741 Y1.8463
N48 G01 X-0.5890 Y1.8129
N49 G01 X-0.7017 Y1.7723
N50 G01 X-0.8116 Y1.7248
N51 G01 X-0.9183 Y1.6704
N52 G01 X-1.0214 Y1.6095
N53 G01 X-1.1204 Y1.5422
N54 G01 X-1.2151 Y1.4688
N55 G01 X-1.3049 Y1.3896
N56 G01 X-1.3896 Y1.3049
N57 G01 X-1.4688 Y1.2151
N58 G01 X-1.5422 Y1.1204
N59 G01 X-1.6095 Y1.0214
N60 G01 X-1.6704 Y0.9183
N61 G01 X-1.7248 Y0.8116
N62 G01 X-1.7723 Y0.7017
N63 G01 X-1.8129 Y0.5890
N64 G01 X-1.8463 Y0.4741
N65 G01 X-1.8724 Y0.3572
N66 G01 X-1.8912 Y0.2389
N67 G01 X-1.9024 Y0.1197
N68 G01 X-1.9062 Y0.0000
N69 G01 X-1.9024 Y-0.1197
N70 G01 X-1.8912 Y-0.2389
N71 G01 X-1.8724 Y-0.3572
N72 G01 X-1.8463 Y-0.4741
N73 G01 X-1.8129 Y-0.5890
N74 G01 X-1.7723 Y-0.7017
N75 G01 X-1.7248 Y-0.8116
N76 G01 X-1.6704 Y-0.9183
N77 G01 X-1.6095 Y-1.0214
N78 G01 X-1.5422 Y-1.1204
N79 G01 X-1.4688 Y-1.2151
N80 G01 X-1.3896 Y-1.3049
N81 G01 X-1.3049 Y-1.3896
N82 G01 X-1.2151 Y-1.4688
N83 G01 X-1.1204 Y-1.5422
N84 G01 X-1.0214 Y-1.6095
N85 G01 X-0.9183 Y-1.6704
N86 G01 X-0.8116 Y-1.7248
N87 G01 X-0.7017 Y-1.7723
N88 G01 X-0.5890 Y-1.8129
N89 G01 X-0.4741 Y-1.8463
N90 G01 X-0.3572 Y-1.8724
N91 G01 X-0.2389 Y-1.8912
N92 G01 X-0.1197 Y-1.9024
N93 G01 X0.0000 Y-1.9062
N94 G01 X0.1197 Y-1.9024
N95 G01 X0.2389 Y-1.8912
N96 G01 X0.3572 Y-1.8724
N97 G01 X0.4741 Y-1.8463
N98 G01 X0.5890 Y-1.8129
N99 G01 X0.7017 Y-1.7723
N100 G01 X0.8116 Y-1.7248
N101 G01 X0.9183 Y-1.6704
N102 G01 X1.0214 Y-1.6095
N103 G01 X1.1204 Y-1.5422
N104 G01 X1.2151 Y-1.4688
N105 G01 X1.3049 Y-1.3896
N106 G01 X1.3896 Y-1.3049
N107 G01 X1.4688 Y-1.2151
N108 G01 X1.5422 Y-1.1204
N109 G01 X1.6095 Y-1.0214
N110 G01 X1.6704 Y-0.9183
N111 G01 X1.7248 Y-0.8116
N112 G01 X1.7723 Y-0.7017
N113 G01 X1.8129 Y-0.5890
N114 G01 X1.8463 Y-0.4741
N115 G01 X1.8724 Y-0.3572
N116 G01 X1.8912 Y-0.2389
N117 G01 X1.9024 Y-0.1197
N118 G01 X1.9062 Y0.0000
N119 G00 Z0.0937
N120 (2 1/2 Axis Profiling-1-1)
N121 (24446.199000)
N122 G00
N123 X1.9043 Y-0.0598
N124 G01 Z0.0000 F30.00000
N125 G01 X1.9062 Y0.0000 F80.00000
N126 G01 X1.9024 Y0.1197
N127 G01 X1.8912 Y0.2389
N128 G01 X1.8724 Y0.3572
N129 G01 X1.8463 Y0.4741
N130 G01 X1.8129 Y0.5890
N131 G01 X1.7723 Y0.7017
N132 G01 X1.7248 Y0.8116
N133 G01 X1.6704 Y0.9183
N134 G01 X1.6095 Y1.0214
N135 G01 X1.5422 Y1.1204
N136 G01 X1.4688 Y1.2151
N137 G01 X1.3896 Y1.3049
N138 G01 X1.3049 Y1.3896
N139 G01 X1.2151 Y1.4688
N140 G01 X1.1204 Y1.5422
N141 G01 X1.0214 Y1.6095
N142 G01 X0.9183 Y1.6704
N143 G01 X0.8116 Y1.7248
N144 G01 X0.7017 Y1.7723
N145 G01 X0.5890 Y1.8129
N146 G01 X0.4741 Y1.8463
N147 G01 X0.3572 Y1.8724
N148 G01 X0.2389 Y1.8912
N149 G01 X0.1197 Y1.9024
N150 G01 X0.0000 Y1.9062
N151 G01 X-0.1197 Y1.9024
N152 G01 X-0.2389 Y1.8912
N153 G01 X-0.3572 Y1.8724
N154 G01 X-0.4741 Y1.8463
N155 G01 X-0.5904 Y1.8125
N156 G03 X-1.8134 Y-0.5877 I0.5904 J-1.8125
N157 G01 X-1.7723 Y-0.7017
N158 G01 X-1.7248 Y-0.8116
N159 G01 X-1.6704 Y-0.9183
N160 G01 X-1.6095 Y-1.0214
N161 G01 X-1.5422 Y-1.1204
N162 G01 X-1.4688 Y-1.2151
N163 G01 X-1.3896 Y-1.3049
N164 G01 X-1.3049 Y-1.3896
N165 G01 X-1.2151 Y-1.4688
N166 G01 X-1.1204 Y-1.5422
N167 G01 X-1.0214 Y-1.6095
N168 G01 X-0.9183 Y-1.6704
N169 G01 X-0.8116 Y-1.7248
N170 G01 X-0.7017 Y-1.7723
N171 G01 X-0.5890 Y-1.8129
N172 G01 X-0.4741 Y-1.8463
N173 G01 X-0.3572 Y-1.8724
N174 G01 X-0.2389 Y-1.8912
N175 G01 X-0.1197 Y-1.9024
N176 G01 X0.0000 Y-1.9062
N177 G01 X0.1197 Y-1.9024
N178 G01 X0.2389 Y-1.8912
N179 G01 X0.3572 Y-1.8724
N180 G01 X0.4741 Y-1.8463
N181 G01 X0.5890 Y-1.8129
N182 G01 X0.7017 Y-1.7723
N183 G01 X0.8116 Y-1.7248
N184 G01 X0.9183 Y-1.6704
N185 G01 X1.0214 Y-1.6095
N186 G01 X1.1204 Y-1.5422
N187 G01 X1.2151 Y-1.4688
N188 G01 X1.3049 Y-1.3896
N189 G01 X1.3896 Y-1.3049
N190 G01 X1.4688 Y-1.2151
N191 G01 X1.5422 Y-1.1204
N192 G01 X1.6095 Y-1.0214
N193 G01 X1.6704 Y-0.9183
N194 G01 X1.7248 Y-0.8116
N195 G01 X1.7723 Y-0.7017
N196 G01 X1.8129 Y-0.5890
N197 G01 X1.8463 Y-0.4741
N198 G01 X1.8724 Y-0.3572
N199 G01 X1.8912 Y-0.2389
N200 G01 X1.9024 Y-0.1197
N201 G01 X1.9043 Y-0.0598
N202 G00 Z0.0937
N203 M05
N204 M30


So the basic gist of this is this is the best we can see and with my current setup UCCNC needs to knock 26 IPMs from a 80 IPM feed in order to follow a segmented line that is within .001" of an arc that UCCNC can maintain 80 IPMs. It seems to me this is entirely a look ahead issue and has nothing to do with tolerance.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: G2 slow feed down

Postby cncdrive » Tue Aug 07, 2018 2:50 pm

Derek, If it was a look-ahead issue then there would be a full decceleration.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: G2 slow feed down

Postby Robertspark » Tue Aug 07, 2018 6:33 pm

Derek wrote:
So the basic gist of this is this is the best we can see and with my current setup UCCNC needs to knock 26 IPMs from a 80 IPM feed in order to follow a segmented line that is within .001" of an arc that UCCNC can maintain 80 IPMs. It seems to me this is entirely a look ahead issue and has nothing to do with tolerance.


What acceleration were you running?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G2 slow feed down

Postby Robertspark » Tue Aug 07, 2018 7:42 pm

When its segmented it has to slow down because you've got that many small and short line segments it will treat each line as individual start and end points that need to be blended to your allowable error factors (linear AND corner) {corner error max is a radius}

they are not the same as an arc where the trajectory planner can look at the arc as one entity, the lines are many entities each one has to be blended.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: G2 slow feed down

Postby Derek » Tue Aug 07, 2018 7:57 pm

What acceleration were you running?


Units are inches.
12 which is relatively low but 15 starts to fault the drives.

What confuses me is it has the ability to do a G3/G2 move at 80 IPMs yet it can't look ahead and blend the line segments into smooth motion. I even did a test and broke the circle down to a ton of line segments and it was better at holding speed but it was still down to 60 IPMs. I remember Balazs saying in a post before that even arcs are broken down to small segments internally in UCCNC. At least that is the way I interpreted it.

I don't expect much to happen on this as it has been an issue for a long time so it's obviously not an easy fix or enough of a problem for the masses to be addressed. The problem is it seems UCCNC relies on a lot of acceleration for smooth motion with constant velocity, and the ability to run high acceleration on a lot of home built machines is usually in short supply.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: G2 slow feed down

Postby cncdrive » Tue Aug 07, 2018 8:31 pm

Not the UCCNC relies on acceleration, but a motion has to start with an acceleration to reach a target speed, otherwise if it jumps to a target speed without acceleration will stall the stepper motor or make a servo a following error which means unprecision.
The higher the acceleration the shorter time the axis accelerates up to the same speed.
When an axis is already running on high speed and then another axis starts from zero speed then that axis has to accelerate up to keep up with the other axis in the syncronised path, otherwise the motion will go off path.
And so there is no other way than to deccelerate that already running axis if the other axis can't accelerate up in time. It is simple physics.

The only ways to resolve this is:
- to not follow the settings, e.g. to use higher acceleration than what you setup, but then there is a risk that your motor will loose steps just like in mach3.
- to use a not 0 startup speed which could work under the start/stop frequency for servo motors, but it causes high jerk which can oscillate the machine if it is not rigid enough.
- to go off path, but that only resolve it if you allow high enough tolerance when the path can go so much off that the other axis has time to accelerate up on that modified off path.

Non of these are good solutions in my opinion.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: G2 slow feed down

Postby ger21 » Wed Aug 08, 2018 1:37 am

- to go off path, but that only resolve it if you allow high enough tolerance when the path can go so much off that the other axis has time to accelerate up on that modified off path.


I think that this is what we are all asking for. In many cases, it may be desirable to deviate from the path, as long as it's within the specified error tolerance.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: G2 slow feed down

Postby cncdrive » Wed Aug 08, 2018 7:17 am

Gerry, the problem with that type of code is that to run off of a path when a line connects to an arc and when the one axis is already running and the other has to startup from zero or low speed is that:

It is not guaranteed that there is enough acceleration path to reach the target speed till both axis has to move. And even if there is enough path the arc will be smaller or larger (depending on the particular code) which is usally a larger issue and so the user will lower the tolerance converting the issue back.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: G2 slow feed down

Postby ger21 » Wed Aug 08, 2018 10:58 am

It is not guaranteed that there is enough acceleration path to reach the target speed till both axis has to move.


You won't be able to maintain constant speed in all situations. And you may have to look ahead several moves and blend multiple moves together.

And even if there is enough path the arc will be smaller or larger (depending on the particular code) which is usually a larger issue and so the user will lower the tolerance converting the issue back.


Why not let the user make that decision?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: G2 slow feed down

Postby cncdrive » Wed Aug 08, 2018 12:17 pm

You won't be able to maintain constant speed in all situations. And you may have to look ahead several moves and blend multiple moves together.


Ofcourse you can't. This is one situation when you can't.

Why not let the user make that decision?


Because users would not understand what it is and so they would just complain about it and we would end up with similar forum threads as this is.
Avarage users don't even understand how the motion planner works eventhough it is described very detailed in the users manual.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 60 guests