A bug in 2.02
-
Good day!
Maybe I found a bug in the firmware DuetWifi 2.02The error occurs in a complex sequence of actions:
My printer is always on via the + 5V line.
The power unit is turned on before print by the macro
/ macros / Preheat.g
M80M106 P0 S0.4
M106 P1 S0.98
M106 P2 S0.98
M106 P3 S0.6M140 S130
G10 P0 R210 S210;
G10 P1 R210 S210;
G10 P2 R50 S50;
T0
T1
T2and after the end of printing is called the command M0
macro /sys/stop.g
; stop.g
; called when M0 (Stop) is run (e.g. when a print from SD card is canceled)
M106 P0 S255; fan at 100% to cool nozzle
M106 P1 S255; fan at 100% to cool nozzle
M106 P2 S255; 100% extruder fan
M106 P3 S200
M1; heaters and motors off
G4 S180; Wait for 3 minutes
M106 P0 S0; fan off
M106 P1 S0; fan off
M106 P2 S0; Stop extruder fan
M81; power offWith these settings, the printer worked for many days and printed many times. Without crashing.
I recently added tool switching macros
; tpost0.g
G1 X100 Y244 F12000
G1 X195 Y244 F12000
G1 X170 Y244 E0 F1000
G1 X190 Y242 E4.00 F2400
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0and
; tpost1.g
G1 X100 Y244 F12000
G1 X195 Y244 F12000
G1 X170 Y244 E0 F1000
G1 X190 Y242 E4.00 F2400
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0Now, if printing is completed normally, and the stop.g macro is executed, the next print (I run preheat.g, wait for warm-up and start printing any file), the head can only move in the direction of increasing X and Y coordinates
Exit from the error state can only by reboot the printer.If printing is forced to stop (pause-> cancel), then the next printing will start without error.
cancel.g is present, but empty -
Typically when you can only move to increasing coordinates, is when the Duet lost its Homing position.
Since the Stepper motors are powered by the Vin of the board, they lost their position when there were no power for them (although your 5V and 3.3V logic circuits had power). The result is that it assumes it is at 0,0,0 and to not damage your printer, will not go into the negative space. There is also the change where move commands prior to Homing, needs an extra parameter S2 (see the table at https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move)
Does your print jobs perform a full Home, before starting?
Alternatively go into the Console (either on DWC or the PanelDue if you have one), and see what error is being given - The Duet is smart enough to tell you what problem it is facing. -
As @Jacotheron says, the M81 command will turn off VIN power so the machine will be flagged as not homed. You will need to home the printer again when you re-apply power.
Also, I suggest you add T-1 to your stop.g file to make sure that no tool is selected before you power off.
-
@jacotheron
Yes, the printer was homed.
The problem occurs after G28. -
@dc42 said in A bug in 2.02:
Also, I suggest you add T-1 to your stop.g file to make sure that no tool is selected before you power off.
OK. I try to do it.
-
@dc42 said in A bug in 2.02:
As @Jacotheron says, the M81 command will turn off VIN power so the machine will be flagged as not homed. You will need to home the printer again when you re-apply power.
Also, I suggest you add T-1 to your stop.g file to make sure that no tool is selected before you power off.Good day!
Your recommendations with the addition of T-1 did not help.
At the same time, the printer, before starting the movement to [Xmax, Ymax], first executes the G28 command, and then starts moving along the program.Here is an example of the file that failed:
; FLAVOR: RepRap
; TIME: 2300
; Filament used: 0.181584m, 5.93267m
; Layer height: 0.25
; Generated with Cura_SteamEngine 4.0.0
T0
M190 S130
M104 S260
M104 T1 S210
M109 S260
M109 T1 S210
M82; absolute extrusion mode
G28; home all axes
T0
G1 X70 Y244 F12000
G1 X71 Y244 F2000
G92 E0
G1 X75 Y244 E8 F2000
G92 E0
G1 X190 Y242 E4.00 F2400
G92 E0
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0
T1
G1 X70 Y244 F12000
G92 E0
G1 X71 Y244 F2000
G1 X75 Y244 E8 F2000
G92 E0
G1 X190 Y242 E4.00 F2400
G92 E0
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0
T0
M83; relative extrusion mode
G1 F1800 E-6A reboot corrects the status of the printer until the next stop.g
Manual re-homing did not help. -
I don't understand this issue. You are saying that when the two tool change files are added, this problem started. Correct?
Can you pin down a little more what it is about the tool change files that triggers the problem? For example, does it happen if only one of the files is present? Does it happen if the files are empty?
-
@dc42 said in A bug in 2.02:
I don't understand this issue. You are saying that when the two tool change files are added, this problem started. Correct?
Can you pin down a little more what it is about the tool change files that triggers the problem? For example, does it happen if only one of the files is present? Does it happen if the files are empty?Good day!
Yes, the problems started when I added a code to move the head to the cleaning site in post0.g and post1.g files. Before adding files were present, but were empty.
Previously, I used another slicer, where you could insert a cleanup code with a slicer.
There are no more differences in the printer setup.
What is interesting is that when the printer crashes on the error code and moves to [Xmax, Ymax], pressing PAUSE on the screen returns the head to the home position. -
Hello!
At the moment I have not managed to solve the above problem. As a temporary solution, I added the command M112 to the end of stop.g to restart the printer after printing. -
- After the print completes, before doing anything else, please run these commands and report the responses:
M114
G10 P0
G10 P1
G10 L2Then check that the error is still present (i.e. you can only move in the +X and +Y directions).
- Please try adding an extra comment line at the end of your tpost files, and see if that makes any difference.
-
OK, I try to do it.
-
@dc42 said in A bug in 2.02:
G10 L2
Good day.
I disabled the restart of the printer from stop.g and tried your commands.
At this point, the printer completed printing the model, completed stop.g, turned off the power, and only + 5V PS_ON is active.
; stop.g
; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
T-1 ;
M106 P0 S255 ; fan at 100% to cool nozzle
M106 P1 S255 ; fan at 100% to cool nozzle
M106 P2 S255 ; 100% extruder fan
M106 P3 S200
M1 ; heaters and motors off
G4 S180 ; Wait for 3 minutes
M106 P0 S60 ; fan off
M106 P1 S60 ; fan off
M106 P2 S60 ; Stop extruder fan
M106 P3 S60
M81 ;power off
;M11219:01:38
G10 L2
Origin of workplace 1: X0.00 Y0.00 Z0.00 U0.00
19:01:08
G10 P1
Tool 1 offsets: X-18.00 Y0.00 Z0.00 U0.00, active/standby temperature(s): 0.0/0.0
19:01:00
G10 P0
Tool 0 offsets: X0.00 Y0.00 Z0.00 U0.00, active/standby temperature(s): 200.0/200.0
19:00:44
M114
X:109.373 Y:167.258 Z:36.025 U:0.000 E0:882.9 E1:18049.1 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 Count 88522 -18523 22516 0 Machine 109.373 167.258 36.025 0.000
19:00:37
Connection established!
19:00:37
Page Load complete!Then I powered the printer and ran the G28.
The printer worked the command correctly and moved right after that.19:02:46
M120
G91
G1 Y-50 F6000
M121
19:02:44
M120
G91
G1 X-50 F6000
M121
19:02:41
M120
G91
G1 Y50 F6000
M121
19:02:39
M120
G91
G1 X50 F6000
M121
19:02:24
G28
19:01:45
M98 P"0:/macros/Power Up"Then I started the heating macro. During its execution, the nozzles are cleaned and movement and extrusion occurs.
Macro worked correctly.
19:07:00
Heater 3 switched on
19:04:58
Heater 2 switched on
19:03:04
Heater 1 switched on
19:03:01
Heater 0 switched onThen I started to print the previously normally printed file.
***File start:
;FLAVOR:RepRap
;TIME:1849
;Filament used: 7.37841m, 0m
;Layer height: 0.3
;Generated with Cura_SteamEngine 4.0.0
T0
M190 S130
M104 S260
M104 T1 S210
M109 S260
M109 T1 S210
M82 ;absolute extrusion mode
G28 ; home all axes
T0
G1 X70 Y244 F12000
G1 X71 Y244 F2000
G92 E0
G1 X75 Y244 E8 F2000
G92 E0
G1 X190 Y242 E4.00 F2400
G92 E0
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0
T1
G1 X70 Y244 F12000
G92 E0
G1 X71 Y244 F2000
G1 X75 Y244 E8 F2000
G92 E0
G1 X190 Y242 E4.00 F2400
G92 E0
G1 X130 Y242 E5.0 F2000
G1 X120 Y236 F2000
G1 X131 Y236 F12000
G92 E0
T0
M83 ;relative extrusion mode
G1 F1800 E-6
;LAYER_COUNT:56
;LAYER:0
M107
M204 T5000
;MESH:derjatel.stl
G0 F5400 X50.599 Y122.5 Z0.3
M204 P3000
;TYPE:WALL-OUTER
G1 F1800 E6
G1 F3000 X50.898 Y128.187 E0.56823
And at the beginning of printing, after the G28 the printer started to behave abnormally.
I paused printing and invoked debug commands again.19:10:42
G10 L2
Origin of workplace 1: X0.00 Y0.00 Z0.00 U0.00
19:10:34
G10 P1
Tool 1 offsets: X-18.00 Y0.00 Z0.00 U0.00, active/standby temperature(s): 210.0/210.0
19:10:15
Printing paused at X228.0 Y245.0 Z0.0 U360.0
Tool 1 offsets: X-18.00 Y0.00 Z0.00 U0.00, active/standby temperature(s): 210.0/210.0
19:10:12
G10 P1
Paused print, file offset=159
Resume state saved
19:09:53
G10 P0
Tool 0 offsets: X0.00 Y0.00 Z0.00 U0.00, active/standby temperature(s): 260.0/260.0
19:09:38
M114
X:228.000 Y:245.000 Z:0.000 U:360.000 E0:43.0 E1:17.5 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 E7:0.0 Count 151360 -5440 0 3200 Machine 228.000 245.000 0.000 360.000X228.0 Y245.0 Z0.0 U360.0 - abnormal coordinates
-
@anidal said in A bug in 2.02:
M82 ;absolute extrusion mode
In macros and printable file coordinate X228 Y245 is not present.
Is it possible that the macro command M82 is missing in the macros, but is it present in the print file and is somehow affected? -
I try to delete M82 - no effect.