Default fan setup per tool in config.g

Discussion in 'Motion System' started by orcinus, Aug 25, 2019.

  1. Paul Arden

    Paul Arden Well-Known Member

    Joined:
    Aug 28, 2019
    Messages:
    180
    Likes Received:
    59
    Ok, got further now, I noticed the tool definitions in config.g didn't associate the PCF with the tool so I modified them to:

    Code:
    ; Tools
    M563 P0 S"T0" D0 H1 F2                    ; Define tool 0
    G10 P0 X0 Y0 Z0                    ; Reset tool 0 axis offsets
    G10 P0 R0 S0                        ; Reset initial tool 0 active and standby temperatures to 0C
    
    M563 P1 S"T1" D1 H2 F4                    ; Define tool 1
    G10 P1 X0 Y0 Z0                    ; Reset tool 1 axis offsets
    G10 P1 R0 S0                        ; Reset initial tool 1 active and standby temperatures to 0C
    
    M563 P2 S"T2" D2 H3 F6                    ; Define tool 2
    G10 P2 X0 Y0 Z0                    ; Reset tool 2 axis offsets
    G10 P2 R0 S0                        ; Reset initial tool 2 active and standby temperatures to 0C
    
    M563 P3 S"T3" D3 H4 F8                    ; Define tool 3
    G10 P3 X0 Y0 Z0                    ; Reset tool 3 axis offsets
    G10 P3 R0 S0                        ; Reset initial tool 3 active and standby temperatures to 0C
    
    I then removed all of the Px parameters from the tool change macros. After this if pick up a tool and set the fan speed with M106 Sxxx that speed is then handed to the next tool in a toolchange. I can now also set the fan speed outside of the toolchange macros (which is what PrusaSlicer is doing) and the setting gets picked up automatically by the active tool.

    Not sure if there is a good reason not to associate the fans with the tools, it feels like it makes life easier as you don't need to remember the mapping between tool and fan.
     
    Olle Wreede and Michael Pearson like this.
  2. Spoon Unit

    Spoon Unit Well-Known Member

    Joined:
    Sep 6, 2015
    Messages:
    1,561
    Likes Received:
    483
    I think @orcinus originally posted the correct collection of components for a given tool, but good to see it repeated as these things quickly get buried in the forum. I don't think these any good reason not to associate them. Someone else also suggested just setting every fan to every tool and in this way, the PCF fans all adopt the same speed on every change. Having the fan speed follow the tool changes seems a little smoother that that. I finally tweak could be to set the PCF fan for the current tool to off tfree. But I wonder if this might still qualify as the last tool change data for R2.
     
  3. Paul Arden

    Paul Arden Well-Known Member

    Joined:
    Aug 28, 2019
    Messages:
    180
    Likes Received:
    59
    I am leaving in the M106 S0 (without the tool number though) in my tfreeX.g files and this seems to work well. The speeds set with M106 follow the tool around and the PCF stops when the tool gets dropped off. So my guess is somehow the R2 doesn't 'see' the S0 call inside the macros.

    My original thought was that I would need to specify the tool number in tfreeX.g since the M106 documentation says that R2 restores the last M106 value that was issues without a tool number, so I would have thought the one in the free macro would override it but it seems not.

    Now just need to finish my PrusaSlicer post processing program to convert the M104 to G10 (I'm using the ooze prevention delta temperature there to set the standby temps) and hopefully I can try a print with everything straight our of PrusaSlicer.
     
    Spoon Unit likes this.
  4. Spoon Unit

    Spoon Unit Well-Known Member

    Joined:
    Sep 6, 2015
    Messages:
    1,561
    Likes Received:
    483
    That's good to hear. So it looks like R2 is calculated before tfree acts.
     
  5. wHack

    wHack Well-Known Member

    Joined:
    Aug 20, 2019
    Messages:
    96
    Likes Received:
    16
    But tfree happens first. Why does that work, it really seems like it shouldn't work. I left my Pnnn parameters in my tfree scripts as R2 explicitly ignores M106 commands with Pnnn parameters.

    From the Duet gcode docs for M106:
    In your case the last time the fan speed was set and no P parameter was provided it was set to 0, so it should then set it to 0.
     
    #25 wHack, Sep 23, 2019
    Last edited: Sep 23, 2019
  6. Paul Arden

    Paul Arden Well-Known Member

    Joined:
    Aug 28, 2019
    Messages:
    180
    Likes Received:
    59
    Yes exactly, what's what I want to know, it should not work based on the documentation. Though really a Duet question I guess.
     
  7. wHack

    wHack Well-Known Member

    Joined:
    Aug 20, 2019
    Messages:
    96
    Likes Received:
    16
    If I were you I would put the P parameters back in the tfree scripts. It seems like a bug that it is working and it would be a shame if it gets fixed and stops working for you.
     
  8. Paul Arden

    Paul Arden Well-Known Member

    Joined:
    Aug 28, 2019
    Messages:
    180
    Likes Received:
    59
    Perhaps @dc42 could comment? I'm currently on latest stable (2.03). If it is a bug I'll leave it as is for now to make my repo case for an issue then switch it.
     

Share This Page