Jump to content
Ultimaker Community of 3D Printing Experts

Z Axis movement issues with Cura but not with Pronterface


Recommended Posts

Posted · Z Axis movement issues with Cura but not with Pronterface

So, here is my dilemma:

I built my own 3D printer from scratch. Like way all the way from scratch. About a week ago, I flashed the first iteration of Marlin, and have made many improvements.

 

I now have it working well with bed leveling using a Z-probe, homing all axis etc etc. I can move any axis using hard G Code in Pronterface or even through Cura's little "send G Code" box. I have also tested multiple other commands through the week and no issues regarding how the printer responds to the G Code commands (Marlin seems to be working well).

 

The issue comes in to play when I actually print. I would slice a file, hit print, all will go well for the first layer, but then when it is supposed to go to the second layer, the Z-axis does not work (i.e. the z stepper does not turn, but it is enabled). Then the print continues, with Cura assuming the printer has moved up a layer, but it has not. I have tried using something simple to get it to move up in layers quickly such as printing a spiral-sliced file, but no luck, it always stays on the first layer. 

 

When I copy individual command lines from the G Code file, and manually send them to the printer (Through Cura's little box), the printer responds, moves to the correct position as dictated by the command, extruding the filament required, no problem. I.e. I can manually print the entire file by sending command per command, but somehow when I just click print it refuses to move up through layers.

 

Any help would be much appreciated, even if it is just with regards to some weird G Code bug that I should know of or such 🙂

 

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    It has to be something to do with the path planner and jerk and acceleration.

     

    When you do an E and/or X and/or Y move followed by a Z move that is a right-angle turn (in 4 dimensions - E axis is 4th dimension).

     

    1) What is the last movement before the Z move?  E axis?  XY axis?

    2) What is your vmax,jerk,accel settings for the last axis before the Z move and for the Z axis?

     

    As a quick check I would cut all the values for jerk,accel,max accel, vmax in half for the 2 axes involved (Z and the axis before).

     

    Safe values would be 5 for XY jerk, 1000 for XY acceleration, 100 for max V

    And cut those by 5X for Z axis.  These are VERY conservative.

     

     

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    There was a known bug in Marlin about 10 years ago that is probably fixed in your version but possibly not. 

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface
    27 minutes ago, gr5 said:

    It has to be something to do with the path planner and jerk and acceleration.

     

    When you do an E and/or X and/or Y move followed by a Z move that is a right-angle turn (in 4 dimensions - E axis is 4th dimension).

     

    1) What is the last movement before the Z move?  E axis?  XY axis?

    2) What is your vmax,jerk,accel settings for the last axis before the Z move and for the Z axis?

     

    As a quick check I would cut all the values for jerk,accel,max accel, vmax in half for the 2 axes involved (Z and the axis before).

     

    Safe values would be 5 for XY jerk, 1000 for XY acceleration, 100 for max V

    And cut those by 5X for Z axis.  These are VERY conservative.

     

     

    I read through some old forum posts and saw that can cause issues, so I have had my jerk/acc off, but the problem persists...

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    NO!!!  You misunderstand.  🙂

     

    When you build a new printer from scratch and install Marlin, part of the setup is to set all these values: accel, jerk, maxv, max_accel and for all 4 axes.

     

    I think you set some of them too high.

     

    You can't turn these off on the printer.  They are mandatory or the printer won't function at all.  It won't move.

     

    Let me summarize your question in my own way:

     

    "When I try to run gcodes slowly with 100ms or more between them, they work fine.  When I blast them out to the printer full speed, the Z axis doesn't move"

     

    Sounds to me like an issue with jerk/accel settings. Also note that there is a bug in cura for some machines where it sets the speed too fast.  Look for F values set to the speed of light (that's the cura default believe it or not if not specified in the machine settings) in the gcode.

     

    Also maybe you have too few steps/mm for the Z axis such that it won't move less than 0.2mm at a time.  Wild guess.

     

     

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface
    37 minutes ago, gr5 said:

    NO!!!  You misunderstand.  🙂

     

    When you build a new printer from scratch and install Marlin, part of the setup is to set all these values: accel, jerk, maxv, max_accel and for all 4 axes.

     

    I think you set some of them too high.

     

    You can't turn these off on the printer.  They are mandatory or the printer won't function at all.  It won't move.

     

    Let me summarize your question in my own way:

     

    "When I try to run gcodes slowly with 100ms or more between them, they work fine.  When I blast them out to the printer full speed, the Z axis doesn't move"

     

    Sounds to me like an issue with jerk/accel settings. Also note that there is a bug in cura for some machines where it sets the speed too fast.  Look for F values set to the speed of light (that's the cura default believe it or not if not specified in the machine settings) in the gcode.

     

    Also maybe you have too few steps/mm for the Z axis such that it won't move less than 0.2mm at a time.  Wild guess.

     

     

    Ohhh I think I understand now, I will go have a look at the settings that I have set up in Marlin and change them. Thank you, I will update the post if the problem has been solved 🙂

     

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface
    1 hour ago, Jono12323549523uiaeksafdksaf said:

    Ohhh I think I understand now, I will go have a look at the settings that I have set up in Marlin and change them. Thank you, I will update the post if the problem has been solved 🙂

     

    It still does not want to work 😞

    I don't understand how when I manually send the commands they are ok, but when Cura sends them over USB, everything works except the Z_axis

     

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    How many steps/mm do you have for the Z axis?  How far is it moving the Z axis from first to second layer?

     

    What level of substepping do you have?

     

    What is the feedrate (F command) when it moves the Z axis?  (maybe paste here the exact gcode that has the Z position and the nearest F command before that and everything between).

    • Like 1
    Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    So, update: I finally got it moving up. Attached is a picture of the print, which is a single print on a box as a bed since I want to be able to quickly remove the bed if something goes wrong (also please ignore the fact that I am printing on paper lol). So here is what I find happens:

     

    The print starts by heating the nozzle, then finding home through G28. Then heads to the starting point which is correctly about 0.4mm off the bed as I intended the layer heights to be. It starts printing, moving only the X and Y axes, and not moving the Z at all (I can easily visually watch the Z axis steppers and they do not turn a bit). Then at some point in the print (seems at about 50%) the controller (an Arduino Mega 2560) decides that the Z axis can now start moving up, and then the print finishes the rest perfectly.

     

    In the attached image, the first two (kind of 2 dimensional) squares are what was supposed to be the first half of the (spiralized - to magnify the issue) calibration cube. I would keep sliding up the box on which it is printing to keep the nozzle from clogging up.

     

    So what my guess is that the controller thinks that where the G code wants to go is somehow out of the allowable bounds of the print volume, and therefore does not move, since it thinks that it is on the bed and the target is lower than the bed. Then when the target z coordinate is high enough, it starts to allow the z axis to move up...

     

    I do now know Marlin nearly enough to know where to start looking for issues, so any help would be much appreciated 🙂

    WhatsApp Image 2020-09-22 at 21.52.24.jpeg

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    Oh my...

     

    I think I may have found the issue in the config file... I found that currently this is set:

     

    "#define Z_MIN_POS 10"

     

    so I think that is probably the problem... recompiling and flashing now to see if it is fixed 

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    That fixed it. It is now printing, and well too 🙂 🙂 🙂

     

    • Like 2
    Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    Hi there,

     

    Congratulation with a brand new -self made printer that is working.. 🙂

    Well done.

     

    Thanks

    Torgeir

  • Link to post
    Share on other sites
    Posted · Z Axis movement issues with Cura but not with Pronterface

    You could have caught this issue in pronterface!  I thought you said you had tried the same commands through pronterface.  lol.

  • 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
    ×
    ×
    • Create New...