Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: M558 not honoring M203 #1090

Open
4 of 25 tasks
jltx1 opened this issue Feb 16, 2025 · 2 comments
Open
4 of 25 tasks

[Bug]: M558 not honoring M203 #1090

jltx1 opened this issue Feb 16, 2025 · 2 comments
Assignees
Labels
bug Bug that has been reproduced requires reproducing Not yet reproduced, or needs a more concise reproduction method.

Comments

@jltx1
Copy link

jltx1 commented Feb 16, 2025

Duet Forum Discussion Thread

https://forum.duet3d.com/topic/37464/g30-travel-acceleration-and-speed?_=1739629006887

Which Duet products are you using?

  • Duet2-Wifi
  • Duet2-Ethernet
  • Duet Expansion Breakout Board
  • Duex2
  • Duex5
  • Duet2-Maestro
  • Maestro Dual Driver Expansion
  • Duet3-6HC
  • Duet3-3HC
  • Duet3-1XD
  • Duet3-1LC
  • Duet3-Tool Distribution Board
  • Duet3-Mini5+
  • Duet3-Mini2+
  • Raspberry Pi or other SBC
  • SmartEffector
  • Magnetic Filament Sensor
  • Laser Filament Sensor
  • PT100 Daughterboard
  • Thermocouple Daughterboard
  • PanelDue
  • Other
  • None

Firmware Version

3.5.4

Duet Web Control Version

3.5.4

Are you using a Single Board Computer (RaspberryPi) with your Duet?

  • Yes I use a SBC.
  • No I do not use a SBC.

Please upload the results of sending M122 in the gcode console.

M122 Report
M122
=== Diagnostics ===
RepRapFirmware for Duet 3 Mini 5+ version 3.5.4 (2024-11-24 10:44:24) running on Duet 3 Mini5plus WiFi (SBC mode)
Board ID: RNXYU-8296U-D65J0-40KMW-2503Z-ZP7HW
Used output buffers: 1 of 40 (17 max)
=== RTOS ===
Static ram: 103496
Dynamic ram: 116924 of which 0 recycled
Never used RAM 18212, free system stack 140 words
Tasks: SBC(2,rWait:,1.7%,813) HEAT(3,nWait 1,0.1%,323) Move(4,nWait 6,0.0%,256) CanReceiv(6,nWait 1,0.0%,939) CanSender(5,nWait 7,0.0%,336) CanClock(7,delaying,0.0%,334) TMC(4,nWait 6,1.5%,67) MAIN(2,running,95.5%,762) IDLE(0,ready,0.4%,29) AIN(4,delaying,0.8%,264), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:32:59 ago, cause: power up
Last software reset at 2025-02-14 17:33, reason: User, Gcodes spinning, available RAM 17380, slot 1
Software reset code 0x6003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
MCU revision 3, ADC conversions started 1484578, completed 1484576, timed out 0, errs 0
MCU temperature: min 16.1, current 29.2, max 34.4
Supply voltage: min 0.2, current 24.0, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/228/228, gc cycles 0
Events: 0 queued, 0 completed
Driver 0: standstill, SG min 0, read errors 0, write errors 0, ifcnt 12, reads 48739, writes 12, timeouts 0, DMA errors 0, CC errors 0
Driver 1: standstill, SG min 0, read errors 0, write errors 0, ifcnt 32, reads 48719, writes 32, timeouts 0, DMA errors 0, CC errors 0
Driver 2: standstill, SG min 0, read errors 0, write errors 0, ifcnt 32, reads 48719, writes 32, timeouts 0, DMA errors 0, CC errors 0
Driver 3: standstill, SG min 0, read errors 0, write errors 0, ifcnt 32, reads 48719, writes 32, timeouts 0, DMA errors 0, CC errors 0
Driver 4: standstill, SG min 0, read errors 0, write errors 0, ifcnt 10, reads 48741, writes 10, timeouts 0, DMA errors 0, CC errors 0
Driver 5: standstill, SG min 0, read errors 0, write errors 0, ifcnt 32, reads 48719, writes 32, timeouts 0, DMA errors 0, CC errors 0
Driver 6: standstill, SG min 0, read errors 0, write errors 0, ifcnt 32, reads 48719, writes 32, timeouts 0, DMA errors 0, CC errors 0
Date/time: 2025-02-15 08:46:12
Cache data hit count 4294967295
Slowest loop: 333.80ms; fastest: 0.12ms
=== Storage ===
Free file entries: 20
SD card 0 not detected, interface speed: 0.0MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, segments created 11, maxWait 482961ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00
no step interrupt scheduled
Moves shaped first try 24, on retry 0, too short 3, wrong shape 12, maybepossible 0
=== DDARing 0 ===
Scheduled moves 148, completed 148, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 5], CDDA state -1
=== DDARing 1 ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters 0 -1 -1 -1, chamber heaters 3 -1 -1 -1, ordering errs 0
=== GCodes ===
Movement locks held by null, null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger* is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
SBC is idle in state(s) 0
Daemon is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
File2 is idle in state(s) 0
Queue2 is idle in state(s) 0
Q0 segments left 0, axes/extruders owned 0x0000803
Code queue 0 is empty
Q1 segments left 0, axes/extruders owned 0x0000000
Code queue 1 is empty
=== CAN ===
Messages queued 17630, received 0, lost 0, errs 9350943, boc 0
Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 26 (min 26), ts 9896/0/0
Tx timeouts 0,0,9895,0,0,7733 last cancelled message type 30 dest 127
=== SBC interface ===
Transfer state: 5, failed transfers: 0, checksum errors: 0
RX/TX seq numbers: 9711/6229
SPI underruns 0, overruns 0
State: 5, disconnects: 1, timeouts: 1 total, 1 by SBC, IAP RAM available 0x0cd20
Buffer RX/TX: 0/0-0, open files: 0
=== Duet Control Server ===
Duet Control Server version 3.5.4 (2024-11-25 17:32:26, 64-bit)
HTTP+Executed:
> Executing M122
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 6
Full transfers per second: 1.53, max time between full transfers: 16229.2ms, max pin wait times: 619.0ms/11.3ms
Codes per second: 0.02
Maximum length of RX/TX data transfers: 4436/932

Please upload the content of your config.g file.

Config.g
; Configuration file for Duet 3 Mini 5+ (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 05 2021 22:48:46 GMT-0500 (CDT)

; General preferences
M111 S0                     ; Debugging off
G21                         ; Work in millimetres
G90                                          ; send absolute coordinates...
M83                                          ; ...but relative extruder moves

;now goes into dsf-config.g -> M550 P"CerberusDWC"                           ; set printer name
M669 K1                                      ; select CoreXY mode
M564 S1 H1                  ; Forbid axis movements when not homed

; Network
;SBC M552 S1                                      ; enable network
M586 P0 S1                                   ; enable HTTP
M586 P1 S0                                   ; disable FTP
M586 P2 S0                                   ; disable Telnet

; --- Drive map ---
;   B _______ A
;    |   2   |
; Z  | 1 | 0 |
;     -------
;      front
;
; (looking at the printer from the top)

M950 E0 C"led" T1 ;Q3000000           ; set LED type to NeoPixel and set SPI frequency to 3MHz
M150 E0 U255 P255 S30 F0  ; set next 20 LEDs to cyan, full brightness, finished programming strip

; Drives
M569 P0.5 S1                              ; A  drive 0.0 goes forwards
M569 P0.1 S1                              ; B  drive 0.1 goes forwards
M569 P0.2 S0                              ; Z0 drive 0.2 goes backwards
M569 P0.3 S0                              ; Z1 drive 0.3 goes backwards
M569 P0.6 S0                              ; Z2 drive 0.6 goes backwards
M569 P0.0 S0                              ; E  drive 0.4 goes backwards

; motor mapping and steps
M584 X0.1 Y0.5 Z0.2:0.3:0.6 E0.0                  ; set drive mapping
;M584 U0.2 V0.3 W0.6	;control individual Z
M350 X4 Y4 Z16 E16 I1                      ; configure microstepping with interpolation
M92 X40.00 Y40.00                          ; set steps per mm (0.9deg)
M92 Z800.00 E676.00                          ; set steps per mm (1.8deg)

; drive currents
M906 X1500 Y1500 Z1200 E600 I30              ; set motor currents (mA) and motor idle factor in per cent
M84 S60                                      ; Set idle timeout

; Accelerations and speed
M98 P"/macros/print_scripts/setup_printing.g"

; Axis Limits
M208 X-1 Y-2 Z-0.5 S1                             ; set axis minima
M208 X302 Y307 Z260 S0                       ; set axis maxima

; Endstops
M574 X2 S1 P"^io2.in"                        ; configure active-high endstop for high end on X via pin ^io1.in
M574 Y2 S1 P"^io4.in"                        ; configure active-high endstop for high end on Y via pin ^io2.in
M574 Z0 P"nil"                               ; No Z endstop

; Z probes
M558 K0 P8 C"^io5.in" T24000 F120 H5 A5 S0.01 R0.2
G31 K0 P500 X0 Y25 Z2.48             ; Don't really care about inductive probe Z offset
M558 K1 P8 C"^io6.in" T18000 F240:60 H2 A10 S0.005 R0.2
G31 K1 P500 X0 Y0 Z0.86        ; Z switch offset (if positive, greater value = lower nozzle. if negative, more negative = higher nozzle)

; Bed leveling
M671 X345:-45:150 Y20:20:345 S12                   ; bed leveling coords, max 5mm adjust
M557 X14:292 Y25:285 P21:21                    ; Define bed mesh grid (inductive probe, positions include the Y offset!) and mesh count


; Bed heater (dual thermistor setup)
M308 S0 P"temp0" Y"thermistor" T100000 B3950 A"Bed Heater"  ; configure sensor 0 as thermistor on pin temp0 (heater sensor)
M308 S2 P"temp2" Y"thermistor" T100000 B3950 A"Bed Plate"   ; configure sensor 2 as thermistor on pin temp1 (mic6 sensor)
M950 H0 C"out0" T0 Q10                                      ; ##FIXME create bed heater output on out0 and map it to sensor 2 (mic6 sensor). Set PWM frequency to 10Hz
M140 P0 H0                                                  ; Mark heater H0 as bed heater (for DWC)
M143 H0 P1 T0 A2 S115 C0                                    ; Regulate (A2) bed heater (H0) to have pad sensor (T0) below 115°C. Use Heater monitor 1 for it
M143 H0 P2 T0 A1 S125 C0                                    ; Shut off (A1) bed heater (H0) if pad sensor (T0) exceeds 125°C. Use Heater monitor 2 for it
M143 H0 S113                                                ; Set bed heater max temperature to 110°C, use implict monitor 0 which is implicitly configured for heater fault
M307 H0 B0 S0.6                                             ; disable bang-bang mode and set PWM to 60% to avoid warping

; Hotend heater
M308 S1 A"Hotned" P"temp1" Y"pt1000" ;R2200   ; configure sensor 1 as PT1000 on pin temp1
M950 H1 C"out1" T1                           ; create nozzle heater output on out1 and map it to sensor 1
M307 H1 B0 S1.00                             ; disable bang-bang mode for heater  and set PWM limit
M143 H1 S350                                 ; set temperature limit for heater 1 to 350C

; MCU sensors (not available on Mini5+, Booh!!)
;M308 S3 Y"mcu-temp" A"MCU"
;M308 S4 Y"drivers" A"Drivers"

; chamber temp+humid
M308 S10 P"io1.out+io1.in" Y"dht22" A"Chamber Temp[C]"      ; Set DHT22 for chamber temp 
M308 S11 P"S10.1" Y"dhthumidity" A"Chamber Hum[%]"

; Fans
M950 F0 C"out4" Q250                         ; create fan 0 (hotend) on pin out4 and set its frequency
M106 P0 S1 H1 T50 C"Hotend"                  ; configure fan 0 value. Thermostatic control is turned on, using sensor #1
M950 F1 C"out3" Q20                         ; create fan 1 (cooling) on pin out3 and set its frequency
M106 P1 S0 H-1 C"Cooling"                    ; configure fan 1 value. Thermostatic control is turned off
; ##FIXME
;M950 F2 C"out5" Q30                 ; Create fan 2 (electronics bay) on pin out5 and set its frequency
;;M106 P2 S0.25 H1 T50 C"Bay"         ; Run the fans at 25% if the hotend is over 50C
;M106 P2 S0 H-1 C"Bay"               ; (temporary manual setup)
;M950 F3 C"out6" Q30                 ; Create fan 3 (chamber) on pin out6 and set its frequency
;M106 P3 S1 H2 T65 C"Chamber"        ; Configure fan 3: Thermostatic control is turned on, based on sensor #2 (mic6 temp)
;;M106 P3 S0 H-1 C"Chamber"           ; (temporary manual setup)
M950 H3 C"out6" T10
;M950 H3 T10
M141 P0 H3

; Tools
M563 P0 D0 H1 F1                             ; define tool 0 using fan 0 for M106
G10 P0 X0 Y0 Z0                              ; set tool 0 axis offsets
G10 P0 R0 S0                                 ; set initial tool 0 active and standby temperatures to 0C

; Custom settings
; LEDs
;M950 F4 C"out2"                     ; Create fan 4 (top leds) on pin out2
;M106 P4 S255 B0 H-1 C"Top Lights"   ; ## FIXME

; Miscellaneous
M572 D0 S0.035                      ; Pressure Advance ##FIXME: move to filament gcode?
M592 D0 A0.015 B0.0012 L0.2         ; Non-linear extrusion  ##FIXME
M376 H10                            ; Fade mesh out compensation over 10mm Z
;M912 P0 S-8.5                       ; MCU temp calibration  ##FIXME

; Accelerometer for selecting input shaping
;M955 P0 C"spi.cs2+spi.cs1" ; all wires connected to temp DB connector, no temperature daughterboard
; Input Shaping
M593 P"mzv" F40 ; use mzv input shaping to cancel ringing at 40Hz

;M80                                 ; ##FIXME turn on PSU & mains voltage 

M918 P2 R6 C40 E4 F200000  ; Fysetc 12864 display
M950 E1 C"io3.out" T1 U3       ; create a RGB Neopixel LED strip with 3 LEDs on the Duet 3 Mini 5+ 12864_EXP1 header

; set default LCD color
M150 E1 R40 U210 B250 P192 S1 F1
;M150 X2 R0 U250 B210 P30 S1 F1           ; 
M150 E1 R0 U250 B210 P30 S2 F0           ; 

;M950 E0 C"led" T1 ;Q3000000           ; set LED type to NeoPixel and set SPI frequency to 3MHz
M150 E0 R255 U255 B255 P255 S30 F0  ; set next 20 LEDs to cyan, full brightness, finished programming strip

M501                                         ; load saved parameters from non-volatile memory (config-override.g)
T0                                           ; select tool 0

Please upload the content of any other releveant macro files.

setup_probing:
M566 X300 Y300 Z20 E3600        ; Set maximum instantaneous speed changes (mm/min)
M203 X10000 Y10000 Z2500 E5000  ; Set maximum speeds (mm/min)
M201 X1000 Y1000 Z100 E800      ; Set maximum accelerations (mm/s^2) 
M204 P800 T1000                 ; Set printing acceleration and travel accelerations

M913 X75 Y75 Z40   

bed:
; bed.g
; Called to align the gantry to the bed plane via G32

; Clear any bed transform
M561

; Turn off noisy Extruder motor
M84 E0



; Lower currents, speed & accel
M98 P"/macros/print_scripts/setup_probing.g"

;if !move.axes[2].homed
  ; Home all axes
  G28

  ; Probe the bed at 3 points, x3 for more precision
  M558 K0 H15:5 F1000 T20000; increase the depth range, gets the gantry mostly level immediately
  M98 P"/sys/bed_probe_points.g"
  M558 K0 H4:2 F400 T20000  ; reduce depth range, probe slower for better repeatability
  M98 P"/sys/bed_probe_points.g"
  ; last attempt will be auto-repeated


M558 K0 H1 F60 T10000   ; reduce depth range, probe slower for better repeatability
while move.calibration.initial.deviation > 0.003
  if iterations > 3
    abort "Too many leveling attempts! Canceling print."
  M98 P"/sys/bed_probe_points.g"
  echo "Current deviation: " ^ move.calibration.initial.deviation ^ "mm"
echo "Leveling complete"

;use mechanical instead? G30 S-2 ; Z=0

; Restore high currents, speed & accel
M98 P"/macros/print_scripts/setup_printing.g"

Details specific to your printer.

corexy, 3 z motors

Links to additional info.

M558:
Tnnn Travel speed to and between probe points (mm/min). This is also the Z lift speed after probing. The corresponding axis speed limits set by M203 will be used instead if they are lower.

What happened?

Expected result
valid travel acceleration and speed for my machine as set by M203,M201,M204

Observed result
M558 travel too fast, motors skipping

Steps to reproduce
Issue M558 without a T parameter. Or set T parameter above M203 limit.

@jltx1 jltx1 added the bug Bug that has been reproduced label Feb 16, 2025
@T3P3 T3P3 assigned dc42 and unassigned x0rtrunks Feb 17, 2025
@T3P3 T3P3 added the requires reproducing Not yet reproduced, or needs a more concise reproduction method. label Feb 17, 2025
@dc42
Copy link
Collaborator

dc42 commented Feb 22, 2025

M204 is intended to be used by slicers to control acceleration when running print jobs, so it is not a bug if probing sequences do not respect M204 limits. M203 limits should be respected during probing sequences. M201 limits should be respected during probing sequences, except that the actual probing move should respect the M201.1 limits (which should generally be lower than the M201 limits) instead.

@jltx1
Copy link
Author

jltx1 commented Feb 23, 2025

Possibly related: in 3.6.0-beta4 this behavior remains. But also the very first move of the first M558 in bed.g above has an extreme jerk from standstill but subsequent moves appear as expected. Maybe jerk limits ignored too? I think the clue is that when I accidentally left off the T parameter it supplied its own travel speed (very high) from somewhere. Maybe same with jerk and acceleration.

I have looked at mechanicals and everything is normal. I have not observed this with other sudden moves from a stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that has been reproduced requires reproducing Not yet reproduced, or needs a more concise reproduction method.
Projects
None yet
Development

No branches or pull requests

4 participants