Jump to content

Print bed doesn't heat up, I am using CuraEngine command line


Recommended Posts

Posted · Print bed doesn't heat up, I am using CuraEngine command line

Hi,

I used the below command line to get the G-Code for an Anycubic Mega Zero printer, I get the exported G-Code but my printer printbed doesn't heat up though I have utilized the command ' -s material_bed_temperature_layer_0="60" '. Here is the full syntax:
 

../CuraEngine/build/Release/CuraEngine slice 
-j ../CuraEngine/definitions/anycubic_mega_zero.def.json 
-s cool_min_temperature=0 -s roofing_monotonic="true" -s roofing_layer_count=1 -s machine_nozzle_offset_y=0 -s machine_nozzle_offset_x=0 -s machine_extruder_cooling_fan_number=1 -s machine_extruder_start_code=
-g -e1 -o myfile.gcode -l myfile.stl

 

I have attached the runtime console logs herewith. I had to zip it since *.txt upload is not allowed.

 

What I am missing here?

curaengine_cli.txt.zip

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line

    My bad, the wrong cli and the attachment has been sent. Here is the corrected one attached. Also the cli was used:

    ../CuraEngine/build/Release/CuraEngine slice

    -j ../CuraEngine/definitions/anycubic_mega_zero.def.json

    -s cool_min_temperature=0 -s roofing_monotonic="true" -s roofing_layer_count=1 -s machine_nozzle_offset_y=0 -s machine_nozzle_offset_x=0 -s machine_extruder_cooling_fan_number=1 -s machine_extruder_start_code=

    -g -e1 -o cube.gcode -l cube.stl

     

    The gcode is attached too.

     

    corrected_curaengine_cli.txt.zip cube.gcode

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line

    That command still doesn't include the bed temperature setting, but that's not the problem here (it's loading a default from the material).

     

    The problem is in your startup gcode:

    App 1028658 output: G21 ;metric values
    App 1028658 output: G90 ;absolute positioning
    App 1028658 output: M82 ;set extruder to absolute mode
    App 1028658 output: M107 ;start with the fan off
    App 1028658 output: M117 Start heating ...
    App 1028658 output: M104 S{material_print_temperature_layer_0}
    App 1028658 output: M117 Homing X/Y ...
    App 1028658 output: G28 X0 Y0 ;move X/Y to min endstops
    App 1028658 output: M117 Homing Z ...
    App 1028658 output: G28 Z0 ;move Z to min endstops
    App 1028658 output: G1 Z15.0 F{speed_travel} ;move the platform down 15mm
    App 1028658 output: M117 Heating ...
    App 1028658 output: M109 S{material_print_temperature_layer_0}
    App 1028658 output: M117 Start cleaning ...
    App 1028658 output: G92 E0 ;zero the extruded length
    App 1028658 output: G1 F200 E10 ;extrude 10mm of feed stock
    App 1028658 output: G92 E0 ;zero the extruded length again
    App 1028658 output: M117 Intro line ...
    App 1028658 output: G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    App 1028658 output: G1 X0.1 Y20 Z{layer_height} F5000.0 ; Move to start position
    App 1028658 output: G1 X0.1 Y200.0 Z{layer_height} F1500.0 E15 ; Draw the first line
    App 1028658 output: G1 X0.4 Y200.0 Z{layer_height} F5000.0 ; Move to side a little
    App 1028658 output: G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
    App 1028658 output: G92 E0 ; Reset Extruder
    App 1028658 output: G1 E-1 F500 ; Retract filiment by 1 mm
    App 1028658 output: G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    App 1028658 output: G1 X5 Y20 Z0.3 F{speed_travel} ; Move over to prevent blob squish
    App 1028658 output: G1 F{speed_travel}
    App 1028658 output: G92 E0 ; Reset Extruder
    App 1028658 output: M117 Printing...

    You have an M104 line (set hotend temperature) and then an M109 (wait for hotend temperature) but no M140 (set bed temperature) or M190 (wait for bed temperature).

    • Heart 1
    Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line

    After I add the 'material_bed_temperature_layer_0="60"', I found this under 'all settings' but still I don't see M140 and M190 there. I have attached the further latest G-Code.

    Is adding '-s material_bed_temperature_layer_0="60"' is the correct way of instruction to the CuraEngine for adding M140/M190 in the G-Code?

     

    I apologize for creating confusions in above two posts - but this time it seems I corrected myself but still no result as I expect.

     

    In summary, it starts with:
     

    App 1066610 output: parameter: -s material_bed_temperature_layer_0="60" -s cool_min_temperature=0 -s roofing_monotonic="true" -s roofing_layer_count=1 -s machine_nozzle_offset_y=0 -s machine_nozzle_offset_x=0 -s machine_extruder_cooling_fan_number=1 -s machine_extruder_start_code=
    ...
    ...
    ...

     

    Ends with:

    ...
    ...
    ...
    App 1066610 output: G21 ;metric values
    App 1066610 output: G90 ;absolute positioning
    App 1066610 output: M82 ;set extruder to absolute mode
    App 1066610 output: M107 ;start with the fan off
    App 1066610 output: M117 Start heating ...
    App 1066610 output: M104 S{material_print_temperature_layer_0}
    App 1066610 output: M117 Homing X/Y ...
    App 1066610 output: G28 X0 Y0 ;move X/Y to min endstops
    App 1066610 output: M117 Homing Z ...
    App 1066610 output: G28 Z0 ;move Z to min endstops
    App 1066610 output: G1 Z15.0 F{speed_travel} ;move the platform down 15mm
    App 1066610 output: M117 Heating ...
    App 1066610 output: M109 S{material_print_temperature_layer_0}
    App 1066610 output: M117 Start cleaning ...
    App 1066610 output: G92 E0 ;zero the extruded length
    App 1066610 output: G1 F200 E10 ;extrude 10mm of feed stock
    App 1066610 output: G92 E0 ;zero the extruded length again
    App 1066610 output: M117 Intro line ...
    App 1066610 output: G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    App 1066610 output: G1 X0.1 Y20 Z{layer_height} F5000.0 ; Move to start position
    App 1066610 output: G1 X0.1 Y200.0 Z{layer_height} F1500.0 E15 ; Draw the first line
    App 1066610 output: G1 X0.4 Y200.0 Z{layer_height} F5000.0 ; Move to side a little
    App 1066610 output: G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
    App 1066610 output: G92 E0 ; Reset Extruder
    App 1066610 output: G1 E-1 F500 ; Retract filiment by 1 mm
    App 1066610 output: G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    App 1066610 output: G1 X5 Y20 Z0.3 F{speed_travel} ; Move over to prevent blob squish
    App 1066610 output: G1 F{speed_travel}
    App 1066610 output: G92 E0 ; Reset Extruder
    App 1066610 output: M117 Printing...

     

    latest_curaengine_console.txt.zip

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line
    2 hours ago, 3dslicegenius said:

    Is adding '-s material_bed_temperature_layer_0="60"' is the correct way of instruction to the CuraEngine for adding M140/M190 in the G-Code?

    You also need to edit the startup gcode in your printer's definition file to add M140/M190 lines.

    • Heart 1
    Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line
    7 hours ago, Slashee_the_Cow said:

    You also need to edit the startup gcode in your printer's definition file to add M140/M190 lines.

    @Slashee_the_Cow Do you mean, open the gcode with a text editor and add the lines manually? Is there a way to instruct through the '-s' syntax?

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line
    5 hours ago, gr5 said:

    Why are you using command line interface?

    Since I have added a Flask/python API interface with the CuraEngine CLI. The goal is to slice a STL and get the gcode exported with API call.

    I have published two free API in RapidAPI with this goal, accessible here.

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line

    If you run cura normally there is a place to edit the start gcode - you go to PREPARE tab towards top (slightly left) on screen, then you choose your selected printer, then you choose "manage printers" then "machine settings", and then there is a tab where you can edit the start/stop gcodes.  Slashee meant there I think.

     

    However, there is certainly another way to edit the machine profile file for your particular printer (anycubic mega...).  I don't know where the file is stored but I do know it's complicated where you have machine profiles including/inheriting from other machine profiles and user overrides and all that.

     

    Usually, this is all taken care of for most printers but perhaps you chose the wrong anycubic mega model or perhaps anycubic never properly coded this up.

     

    slashee calls it a "printer definition file" so I guess that's what you need to edit if you do it by editing the file (versus editing it with the Cura GUI).  There are 2 directory trees where things like this are stored.  Both somewhat hidden.  On linux it's in a hidden folder that starts with something like ".cura".  On windows I think it can be in the installation folder possibly?  Or the %appdata% folder somewhere.  All I remember is that it is complicated with one folder holding installed printer definition files (and hundreds of other printers, hundreds of materials, profiles and more) and another completely separate directory tree holding files that users have/can edit to override the things in the first directory tree.

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line

    Oh, also in the start gcode you can put in variable like things.  So you can put in something similar to M190 {material_bed_temp} or something vaguely like that and it will take the parameter you passed with -S and put it in there automatically.  Using the CLI has a big learning curve.

  • Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line
    13 minutes ago, gr5 said:

    If you run cura normally there is a place to edit the start gcode - you go to PREPARE tab towards top (slightly left) on screen, then you choose your selected printer, then you choose "manage printers" then "machine settings", and then there is a tab where you can edit the start/stop gcodes.  Slashee meant there I think.

     

    However, there is certainly another way to edit the machine profile file for your particular printer (anycubic mega...).  I don't know where the file is stored but I do know it's complicated where you have machine profiles including/inheriting from other machine profiles and user overrides and all that.

     

    Usually, this is all taken care of for most printers but perhaps you chose the wrong anycubic mega model or perhaps anycubic never properly coded this up.

     

    slashee calls it a "printer definition file" so I guess that's what you need to edit if you do it by editing the file (versus editing it with the Cura GUI).  There are 2 directory trees where things like this are stored.  Both somewhat hidden.  On linux it's in a hidden folder that starts with something like ".cura".  On windows I think it can be in the installation folder possibly?  Or the %appdata% folder somewhere.  All I remember is that it is complicated with one folder holding installed printer definition files (and hundreds of other printers, hundreds of materials, profiles and more) and another completely separate directory tree holding files that users have/can edit to override the things in the first directory tree.

    Hmm I found the issue, thanks for the headsup.

    I have previously copied the machine definition files to a location in the filesystem so that the local CuraEngine binary can locate them when asked for. I also copied the extruder definition files in the same root directory.

     

    While going through the definition file of the Anycubic Mega Zero (aka anycubic_mega_zero.def.json), I noticed the below machine start code. It never talks about the M140/M190 directives.

            "machine_start_gcode": { "default_value": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nM117 Start heating ...\nM104 S{material_print_temperature_layer_0}\nM117 Homing X/Y ...\nG28 X0 Y0 ;move X/Y to min endstops\nM117 Homing Z ...\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F{speed_travel} ;move the platform down 15mm\nM117 Heating ...\nM109 S{material_print_temperature_layer_0}\nM117 Start cleaning ...\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nM117 Intro line ...\nG1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X0.1 Y20 Z{layer_height} F5000.0 ; Move to start position\nG1 X0.1 Y200.0 Z{layer_height} F1500.0 E15 ; Draw the first line\nG1 X0.4 Y200.0 Z{layer_height} F5000.0 ; Move to side a little\nG1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nG1 E-1 F500 ; Retract filiment by 1 mm\nG1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X5 Y20 Z0.3 F{speed_travel} ; Move over to prevent blob squish\nG1 F{speed_travel}\nG92 E0 ; Reset Extruder\nM117 Printing...\n" },

     

    Even when I used the parameter '-s material_bed_temperature_layer_0' in the CLI syntax, its never taken into account.

    So I have the below options now:

    #1: I tell the guy to edit the start gcode and add M140/M190 like the below.
     

    App 1068153 output: ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_sparse_density}
    App 1068153 output: G21 ;metric values
    App 1068153 output: G90 ;absolute positioning
    App 1068153 output: M82 ;set extruder to absolute mode
    App 1068153 output: M107 ;start with the fan off
    App 1068153 output: M117 Start heating ...
    App 1068153 output: M104 S{material_print_temperature_layer_0}
    App 1068153 output: M140 S{material_bed_temperature_layer_0}
    App 1068153 output: M117 Homing X/Y ...
    App 1068153 output: G28 X0 Y0 ;move X/Y to min endstops
    App 1068153 output: M117 Homing Z ...
    App 1068153 output: G28 Z0 ;move Z to min endstops
    App 1068153 output: G1 Z15.0 F{speed_travel} ;move the platform down 15mm
    App 1068153 output: M117 Heating ...
    App 1068153 output: M109 S{material_print_temperature_layer_0}
    App 1068153 output: M190 S{material_bed_temperature_layer_0}
    App 1068153 output: M117 Start cleaning ...

     

    #2: I edit the machine definition file and add M140/M190 there.

     

    I will update here and close the discussion if any of the above methods is working.

    Thanks!

    • Like 1
    Link to post
    Share on other sites

    Posted · Print bed doesn't heat up, I am using CuraEngine command line
    2 hours ago, 3dslicegenius said:
    App 1068153 output: G21 ;metric values
    App 1068153 output: G90 ;absolute positioning
    App 1068153 output: M82 ;set extruder to absolute mode
    App 1068153 output: M107 ;start with the fan off
    App 1068153 output: M117 Start heating ...
    App 1068153 output: M104 S{material_print_temperature_layer_0}
    App 1068153 output: M140 S{material_bed_temperature_layer_0}
    App 1068153 output: M117 Homing X/Y ...
    App 1068153 output: G28 X0 Y0 ;move X/Y to min endstops
    App 1068153 output: M117 Homing Z ...
    App 1068153 output: G28 Z0 ;move Z to min endstops
    App 1068153 output: G1 Z15.0 F{speed_travel} ;move the platform down 15mm
    App 1068153 output: M117 Heating ...
    App 1068153 output: M109 S{material_print_temperature_layer_0}
    App 1068153 output: M190 S{material_bed_temperature_layer_0}
    App 1068153 output: M117 Start cleaning ...

    That's exactly the output you'd want.

    • Like 1
    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. 
         
          • Like
        • 26 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.
          • Like
        • 0 replies
    ×
    ×
    • Create New...