G2/G3 can't run smooth.
-
@dc42 We tested more today, and narrowed down the problem.
First, we changed the parameter "MinArcSegmentLength" to 0.02 as you recommended. It didn't change anything.I made a basic hand written program to run the machine in a G3 arc. I found that it will run the arc smoothly at certain feedrates, but not at other feedrates.
The program;
G0 X200 Y0 Z150
G3 F5000 X200 Y0 I-50 J0For example, at 2000 mm/min, the machine ran in a smooth circle, as expected.
Running the program many times confirmed that this worked perfectly every time.Here are the results;
2000 - normal
5000 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
6000 - normal
8000 - normal
9000 - normal
1000 - normal
900 - normal
920 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)The only conclusion that I can draw is that the feedrate parameter causes a stall during an arc move at certain feedrates, but not others. The feedrates are repeatable - I.E. it's not random. Running at 5000 will fail every time and running at 6000 will work every time. I should note that the "pause" is an abrupt stop, not a smooth deceleration. It stops then starts again a fraction of a second later.
I suspect there is some parsing error in the motion control that causes a temporary stop if the feedrate has a certain bit in it.... I don't know what though.
More exhaustive testing:
5000 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5001 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5002 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5003 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5004 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5005 - pauses at the Y direction change reversal point (Ymax and Ymin on the circle)
5006 - normal
5007 - normal
5008 - normal
5009 - normal
5010 - normalVIDEO OF THE TEST
https://youtu.be/5JYNb3g_WhA -
@Generic-Default I repeat my previous question: which Duet are you using, which firmware version, and what are your axis steps/mm ?
-
@dc42 Duet 6HC with 3.3 firmware. 400 steps/mm
-
@Generic-Default i would suggest upgrading to 3.4.5 and then reporting back
-
@Jimmykc said in G2/G3 can't run smooth.:
N305 G17 G03 X91.25 Y0. J3.
N310 X78.75 I-6.25
N315 X91.25 I6.25
N320 X90.933 Y1.966 I-6.25
N325 X87.141 Y3.87 I-2.848 J-0.944
N330 G01 X86.192 Y3.555I noticed in the RRF 3.3 release notes the following:
Removed support for implicit G2/G3 commands because they is not part of the NIST GCode standard
Lines 310, 315, 320 and 325 have implicit G3 commands; there is no 'G03' preceding the axis words. It may be that the firmware is ignoring these lines. To fix this, output the Gcode including the G2/G3 commands for each line.
Ian
-
@Generic-Default it's as @droftarts says. I will reinstate the support for repeating a G2 or G3 command implicitly in RRF 3.5beta4.
-
@dc42 We re-added the implicit G2/G3 in our version of 3.3 firmware, because the Fanuc standard post processor that a huge percentage of CNC machines run on does G0, G1, G2, and G3 commands in the code it spits out.
In my test, the presence of a G2 G3 at the beginning did not change the result, only the feedrate parameter changed it.
We're trying to merge our CNC functions into the 3.5 firmware.
-
@Generic-Default our latest 3.5-dev source code supports implicit G2/3 commands provided that the first character on the line is an axis letter, and not I/J/K/R/F etc.
What CNC functions have you added to your branch or RRF?
-
@dc42 This list below isn't everything we added, but most of what I can think of off the top of my head:
- Added GUI for monitoring spindles (RPM, Torque, Encoder Angle, Power, Load Meter) (customizable)
---1) (a) Full system for monitoring feedback from servo drivers and VFDs in real time - Added GUI for changing the parameters of the tools in the ATC magazine and turrets (pictures too)
- Added X/Y/Z/A/B/C/U/V/W/D axis position display on the screen (customizable)
- Added conversational programming menu with common functions - creates job files in a text editor
- Added CNC specific M codes and G codes
---5)(a) Rigid tapping, Drilling cycles, Lathe threading, helical boring, M19 spindle orient, M3 M4 M5, etc. - Added useful on screen M codes with GUI buttons to activate (coolant, air blast, auger motor, etc)
- Added redundant rotary axis gearbox system - lets the machine engage a gearbox and use a separate servo to drive it. We use this to switch from belt drive with big servos to gearbox drive through a harmonic gear for high accuracy and torque.
- Machine RGY status light and E stop system, along with servo status menu
- Auto-stop when a servo overloads or faults.
There are quite a few other things I'm not remembering off the top of my head, but we added a ton of stuff to make the Duet system run a 12 servo, 8 axis mill turn machine. This is the same one from the other thread. Integrating all this stuff into the newer 3.5 firmware and future versions would benefit everyone, even if few CNC machines require all the functions we built.
- Added GUI for monitoring spindles (RPM, Torque, Encoder Angle, Power, Load Meter) (customizable)
-
@Generic-Default thanks for the list. Please can you expand on item 5: which G/M codes have you added? M3/4/5 are already supported by RRF. Auto-stop when a servo faults can be configured in the event system, if you are using MB6XD or EXP1XD boards to drive the servos.