Jump to content

Automatic batch printing


Smithy

Recommended Posts

Posted · Automatic batch printing

I have to print a lot of the same parts and so I tried to automate the whole thing. I've added a wait time to the GCode to cool the print bed, then drive the print head behind the object and use it to push the object off the plate.

 

That works very well, but I still have a problem. I took this modified GCode and simply duplicated it using Copy & Paste so that I have several such sequences in one GCode. 

 

The problem is that he finishes printing the first part, then waits and pushes the part off the plate, then he starts to heat up the print bed and the nozzle again, but then he finishes the print job. The heat-up of the bed and the nozzle is already the beginning of the GCode, so basically it works but I don't understand why and only in the second iteration, the print finishes after heating up. Could this be a security feature in the firmware? I wouldn't find anything unusual in the code that could cause the problem.

 

Here is the part which is relevant (end of original GCode, Push off part and beginning of the original code again)

I put a marker here in this sample which marks the line where it stops.

G1 X41.45 Y71.734
G1 X41.196 Y71.366
G1 X41.011 Y70.962
G1 X40.9 Y70.537
G1 X40.862 Y70.066
G1 X41.039 Y49.606
;TIME_ELAPSED:1298.258396
G1 F1500 E1177.12018
M140 S0
M107
; UM2Go End GCode
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off
G91 ;relative positioning
G1 E-1 F300  ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-19 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
G28 Z0
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning
M42 S0 ; turn led off
;Version _2.6 of the firmware can abort the print too early if the file ends
;too soon. However if the file hasn't ended yet because there are comments at
;the end of the file, it won't abort yet. Therefore we have to put at least 512
;bytes at the end of the g-code so that the file is not yet finished by the
;time that the motion planner gets flushed. With firmware version _3.3 this
;should be fixed, so this comment wouldn't be necessary any more. Now we have
;to pad this text to make precisely 512 bytes.
M82 ;absolute extrusion mode
;
; Push off prodecure
M104 S0 ;turn heated bed off
G4 P300000 ;wait 5 minutes
G1 X60 ;move head
G1 Z20 ;move bed
G1 Y10 F6000 ;move head to the front
G28 Z0 ;home Z
G28 X0 Y0 ;home head
;End of Gcode
;SETTING_3 {"global_quality": "[general]\\nversion = 4\\nname = Draft #2\\ndefin
;SETTING_3 ition = ultimaker2_go\\n\\n[metadata]\\ntype = quality_changes\\nqual
;SETTING_3 ity_type = draft\\nsetting_version = 9\\n\\n[values]\\nadhesion_type 
;SETTING_3 = skirt\\nbridge_settings_enabled = True\\nlayer_height = 0.3\\nlayer
;SETTING_3 _height_0 = 0.4\\nmagic_spiralize = True\\nsmooth_spiralized_contours
;SETTING_3  = False\\n\\n", "extruder_quality": ["[general]\\nversion = 4\\nname
;SETTING_3  = Draft #2\\ndefinition = ultimaker2_go\\n\\n[metadata]\\ntype = qua
;SETTING_3 lity_changes\\nquality_type = draft\\nposition = 0\\nsetting_version 
;SETTING_3 = 9\\n\\n[values]\\ncool_min_layer_time = 6\\nline_width = 0.9\\nskir
;SETTING_3 t_brim_minimal_length = 100\\nxy_offset_layer_0 = -0.3\\n\\n"]}
;FLAVOR:Marlin
;TIME:1298
;Filament used: 1.18362m
;Layer height: 0.3
;MINX:37.27
;MINY:43.466
;MINZ:0.4
;MAXX:82.73
;MAXY:76.534
;MAXZ:59.952
;Generated with Cura_SteamEngine 4.3.0
M140 S60
M105
M190 S60
M104 S200
M105
M109 S200
********* <= here it stops ***************
M82 ;absolute extrusion mode
; UM2Go Start GCode
M42 S255 ;turn led on
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 Z0 ;move Z to bottom endstops
G28 X0 Y0 ;move X/Y to endstops
G1 X10 Y10 F4000 ;move X/Y to front of printer
G1 Z40.0 F9000 ;move the platform to 40mm
G92 E0 ;zero the extruded length
G1 E20 F200 ; purge nozzle quickly
G1 E50 F60 ; purge nozzle slowly
G92 E0 ;zero the extruded length again
G1 F9000
;Put printing message on LCD screen
M117 Printing...
G92 E0
G92 E0
G1 F1500 E-6.5

 

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    I don't know much about gcode, and even less about firmware, so this is just guessing.

     

    Could the problem be that "padding thing", that you see earlier in the gcode, at the end of the normal file? Try copying and inserting that padding at the end of your push-off sequences too?

     

    Apart from that, I think any resetting or homing is done at the start of a new print job, just like any normal print. In normal use an UM2 can start from whatever situation it was left in (warm/cold nozzle or bed; head or build-plate sitting anywhere), so that shouldn't cause problems I think?

     

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    Currently I am not really understanding why it stops after processing the first lines of the new iteration.

    I will create a small test file and then try if it is the "padding thing". I would understand it, if it stops right after it, but after heat up is strange for me.

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    I see no reason for a normal end of print either.Does it stop with the regular "print finished" message or does happen something more weird - like rebooting or such...?

     

    But you should consider to...

    - either remove all M84 commands (steppers off)

    - or (additionally) re-home all axis before the first move in your "push off procedure"

     

     

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    Yes the normal "print finished" command was shown, right after heating up again the bed and the nozzle.

     

    Thanks for the hints with M84 and re-home - you are right, I missed that, but was just a quick and dirty try yesterday evening.

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    From the gcode, can you write text to the LCD-display? If yes, you could insert status messages every few lines in your custom code, and then let it wait for a second (so you have time to read), before doing the next command? Might make debugging easier.

     

  • Link to post
    Share on other sites

    Posted · Automatic batch printing

    Good idea Geert, thanks! 👍

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
        • 0 replies
    ×
    ×
    • Create New...