Can't get M505 to work
-
I'm in the process of converting my printer to use servomotors in the XY stage instead of steppers. I tried to use M505/M98 to switch to a new config file for the servos, but it seems the config.g file is not being read or the M505 command is not being read from the new location. The networking never becomes active, etc.
Here's the root folder on the uSD card:
In the sys folder I have nothing but a config.g file like this:
;M505 P"step" M505 P"servo" M98 P"config.g"
In the /sys/servo/ folder I have
The /sys/step/ folder has all the same files, except the config.g files in those two folders are slightly different.
/sys/step/config.g looks like this:
; UMMD configuration for stepper motors 22/05/14 ; for firmware version 3.2.RC2 01/01/21 ; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P1 ; Set firmware compatibility to look like RepRapFirmare M575 P1 B57600 S1 ; set serial comms parameters for PanelDue M667 S1 ; Select CoreXY mode ; Network M550 PUltra MegaMax Dominator ; Set machine name M551 P"UMMD" ; Set password M552 P192.168.1.3 S1 ; Enable network and set IP address M553 P255.255.255.0 ; Set netmask M554 P192.168.1.254 ; Set gateway M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Drives M569 P0 S1 ; motor A goes forwards M569 P1 S0 ; motor B goes backwards M569 P2 S1 ; Z motor goes forwards M569 P3 S1 ; extruder motor goes forwards M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X160 Y160 Z800 E822 ; Set steps per mm M906 X1600 Y1600 Z1120 E700 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout M205 X20 Y20 Z2 E50 ; Set maximum instantaneous speed changes (mm/sec) M203 X18000 Y18000 Z900 E3000 ; Set maximum speeds (mm/min) M201 X2000 Y2000 Z1000 E3000 ; Set maximum accelerations (mm/s^2) M204 P2000 T5000 ; Set print and travel acclerations (mm/s^2) ; Extrusion tuning M207 S2.0 R0 F3000 T2400 Z0.8 ; retraction settings (S=length, R=additional unretract length,F=speed,T=unretract speed, Z=hop) M572 D0 S0.05 ; Pressure Advance (D=extruder no., S=time in sec) ; Axis Limits M208 X-152:150 Y-165:148 Z0:687 ; Set axis minima:maxima ; Endstops M574 X2 S1 P"!xstop" ; Xmax, active high M574 Y2 S1 P"!ystop" ; Ymax, active high M574 Z1 S1 P"!zstop" ; Zmin, active high ; Z-Probe M558 P0 H5 F120 T12000 ; Set Z probe type to none and the dive height + speeds G31 P600 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height M557 X-140:140 Y-140:140 P4 ; Define mesh grid M671 X-163:163:0 Y0:0:-163 S1 P0.7 ; define locations of bed leveling screws ; Heaters M140 H0 ; assign bed heater to heater 0 M141 H2 ; Assign chamber heater to heater 2 M308 S0 P"bedtemp" Y"thermistor" A"bed_temp" T100000 B3950 C0 ; define bed temperature sensor M308 S1 P"spi.cs1" Y"rtd-max31865" A"nozzle_temp" F60 ; define extruder temperature sensor M308 S2 P"e1temp" Y"thermistor" A"chamber _temp" T100000 B4138 C0 ; define chamber temperature sensor M950 H0 C"bedheat" T0 ; bed heater is H0, uses sensor T0 M950 H1 C"e0heat" T1 ; extruder heater is H1, uses sensor T1 M950 H2 C"e1heat" T2 ; chamber heater is H2, uses sensor T2 M143 H0 S120 ; Set temperature limit for bed to 120C M143 H1 S280 ; Set temperature limit for extruder to 280C M143 H2 S60 ; Set temperature limit for chamber to 60C M307 H0 A215.8 C572.8 D1.5 S1.00 V24.4 B0 F20 ; PID parameters for bed heater ; M307 H1 A465.3 C122.2 D5.8 S1.00 V24.4 B0 ; PID parameters for extruder heater e3d heater block M307 H1 R2.540 C193.8 D4.49 S1.00 M307 H2 A11 C99000 D2000 B1 ; chamber heater operates in bang-bang mode ; Fans ; Note: UMMD FAN1 mosfet is dead M950 F2 C"fan2" M106 P2 S1 H1 T45 ; UMMD hot-end cooling fan (FAN2) M950 F0 C"fan0" Q100 ; UMMD print cooling (FAN0) ; Tools M563 P0 D0 H1 F0 s"Extruder" ; Define tool 0- use drive 0, heater 1, fan 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C T0 ; Automatic saving after power loss M911 S21 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ;M929 P"ummd_log.txt" S1 ; turns on logging ; Custom settings are not configured
And /sys/servo/config.g is this (a few changes made for sending full steps to the expansion board which sends step/dir/enable to the servomotors)
; UMMD configuration for servomotors 2022/05/14 ; for firmware version 3.2.RC2 01/01/21 ; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P1 ; Set firmware compatibility to look like RepRapFirmare M575 P1 B57600 S1 ; set serial comms parameters for PanelDue M667 S1 ; Select CoreXY mode ; Network M550 PUltra MegaMax Dominator ; Set machine name M551 P"UMMD" ; Set password M552 P192.168.1.3 S1 ; Enable network and set IP address M553 P255.255.255.0 ; Set netmask M554 P192.168.1.254 ; Set gateway M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Drives M584 X5 Y6 ;remaps X and Y motor drives to expansion board M569 P5 S1 R1 T4.0:5.0:6.0:11.0 ; sets the timing parameters for the X motor servo drive signals M569 P6 S1 R1 T4.0:5.0:6.0:11.0 ; sets the timing parameters for the Y motor servo drive signals M569 P5 S1 ; motor A goes forwards M569 P6 S0 ; motor B goes backwards M569 P2 S1 ; Z motor goes forwards M569 P3 S1 ; extruder motor goes forwards M350 Z16 E16 I1 ; Configure microstepping with interpolation for extruder and Z axis M350 X1 Y1 I0 ; set servomotors to full step pulses M92 X240 Y240 Z800 E822 ; Set steps per mm M906 X30 Y30 Z1120 E700 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout M205 X30 Y30 Z2 E50 ; Set maximum instantaneous speed changes (mm/sec) M203 X6000 Y6000 Z900 E3000 ; Set maximum speeds (mm/min) M201 X1000 Y1000 Z1000 E3000 ; Set maximum accelerations (mm/s^2) M204 P1000 T1000 ; Set print and travel acclerations (mm/s^2) ; Extrusion tuning M207 S2.0 R0 F3000 T2400 Z0.8 ; retraction settings (S=length, R=additional unretract length,F=speed,T=unretract speed, Z=hop) M572 D0 S0.05 ; Pressure Advance (D=extruder no., S=time in sec) ; Axis Limits M208 X-152:150 Y-165:148 Z0:687 ; Set axis minima:maxima ; Endstops M574 X2 S1 P"!xstop" ; Xmax, active high M574 Y2 S1 P"!ystop" ; Ymax, active high M574 Z1 S1 P"!zstop" ; Zmin, active high ; Z-Probe M558 P0 H5 F120 T12000 ; Set Z probe type to none and the dive height + speeds G31 P600 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height M557 X-140:140 Y-140:140 P4 ; Define mesh grid M671 X-163:163:0 Y0:0:-163 S1 P0.7 ; define locations of bed leveling screws ; Heaters M140 H0 ; assign bed heater to heater 0 M141 H2 ; Assign chamber heater to heater 2 M308 S0 P"bedtemp" Y"thermistor" A"bed_temp" T100000 B3950 C0 ; define bed temperature sensor M308 S1 P"spi.cs1" Y"rtd-max31865" A"nozzle_temp" F60 ; define extruder temperature sensor M308 S2 P"e1temp" Y"thermistor" A"chamber _temp" T100000 B4138 C0 ; define chamber temperature sensor M950 H0 C"bedheat" T0 ; bed heater is H0, uses sensor T0 M950 H1 C"e0heat" T1 ; extruder heater is H1, uses sensor T1 M950 H2 C"e1heat" T2 ; chamber heater is H2, uses sensor T2 M143 H0 S120 ; Set temperature limit for bed to 120C M143 H1 S280 ; Set temperature limit for extruder to 280C M143 H2 S60 ; Set temperature limit for chamber to 60C M307 H0 A215.8 C572.8 D1.5 S1.00 V24.4 B0 F20 ; PID parameters for bed heater ; M307 H1 A465.3 C122.2 D5.8 S1.00 V24.4 B0 ; PID parameters for extruder heater e3d heater block M307 H1 R2.540 C193.8 D4.49 S1.00 M307 H2 A11 C99000 D2000 B1 ; chamber heater operates in bang-bang mode ; Fans ; Note: UMMD FAN1 mosfet is dead M950 F2 C"fan2" M106 P2 S1 H1 T45 ; UMMD hot-end cooling fan (FAN2) M950 F0 C"fan0" Q100 ; UMMD print cooling (FAN0) ; Tools M563 P0 D0 H1 F0 s"Extruder" ; Define tool 0- use drive 0, heater 1, fan 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C T0 ; Automatic saving after power loss M911 S21 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ;M929 P"ummd_log.txt" S1 ; turns on logging ; Custom settings are not configured
I tried disconnecting the expansion board, no joy. I copied the contents of the /sys/step/folder back into the /sys/ folder and it worked fine. So it looks like the controller is either not reading the config.g file in the /sys/ folder or is ignoring the M505 command.
In the M505 entry on the wicki here it shows M98 P"config.g" with some sort of tiny character following the final ". I tried using a ' but it doesn't work with or without it- typo?
Any ideas?
Thanks!
-
@mrehorstdmd The directories servo and step need to be in /sys.
From the M505 description:
M505 P"experimental" ; change config file path from /sys/ to /sys/experimental/```
-
@stephen6309 Doh! Of course! Thanks!