Dual Layer Change - Help Needed

Discussion in 'Calibration, Help, and Troubleshooting' started by AndyVirus, Apr 23, 2017.

  1. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    Hello,

    I have 2 issues that im sure someone has ran into before....

    1) Lower the bed by 5mm from the current Z position. (I currently have G1 Z5 F180 in the tool change script which I know now is absolute so anything over 5mm results in the nozzle being slammed into the print). Im using S3D as the slicer currently so was looking at the "current_z_position" variable but need "current_z_position +5" somehow.

    2) Stop the cooling fans during tool change and resume the fans after the purge of Xmm. When the fans are off, the filament being purged falls strait, with the fans on it curls up and has a chance to not get wiped of dragging the curled up filament extrusion into the next layer of the print. I was looking at M106 S0 and M106 Rxxx but not sure if this would work or what the value of xxx should be as it needs to be a variable I guess for the last known fan speed. I found by googling someone stating S3D supports "[fan_speed_percentage] & [fan_speed_pwm]" but not sure if that would work for M106 R[fan_speed_percentage]?

    S3D slicer, Duet (RepRapFirmware) brains.

    Any help appreciated.
     
  2. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    if you just add a + before the 5(i.e."G1 Z+5 F180") itll increment the height im p sure, and to go back just use "G1 Z-5 F180"

    and for the cooling problem you could turn it off with "M106 S0" prior to "G1 E100"(100 mm good?) and "M106 S[fan_speed_pwm]"

    be sure to test these before actual use though
     
  3. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    Ill give them a go. Thanks!

    Ok So Looks like using G1 Z+5 F180 does not work... At Z hight of 1.6 it does not go to Z 6.6 it goes to Z5.0 still.

    It also looks like S3D 3.1.1 does not use [fan_speed_pwm] as in the GCODE it does not translate to a value, it literally sends "M106 S[fan_speed_pwm]".

    M106 Rnnn looks like my best bet but i cant find any example of what nnn should be. If i use "M106 R" and no value it restores to 100% not the last value.
    I guess i need to know how to "pause" the fan using M106 for the value to be stored as a variable in the firmware?
    http://reprap.org/wiki/G-code#M106:_Fan_On

    Any ideas?
     
    #3 AndyVirus, Apr 24, 2017
    Last edited: Apr 24, 2017
  4. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    For the lower bed by 5mm in addition to the current Z position... The reason i need to do it on each tool change is for example:

    TreeFrog. Lots of little extrusions. On the last layer printed by tool 1, the hight of that layer is equal to the hight of the next layer to be printed by tool0. This can cause the nozzle to drag across the last layer as it is identical hight. If there has been even the tinest bit of expansion in the material then it is bashing into it. I want to lower the bed, move nozel to position then continue the print not drag the new tool across the last layer.

    The next problem is, if i use G91 to set relative position to Z then move, there is no way to set absolute position again as this needs to be done by the main gcode not the tool change script. So i would end up with:

    Code:
    ...
    {IF NEWTOOL=1}G1 E15 F50 ; extrude 15mm
    {IF NEWTOOL=1}G1 E-1.0 F50 ; retract 1.0mm
    {IF NEWTOOL=1}G1 X315 Y-30 F3000 ; move to position behind of dock
    {IF NEWTOOL=1}G1 X300 Y-30 F3000 ; move into dock
    {IF NEWTOOL=1}G1 X285 Y-30 F3000 ; move to position in front of dock
    {IF NEWTOOL=1}G91 ; Set relative positioning
    {IF NEWTOOL=1}G1 Z5 F180; Lower bed by 5mm
    
    At this point the main gcode would need to move to position where it wants to print next, issue a G1 Z-5 F180 to raise the bed back 5mm and issue G90 before the first G1 xxxxxx. I cant do that in the tool change script as the point where the print resumes to is not known/a variable.

    Single colour prints are easy as you don't need to drop the bed relative to the current z position as i do that one at the start in the starting script and never again. This is solely a multi tool issue.
     
  5. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    in the gcode generation there should be a "use absolute values" check or something along those lines, disablee it for it to work
    also why are you checking to see if its tool one if you want the same for all the toolchanges?
     
  6. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    That is only part of my tool change script, I have if newtool=1 and if newtool=0. Would disabling absolute values not cause the next layer to be off by the next layers absolute hight? So if Layer 3 was Z3.0 and Layer 4 was Z3.2 in the gcode would layer 3 now not be Z6.2? as layer 4 is now relative to Layer 3.
     
  7. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    Absolute value means the head positions are full coordinates, disabling if makes them relive to the last movement, this can also decrease file size as the coordinates contain less numbers
     
  8. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    still not sure how this helps me achive what i need. I need to move Z 5 mm away, tool change, move to "where ever the next position is that is determined by the slince not me" then move z back by 5mm. If the position was predictable then this would work, as it is not i dont see how relative or absolute makes any difference to my problem. Ill give up i think, i am obviously not explaining myself and dont have the ability to be able to.
     
  9. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    On the second issue though, looks like there will be an option to save the state of the fan and resume it in the next reprap firmware release : https://www.duet3d.com/forum/thread.php?id=1375
    So some good news.

    My head really hurts trying to explain the first issue. I just dont want the nozzle to drag through the last layer. Thats the gist of it. Layer 1 is done with Tool0. Layer 2 AND 3 is done with Tool1. When Tool 0 comes out to play again it too needs to extrude to layer 3 but on its way to do so it will rub the layer 3 layed down by tool 1. How do you avoid this?
     
  10. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    G91 is increment position
    G90 is absolute
    Try this
    Code:
    {IF NEWTOOL=1}G91 ; Set relative positioning
    {IF NEWTOOL=1}G1 E15 F50 ; extrude 15mm
    {IF NEWTOOL=1}G1 E-1.0 F50 ; retract 1.0mm
    {IF NEWTOOL=1}G90 ; Set absolute   positioning
    {IF NEWTOOL=1}G1 X315 Y-30 F3000 ; move to position behind of dock
    {IF NEWTOOL=1}G1 X300 Y-30 F3000 ; move into dock
    {IF NEWTOOL=1}G1 X285 Y-30 F3000 ; move to position in front of dock
    {IF NEWTOOL=1}G91 ; Set relative positioning
    {IF NEWTOOL=1}G1 Z5 F180; Lower bed by 5mm
    {IF NEWTOOL=1}G90 ; Set absolute   positioning
    
     
  11. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    For the second one
    You'd need to reiterate the gcode so it doesn't go over it
     
  12. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    OK. I think i was thinking that G90 to be absolute "from" the relative position so if you were at Z1.0 and moved Z 4mm Relative to Z1.0, then issue G90 to use absolute positioning, Z5.0 would be the new Z1.0.... I was stressing as my mirrored Titan just shattered so was not thinking correctly!

    Thanks, that looks to do exactly what I want. Thanks for putting up with my ramblings :)
     
  13. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    No problem, how'd you shatter your Titan?
     
  14. AndyVirus

    AndyVirus Well-Known Member

    Joined:
    Apr 10, 2016
    Messages:
    221
    Likes Received:
    46
    Not a clue. I have asked E3D if they know how it could happen. Its shattered in 3 places outwards from the filament hobbed bolt on the clear cover. Csnt even think how it could have happend. Was not over tight, just came back after some printing and noticed it was clicking and had shattered.

    Edit: Shattered might be an over reaction but as its cracked in 3 places...
     

    Attached Files:

  15. A Dragon In A Pie Costume

    A Dragon In A Pie Costume Well-Known Member

    Joined:
    Jul 6, 2016
    Messages:
    202
    Likes Received:
    15
    man, that sucks. sorry to hear
     

Share This Page