Jump to content
Ultimaker Community of 3D Printing Experts

Pause At Height - Odd Z Changes


Recommended Posts

Posted · Pause At Height - Odd Z Changes

Can someone please help me understand what Pause at Height is doing? I looked at code that it modifies to pause at height, I see several changes in the Z height that make no sense to me. The third command added is G1 F300 Z1, the fifth command it G1 F300 Z15, and the thirteenth command is G1 F300 Z1. If the height of my model at the time of change is tall enough, the X axis gantry will just crush my model. I tried the script on a tall model and selected a much higher layer to change and I got the same results. My searches only came up with posts about Pause at Height, nothing I saw about these odd Z height changes.

  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    I'd be willing to bet those initial Z height changes are coming from the start gcode for your printer. If so, then they are executed before there's anything on the print bed.

     

    The current Pause at Height post processing script, however, isn't very smart and it see's those changes in Z and will insert its gcode into the middle of your printer's start gcode.

     

    I have solved this problem by modifying the script, see below:

     

    On 3/31/2018 at 8:13 PM, b-morgan said:

    The problem with the PauseAtHeight.py distributed with Ultimaker Cura is that it is off by a few layers from where you expect it to be. I've attached a modified version that corrects that problem and adds a choice between height (in mm) or layer number.

     

    You will have to rename the file to remove the .log extension as that was the only way I could get it to upload here. 

    (moderator: feel free to rename the file as you approve this post).

    PauseAtHeightorLayer.py.log

     

  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    Here's my start g-code:

    G21; Metric values

    G90; Absolute positioning

    M107; Fan off

    G28; Home the printer

    G92 E0; Zero the extruder

    G0 E4 F500; Extrude 4mm to prime nozzle

     

    The only time I have an outright Z1 movement is at the end, and it's in relative mode at that point. None of the g-code I looked at has a Z15 movement, other than the Pause at Height change on 2 models. So I'm at a loss.

     

    Where do I place the modified script? I ran a search and found pauseAtZ.py and tweakAtZ.py but don't see the other 6 post-processing scripts listed in Cura 3.3.1

     

    58 minutes ago, b-morgan said:

    I'd be willing to bet those initial Z height changes are coming from the start gcode for your printer. If so, then they are executed before there's anything on the print bed.

     

    The current Pause at Height post processing script, however, isn't very smart and it see's those changes in Z and will insert its gcode into the middle of your printer's start gcode.

     

    I have solved this problem by modifying the script, see below:

     

     

     

  • Link to post
    Share on other sites
    Posted (edited) · Pause At Height - Odd Z Changes

    You are correct, the Z1 and Z15 moves are generated by the post processing script. I'm too old to remember code I modified or wrote a few months ago ?  There is, however, a flaw in the current implementation in that it assumes that the gcode is in absolute XYZ mode (G90) and E absolute (M82). I'll have to see if I can fix that.

     

    Do you know if the gcode with the pause script active is absolute or relative?

     

    The Z1 should be Z(current_z+1) and the Z15 should only appear if the model is still printing layers below 15 (mm if G21 is active). In addition to adding gcode, the script also inserts comments which reveal some of the values the code is working with. The reason for the Z15 is that if the purpose of the pause is to change the filament, there should be some space below the nozzle to work.

     

    The script should go in C:\Program Files\Ultimaker Cura 3.3\plugins\PostProcessingPlugin\scripts (if you used the defaults when you installed Cura). Note that if you just remove the .log from the filename, my script has a unique name.

     

    On my machine, I did find a script in the above directory for every script listed in the Add a script dropdown.

    Edited by b-morgan
  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    I'm running Linux, but the directories are similar, although I don't have a PostProccessingPlugin directory anywhere. I put your script into /usr/share/cura/plugins/, made it executable, then launched Cura and the script didn't show up. So I'll keep working on it to see what I can make happen. Thank you for your help.

     

    30 minutes ago, b-morgan said:

    The script should go in C:\Program Files\Ultimaker Cura 3.3\plugins\PostProcessingPlugin\scripts (if you used the defaults when you installed Cura). Note that if you just remove the .log from the filename, my script has a unique name.

     

    On my machine, I did find a script in the above directory for every script listed in the Add a script dropdown.

     

  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    On linux the script should work located in

    /home/[YOUR_USERNAME]/.local/share/cura/3.3/scripts

     

  • Link to post
    Share on other sites
    Posted (edited) · Pause At Height - Odd Z Changes
    1 hour ago, berndjm said:

    On linux the script should work located in

    /home/[YOUR_USERNAME]/.local/share/cura/3.3/scripts

     

     

    I'm glad somebody knows what they are doing in Linux ?

     

    I have a Linux machine and tried to install Cura but it said "Could not probe OpenGL" ? and I'm not sure how to fix that except that the graphics card (nVidia GeForce 960) should support it (LinuxMint MATE 18.3)

    Edited by b-morgan
  • Link to post
    Share on other sites
    Posted (edited) · Pause At Height - Odd Z Changes

    May some missing opengl related components (e.g. python-opengl ...)

    But to be honest, since they have Cura for linux as an AppImage I save myself the annoyance of outdated or uninstalled versions of any required software components.

    Just start the AppImage and be happy ;-))

    As a "bonus" you can have all the version parallel together without any fear about overwriting something ...

     

    (just for the records: LinuxMint Cinnamon 18.3))

    Edited by berndjm
  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    Great, thank you for that. I saw a lot of Python scripts in ~/.local/ for Cura and I was going to start experimenting with the script in there later but you saved me the trouble.

     

    2 hours ago, berndjm said:

    On linux the script should work located in

    /home/[YOUR_USERNAME]/.local/share/cura/3.3/scripts

     

     

  • Link to post
    Share on other sites
    Posted (edited) · Pause At Height - Odd Z Changes
    40 minutes ago, berndjm said:

    May some missing opengl related components (e.g. python-opengl ...)

    But to be honest, since they have Cura for linux as an AppImage I save myself the annoyance of outdated or uninstalled versions of any required software components.

    Just start the AppImage and be happy ;-))

    As a "bonus" you can have all the version parallel together without any fear about overwriting something ...

     

    (just for the records: LinuxMint Cinnamon 18.3))

     

    I'm not sure what I did "wrong" but my LinuxMint Mate 18.3 gets that error message when I run the AppImage.

     

    I attempted to update my nVidia drivers with a download from nvidia.com but all that did was mess up my Folding @ Home. I also have a Ubuntu install (on a different disk) and the AppImage ran just fine on that.

     

    The /home/[YOUR_USERNAME]/.local/share/cura/3.3/scripts directory was empty so I'm confused about that. Is that directory "appended" to what is stored in the AppImage?

     

    EDIT: To answer my own question... Yes, the contents of that directory are appended to the scripts automagically included in the AppImage.

    Edited by b-morgan
  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes

    Ah, ok, you're using the AppImages. I was a bit missleading that you wrote

    3 hours ago, b-morgan said:

    and tried to install Cura

    ?

    Just of curiosity: is the Ubuntu installation you mentioned on the same pc as your LinuxMint installation?

    If it is, the problem couldn't be the grafic card. There must be some missing opengl related files in your Mint installation which - for whatever reason are present - in the Ubuntu installation ...

     

  • Link to post
    Share on other sites
    Posted (edited) · Pause At Height - Odd Z Changes
    7 hours ago, b-morgan said:

    There is, however, a flaw in the current implementation in that it assumes that the gcode is in absolute XYZ mode (G90) and E absolute (M82). I'll have to see if I can fix that.

     

    I believe I have fixed the script to handle absolute or relative modes (relative E has been minimally tested, relative XYZ code not tested at all). You will have to rename the file to remove the .log extension as that was the only way I could get it to upload here. 

    PauseAtHeightorLayer.py.log

    Edited by b-morgan
  • Link to post
    Share on other sites
    Posted · Pause At Height - Odd Z Changes
    2 hours ago, berndjm said:

    Ah, ok, you're using the AppImages. I was a bit missleading that you wrote

    ?

    Just of curiosity: is the Ubuntu installation you mentioned on the same pc as your LinuxMint installation?

    If it is, the problem couldn't be the grafic card. There must be some missing opengl related files in your Mint installation which - for whatever reason are present - in the Ubuntu installation ...

     

     

    Yes, the Ubuntu installation is on the same PC as the LinuxMint installation, just a different disk. Both installations were "default" installations. They found the graphics card on their own and installed whatever drivers, etc. that the "default" called for.

     

    I'm not to worried about it. The LinuxMint install was primarily so I could install Folding @ Home and keep the graphics card occupied. I'd also use it for doing some Linux experiments from time to time. I have my 3D printer connected to a Raspberry Pi 3B running OctoPrint so that gives me another place to play with Linux. All my serious slicing is done on my Windows 10 desktop.

  • 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 turns 10: A look back
        Ultimaker is turning 10 years old and that means it is story telling time! We'll explore 2010-2014, traveling through the evolution of the business from the Protobox and Ultimaker Original, to the major leaps forward with the Ultimaker 2 and Ultimaker 3.
          • Like
        • 0 replies
      • Ultimaker Transformation Summit
        Visit our virtual showroom and learn more about the Ultimaker ecosystem!
        • 14 replies
      • New here? Register your Ultimaker for free 3D printer onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 0 replies
    ×
    ×
    • Create New...