Jump to content

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.9 stable released!
        Here comes Cura 5.9 and in this stable release we have lots of material and printer profiles for UltiMaker printers, including the newly released Sketch Sprint. Additionally, scarf seams have been introduced alongside even more print settings and improvements.  Check out the rest of this article to find out the details on all of that and more
          • Like
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Heart
          • Thanks
          • Like
        • 4 replies
    ×
    ×
    • Create New...