ToolChanger-PrusaSlicer-Temperatures

Discussion in 'Motion System' started by metty, Apr 10, 2020.

  1. metty

    metty Member

    Joined:
    Apr 10, 2020
    Messages:
    3
    Likes Received:
    0
    Hello, everyone.
    I'm a little confused and don't know if I'm the only one with the problem. I'm trying to configure the PrusaSlicer so that I can print comfortably with the ToolChanger. I have now noticed that the temperature is doing something that I do not set. Can anyone reproduce this:

    Setting up Temperature of PLA:

    Screenshot from 2020-04-10 17-27-23.png

    Slice it with PLA settings:

    Screenshot from 2020-04-10 17-23-54.png

    If I now scan through the generated gcode, I do not see an argument with 216 degrees anywhere. No wonder, the printer doesn't do that either.
    Screenshot from 2020-04-10 17-35-30.png

    Instead, I have temperatures like this inside, which I have not declared anywhere:
    M104 S206 T3 ; set temperature
    Can anyone reproduce it? What am I doing wrong?
     
  2. Killercds

    Killercds Member

    Joined:
    Sep 13, 2019
    Messages:
    13
    Likes Received:
    12
    I haven't tried re-producing this, but one of the first things I set up was a printer profile with custom g-code.
    The profile can be found here: https://github.com/StevenCregan/Slicer-Profiles/tree/master/PrusaSlicer

    My start gcode stops PrusaSlicer from adding in temperature data, then explicitly sets the temps for each extruder. I'll paste it below; though do note that it doesn't support that "First layer - Other layers" temp settings yet


    M104 ; Prevent Pusaslicer from adding temperature commands
    ; Run custom start G-code
    T-1 ; Clear tool selection
    G29 S1 ; Activate Mesh Bed Compensation and Load Saved Heightmap
    G10 P0 S[temperature_0] ; set T0 extruder temp
    G10 P0 R{temperature[0] - 30} ; set T0 idle temp
    G10 P1 S[temperature_1] ; set T1 extruder temp
    G10 P1 R{temperature[1] - 30} ; set T1 idle temp
    G10 P2 S[temperature_2] ; set T2 extruder temp
    G10 P2 R{temperature[2] - 30} ; set T2 idle temp
    G10 P3 S[temperature_3] ; set T3 extruder temp
    G10 P3 R{temperature[3] - 30} ; set T3 idle temp
    T-1 ; Clear tool selection
    T[current_extruder] ; Pick up current tool
    M140 S[bed_temperature] ; set bed temp
    M190 S[bed_temperature] ; wait for bed temp
    M116 P[current_extruder] ; wait for extruder to reach temp
    M98 P"prime_right.g" ; Prime extruder
     
    Olle Wreede and metty like this.
  3. metty

    metty Member

    Joined:
    Apr 10, 2020
    Messages:
    3
    Likes Received:
    0
    Ooooh, thank you so much! I can learn many things from your config-file, many thanks for sharing! The Temperature-problem seems to be fixed now. Now lets start to test the new configuration...

    Your link should appear here:
    https://github.com/e3donline/Slicer-Profiles
    There I was searching as well for a Prusa-Slicer-Profile.
     
  4. Krayn

    Krayn Well-Known Member

    Joined:
    Aug 11, 2019
    Messages:
    49
    Likes Received:
    14
    [​IMG]
    I use this. Custom Start G-code in the filament tab is called every time the slicer swaps filaments internally. So I use this as both the trigger for my toolchange AND setting of current filament temperature. What's nice about this is that it only warms up hotends if they are actually used in the print. I usually set bed temperature manually per job. Just remove the M98 prime line as that is specific to how I prime my extruders because of having different tools in each spot.

    I tried to get first layer temps to work in filament custom G-Code but prusaslicer doesn't define layer_z or layer_num in that code block so using an "if" block doens't work. Only the "Other Layers" temperature is read in this case.
     
    #4 Krayn, Apr 10, 2020
    Last edited: Apr 10, 2020
    Olle Wreede and metty like this.
  5. Krayn

    Krayn Well-Known Member

    Joined:
    Aug 11, 2019
    Messages:
    49
    Likes Received:
    14
    A self reply instead of an edit for an important note about setting temperature in the start Gcode that I had forgotten. PrusaSlicer will still try and set an initial temperature in the "global" start gcode block. You can prevent this by adding an empty M104 to the start gcode for the printer. Its not a HUGE deal as the G10 commands will quickly reset the temperature anyway but it can affect the standby temps until each filament is called. I have been using this for a few months and its been working great.

    I'm still hoping that they will allow us to use layer_z or Layer_num in the future so we can modify temperature per extruder per layer in a clean way.
     
    #5 Krayn, Apr 11, 2020
    Last edited: Apr 11, 2020
    metty likes this.
  6. metty

    metty Member

    Joined:
    Apr 10, 2020
    Messages:
    3
    Likes Received:
    0
    I thought to myself that it was the M104 that would solve the problem. The rest is off topic, but super valuable!
    Your scripts made me aware of the Prusa macro language.
    I tried from the example on : https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-Prusa-Edition-Macro-Language

    Insertet in "Filament change" for testing:

    {if layer_z < 10}M104 S265
    {elsif layer_z <17}M104 S260
    {elsif layer_z < 24}M104 S255
    {elsif layer_z < 31}M104 S250
    {elsif layer_z < 38}M104 S245
    {elsif layer_z < 45}M104 S240
    {endif}

    The Result:
    Screenshot from 2020-04-11 13-34-30.png

    Which placeholders can be used and which not? Where can I find the syntax rules and placeholders that are valid and work?
     
  7. Krayn

    Krayn Well-Known Member

    Joined:
    Aug 11, 2019
    Messages:
    49
    Likes Received:
    14
    I'm not sure if there is an updated list. There is some older documentation about what placeholders can be used and when but nothing that appears comprehensive. I have a feeling the only way to know for sure is to take a look at the source code and figure it out.

    [​IMG]
    In the short term you can insert custom gcode per layer in prusaslicer now. I'm not sure what (if any) placeholders it supports but [current_extruder] didn't work and spit out the line literally. I have a feeling it does not evaluate ANY placeholders at the moment, but at least you can send commands per layer without having to write a long if-else block in your printer profile anymore.
     
    metty likes this.

Share This Page