aiuto macro letto livellante
-
Hi,
I need help I wanted to create this macro with inserted pauses after the Z 2 so that I could correct the reading of the comparator only that I can't get the program to stop and then start again could you help me?
G1 F1800 Z20
G1 F6000 Y 70
G1 X10
G1 F1800 Z5
G1 F40 Z2
M25 ;Pause
G1 F1800 Z20
G1 F6000 Y 290
G1 X10
G1 F1800 Z5
G1 F40 Z2
M25 ;Pause
G1 F1800 Z20
G1 F6000 Y 290
G1 X250
G1 F1800 Z5
G1 F40 Z2
M25 ;Pause
G1 F1800 Z20
G1 F6000 Y 70
G1 X250
G1 F1800 Z5
G1 F40 Z2
M25 ;Pause
G1 F1800 Z20
G1 F6000 Y 110
G1 X120
G1 F1800 Z5
G1 F40 Z2 -
As you can see from the documentation:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M25_Pause_SD_print
M25 is not for initiating a pause from within a print file or macro. Use M226 instead:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M226_Gcode_Initiated_Pause
-
tried M226 but the machine does not pause immediately read the line below because where am I wrong?
-
@fr4nc3sco try adding a M400 to ensure all the other commands are flushed and then the pause is executed:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M400_Wait_for_current_moves_to_finish -
I think the problem is that M25 and M226 can only pause an SD card print. If you that sequence inside a GCode file to print, then I think the pauses will work (using either M25 or M226). It may also work in a macro when that macro is called from an SD card file being printed.
Another way to achieve your aim may be to call another macro (using M98) instead of using M25 or M226. Within that macro, you can use M291 to display a prompt and wait for the user to give an OK to continue.