Unable to get slow G1 + English/metric questions



  • I have a Sherline CNC that I’m using with a Duet, and I’m trying to test out motor speeds. My issue is that the F parameter on G1 commands seems to be ignored, and the speeds at which this machine is to move need to be small (<20 ipm) or else the steppers whine in place. With a CRAMPS/BBB controller and 24v, I was able to reach ~15 ipm, so I highly doubt the hardware has any relation here.

    Simply put - when I run a command like G1 X0.1 F1, I expect the command to accelerate to a really slow speed. It seems like there’s some kind of ignored lower limit speed which is too high for my mill, and as a result the axis moves too quickly, slips, and makes unpleasant noises. Reading the docs, I’m not seeing anything suggesting a lower limit:
    https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move

    One possibly relevant thing is that I’m pretending that the settings designed for MM are really for inch, since the machine has english leadscrews (20 turns/inch). I know that I have the right steps num for 16x MS with 200steps/rev steppers and 20 turns/inch leadscrews, because a short 0.05 move does exactly one turn of the screws.

    If I were to provide files in mm, I would have to adjust the steps/rev to a non-integer value: steps/mm for 64000/25.4=2519.68. This seems wrong, as it may lead to positioning error, and it doesn’t match how I think about the machine or the printed marks. The error would be small enough for this to be a reasonable workaround if required though ( ~0.32 steps error / inch * 9 inch X axis travel —> ~3 micro steps —> .00005in).

    So, my questions:

    1. Is there a bug or missing doc in how I’m trying to use a G1 with small F value?
    2. Are there other considerations for English machines?

    Thanks! I’m going to hold off on touching the machine for a bit because of the noises.

    Environment: using Duet firmware 2.01-v6. Saw the same problem with 1.21 previously.

    Here’s the relevant part of config.g; I’ve only touched the X values, as this the only axis I have connected.

    M350 X16 Y16 Z16 I1 ; Configure microstepping with interpolation
    M92 X64000 Y80 Z4000 ; Set steps per mm
    M566 X900 Y900 Z12 ; Set maximum instantaneous speed changes (mm/min)
    M203 X1 Y6000 Z180 ; Set maximum speeds (mm/min)
    M201 X1 Y20 Z250 ; Set accelerations (mm/s^2)
    M906 X2000 Y800 Z800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout


  • administrators

    @brandonh said in Unable to get slow G1 + English/metric questions:

    M566 X900 Y900 Z12 ; Set maximum instantaneous speed changes (mm/min)

    try using a much lower value for instantaneous speed changes.
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M566_Set_allowable_instantaneous_speed_change


  • administrators

    The firmware enforces a minimum movement speed of 0.5mm/sec. I'll reduce this in the next 2.01 beta release when the machine mode is CNC or laser. What would you consider an appropriate minimum? A minimum speed is needed to avoid overflow in the calculations.



  • @dc42

    Thanks. On the Z axis I'd always go slower for Z plunges, possibly less than 6 ipm --> 0.1 ips. It's been awhile since I've used this machine, so I'm not sure if it would even be lower than that; I could see going slower for tiny milling bits.

    Any thoughts on the metric vs english conversion question? Can I use floating-point numbers for the steps/mm to avoid any accuracy issues?

    @T3P3Tony Why would a max-instant-speed setting be relevant here? Shouldn't matter for reaching a max velocity.

    Thanks!


  • administrators

    The steps/mm does not need to be an integer. The step count calculation is done using floating point maths.

    RRF can work in inches if you send the G20 command. However, G20 only affects the units in a few commands, in particular G0 to G3, G10 and G92. So you should use metric values in config.g and then change to inches at the end of it if you want.

    The minimum speed is 0.5mm/sec and is applied after converting inches to mm if necessary, so about 0.02 inches/sec.

    HTH David



  • @dc42

    Thanks! I set steps in metric and used G20 and I can change the feedrate exactly as expected now. The min speed as-is is good enough for me; I think the more important things are to:

    • document the G0/G1 speed minimum
    • doc that M92 can have float values
    • point out what codes G20 affects.

    Having made the change (and having used a Duet for a 3d printer for a year), you notice just how metric-heavy and printer-centric the DWC interface is, with no way to focus on inch CNC. There's a ton of interface that could go away with a "CNC" mode, like babystepping, heater temps and temp chart, extruder control, bed compensation, filaments, tools, ... plus all motions are only in mm.

    I know metric is the world standard and my printers use it, no problem, but it's hard to switch when your handwheels, tools, and axis rulers are all in inches!


  • administrators

    @brandonh glad you have it sorted. I have updated the documentation for G0/G1, for G92 and expanded on the warmning in G20. I have also put a note on the CNC page:
    https://duet3d.dozuki.com/Wiki/Configuring_RepRapFirmware_for_a_CNC_machine

    Possibly a configurable minimum speed would make sense?



  • @t3p3tony

    Doc changes look good! Thanks.

    I honestly don't know if a configurable minimum would provide much value. The main use case I can think of for a really slow move is Z plunges with tiny, fragile bits; you might ask any PCB milling machine vendor what speed they default to, and see if you can go slightly slower. I can't think of any super-slow X/Y feedrate use cases; going slow could generate more heat and wear than you'd want, and it would take forever to do the cut. In my case I only saw it on X because I wanted a display to show in inches.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.