No setting motor current with macro
-
I'm currently working on a BLV with a jubilee tool changer (with the tool changer a work in progress). Currently I have two tool heads that I use a Triangle Matrix Extruder and a Mellow Sunrise both through a 1LC toolboard. To make it easier to change tools I've created a 'ToolBoardN.g' file for each setup. When the printer is turned on it loads an 'Power On' macro which then starts a "Start Tools" macro which then references which just has M98"ToolBoard1.g" and "Toolboard2.g" that I just comment in and out as needed.
Weirdly since changing to the this system the motor current doesn't seem to set and the stepper just stalls. However If I run the "Start Tools" macro again it works normally. Ditto if I run an M906 with the E current. The macro is clearly running because my fans/z-probe etc run correctly. I've also tried various delays between powering on and running the macro without any improvement.
Does anyone have any ideas why?
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.3 on Sun Jun 28 2020 06:07:32 GMT+0000 (Coordinated Universal Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Cube" ; set printer name M669 K1 ; select CoreXY mode ; ATX power ;M80 ; Drives M569 P0.4 S1 ; physical drive 0.4 goes forwards M569 P0.3 S0 ; physical drive 0.3 goes forwards M569 P0.0 S0 ; physical drive 0.0 goes forwards M569 P0.1 S0 ; physical drive 0.1 goes forwards M569 P0.2 S0 ; physical drive 0.2 goes forwards M569 P0.5 S1 ; physical drive 0.5 goes forwards ;Extruder Drives are setup in toolboard*.g files M584 X0.4 Y0.3 Z0.0:0.1:0.2 E20.0 U0.5 ; set drive mapping M350 X16 Y16 Z16 U16 I1 ; configure microstepping with interpolation M92 X160.00 Y160.00 Z1600.00 U30.5 ; set steps per mm M566 X3000.00 Y3000.00 Z20.00 U500.00 ; set maximum instantaneous speed changes (mm/min) M203 X20000.00 Y20000.00 Z900.00 U3000.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z20.00 U250.00 ; set accelerations (mm/s^2) M906 X1700 Y1700 Z1100 U600 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ;Setup 3 motor z M671 X-50:-50:350 Y246:54:150 S10 ; Axis Limits M208 X0 Y0 Z0 U0 S1 ; set axis minima M208 X310 Y300 Z300 U360 S0 ; set axis maxima ; Endstops M574 X2 S1 P"io3.in" ; configure active-high endstop for low end on X via pin !io1.in M574 Y2 S1 P"io2.in" ; configure active-high endstop for low end on Y via pin !io2.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z M574 U1 S1 P"io4.in" ; configure U end stop ; Z-Probe ;Setup no moeved to toolboard*.g files M557 X50:250 Y50:250 S50 ; define mesh grid ;Chamber Temp M308 S2 P"temp1" Y"thermistor" T100000 B4100 A"Chamber Temp" ;Setup chamber temperature sensor ; Heaters - Bed M308 S0 P"temp0" Y"thermistor" T100000 B4267 A"Bed Temp" ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out8" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 R0.940 C532.800:532.800 D6.30 S1.00 V23.7 B0 ; disable bang-bang mode for the bed heater and set model parameters M140 H0 ; map heated bed to heater 0 M143 H0 S150 ; set temperature limit for heater 0 to 150C M570 H0 P5 T15 S10 ;Triggers shutdown if heater fault for more than 10s ; Fans - frame and MCU temp M308 S10 P"mcu-temp" Y"mcu-temp" A"MCU" ;creates a sensor on pin 10 M950 F0 C"out7" Q500 ; create fan 0 on pin out7 and set its frequency M106 P0 S200 H10 X255 T25:40 C"MCU fan" ; set fan 0 value. Thermostatic control is turned off ; Miscellaneous M575 P1 S1 B57600 ; Enable support for PanelDue M575 P2 S1 B57600 ; Enable support for Neopixels ; Pressure Advance values M572 D0 S0.02 ; Endstop based buttons M950 J0 C"io5.in" ;creates trigger input for io5 M950 J1 C"io6.in" ;creates trigger input for io6 M950 J2 C"io7.in" ;creates trigger input for io7 M581 P0 T2 S1 ;Triggers trigger2.g (turns off power) M581 P1 T0 S1 ;Triggers emergency stop M581 P2 T1 S1 ;Triggers pause
The "1-Power-On" macro
M80 G4 S6 ;Wait 4 seconds for CAN to connect M98 P"0/macros/3-Start Tools" G4 S2 ;Wait a second for toolboards to setup M501 ; Load config-override.g values
"3-Start Tools" Macro
;M98 P"ToolBoard1.g" M98 P"ToolBoard2.g"
"ToolBoard2.g" system config file (the one currently in use)
;Setup for Mellow Sunrise ;Setup Extruder Drive M569 P20.0 S1 ; physical drive 20.0 goes forwards M584 X0.4 Y0.3 Z0.0:0.1:0.2 E20.0 U0.5 ; set drive mapping M350 E64 I1 ; configure microstepping with interpolation M92 E2850 ; set steps per mm M566 E300 ; set maximum instantaneous speed changes (mm/min) M203 E3600 ; set maximum speeds (mm/min) M201 E600 ; set accelerations (mm/s^2) M906 E700 I30 ; set motor currents (mA) and motor idle factor in per cent ;Setup Toolboard Z-probe M558 P9 C"^20.io0.in" H5 F240 T6000 R.5 ; set Z probe type to switch and the dive height + speeds M950 S0 C"20.io0.out" ; sets up servo output G31 P500 X40 Y15 Z3.4 ; set Z probe trigger value, offset and trigger height ; Toolboard 1 M308 S1 P"20.temp0" Y"thermistor" T100000 B4100 ; configure sensor 0 as thermistor on pin temp0 on board 20 M950 H1 C"20.out0" T1 ; Sets heater 1 and maps it to temp probe 1 M307 H1 A340.0 C140.0 D5.5 S2.00 V0.0 B0 ; Default Tool Heater Parameters. M143 H1 S300 ; Maximum H0 (Extruder) heater temperature M570 H1 P5 T15 S10 ;Triggers shutdown if heater fault for more than 10s M950 F1 C"20.out2" Q500 ; create fan 0 on pin out7 and set its frequency M106 P1 S0 H-1 C"Parts Cooler 1" ; set fan 0 value. Thermostatic control is turned off M950 F2 C"20.out1" Q500 ; create fan 0 on pin out7 and set its frequency M106 P2 H1 T40:50 L25 H255 C"Hotend 1 Fan" ; set fan 0 value. Thermostatic control is turned off M563 P0 D0 H1 S"1LC No 1" F1 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ;Config Toolboard Buttons M950 J3 C"20.button0" ;creates tooboard button 0 M950 J4 C"20.button1" ;creates tooboard button 1 M581 P3 T3 S1 ;Triggers lock M581 P4 T4 S1 ;Triggers unlock
-
@nriviera
The only thing I can think of is the 'config-override' file containing false motorcurrent info or the slicer start gcode.
Can you call the toolboard macros in dedicated slicer profiles? That way you wouldn't have to comment out the unused toolboard. -
@nriviera please confirm that you are running firmware 3.3 on both the main board and the tool board.
Do you see any error messages when running the power on macro? If you see CAN timeout messages, then it could be that your tool board is especially slow to start up. If that's the case, then upgrading its bootloader to the latest version (2.3) may help.
-
@o_lampe Thanks, I didn't think of different slicer or tool profiles. I thought the config-overide but alas nothing in there to cause it.
-
@dc42 I do get random CAN-bus unhandled inputs (2000, 3000, 2100 and sometimes others) so maybe that's it. I'll give it a go.
-
@dc42 its been a while and the error messages never went away but I stopped having extrusion issues so I didn't pursue it. They seem to have come back intermittently this last week however. I've updated the bootloader to 2.4, running 3.4rc2 firmware. The config files are unchanged from above. Any idea?
-
Update to 3.4 final.
-
@nriviera said in No setting motor current with macro:
@dc42 I do get random CAN-bus unhandled inputs (2000, 3000, 2100 and sometimes others) so maybe that's it. I'll give it a go.
That's typically triggered by removing power to the tool board but keeping 5V power to the main board. Is that what you are doing?
-
@dc42 yes. The 6HC 5v is always on as it triggers the 24v power which power the toolboards. I have a fairly large delay (I changed it to 10s but even 20s doesn't make any difference) to ensure the boards have enough time to boot but still get current issues intermittently.
-
@phaedrux said in No setting motor current with macro:
Update to 3.4 final.
I have done the update and still have the issue unfortunately.
@dc42 said in No setting motor current with macro:
@nriviera said in No setting motor current with macro:
@dc42 I do get random CAN-bus unhandled inputs (2000, 3000, 2100 and sometimes others) so maybe that's it. I'll give it a go.
That's typically triggered by removing power to the tool board but keeping 5V power to the main board. Is that what you are doing?
I'm not too fussed about the warnings and errors it's having to run a separate macro every-time I print is the annoying part. Should I use a very long delay?
-
@nriviera what bootloader versions are the tool boards running? To find out, use M122 B# where # is the CAN address of the tool board.
Some tool boards running older versions of the bootloader sometimes take a while to start up after power is applied.
-
@dc42 weirdly the m115 output didn't have the bootloader but i updated it to the most recent last week so it should be 2.4
-
@nriviera it's M122 that displays the bootloader version, not M115.
-
@dc42 sorry had a moment. Definitely 2.4