1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Solved Z-Axis Auto Leveling Routine Inconsistantly Starting

Discussion in 'Troubleshooting' started by Tanbam, Dec 20, 2014.

  1. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    I've had my new printer for a few days and have a good success rate with my first prints, but I'm getting rather confused by the autoleveling routine.

    I'm not using the software autoleveling, I'm using the 9-point routine.

    Most of the time, the autolevel happens before each print, but sometimes it skips it and just starts printing. When that happens, the skirt is placed down smashed on one side and very loose on the other. In order to get the printer to level again is to turn it off, unplug the USB port, and reboot the computer.

    Is there something that I'm doing wrong that prevents the routine from taking place before every print job?

    FIX: The solution is to move the extruder temperature heat command (M109) to the top of the Start G-Code list.

    For some reason with the current firmware, waiting for the bed/extruder to heat up causes the bed probing to fail. The bed probe seemed intermittent to me because sometimes I manually preheat, and sometimes I do not.
     
    #1 Tanbam, Dec 20, 2014
    Last edited by a moderator: Dec 23, 2014
    2 people like this.
  2. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    If there is a G29 gcode in your start code, the printer should always do the 9 point routine.

    Suggest you check your start gcode and post it here to make sure it is right.
     
  3. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Here's my start gcode:

    G28 ; home all axes
    G1 Z5 F5000 ; lift nozzle
    M109 S[temperature] ; set the extruder temp and wait
    G28 Z0 ; Home Z again in case there was filament on nozzle
    M565 Z0
    G29 ; probe the bed

    G29 is there, but for some reason, it doesn't always take. It's rather frustrating, because the prints come out very well if it happens at the start. I've let it go when it doesn't but the print usually doesn't make it past the first couple of layers.

    It started happening again after I posted, and even rebooting the computer, unplugging the cable, and cycling the power on the printer wasn't making it do the 9-point autolevel. After a few attempts, it finally did it, and I was able to start the print that I was working on.

    I'm going to put another instance of G29 at the end, to see if it might catch on the second one...
     
  4. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Are you sure the "problem" is not just the printer waiting for the M109 temperature to get to the right value?

    Suggest you create a test gcode file like this and just run it as a print.

    G21 ; milimeters
    G90 ; absolute coords
    G1 Z10
    G28 ; Home all axes
    G1 Z5 F5000
    M565 Z0
    G29 ; probe bed
    G1 Z5.00 F5000 ; get ready to move
    G1 X100 Y110 F5000 ; move to centre
    G1 Z0.3


    At the end the extruder should be at the centre of the bed exactly 0.3mm above the bed. If it isn't go back and adjust the M565 Z???? value until it is at the right height.

    If this does not work reliably then you may have a wrong firmware version.
     
    #4 Ziggy, Dec 20, 2014
    Last edited by a moderator: Dec 20, 2014
  5. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    I'm not sure how to check my firmware version, but MatterControl prompted me to update the firmware when I started it up earlier this week. It says in the bottom-right corner that it's latest version.

    I'm pretty sure that it's not waiting for the temperature to come up. There are two, distinct start patterns that I'm seeing. When it's working, it follows this routine:
    1. All three axis go to the home position
    2. Bed begins to heat
    3. Home positions are maintained until the bed comes up to temperature
    4. As soon as bed temp target is reached, the extruder begins heating and moves to the center position, then touches the bed and raises up
    5. When extruder reaches it's temp target, the extruder raises and lowers to the bed again
    6. The 9-position autolevel begins
    7. Printing begins and usually is completed barring any other issues.
    Occasionally, when I start a new print, the printer follows steps 1-4 then jumps right to 7, skipping 5 & 6, as soon as the extruder reaches temperature, then my prints are jacked because the Z-axis doesn't move at all unless it is moving to the next layer. There is no leveling being done at all.

    When this is happening, I don't know how to force the machine to "reset" and start the bed probe commands again. At first, I thought I could unplug everything and turn it all off, but that doesn't seem to reliably kick it back into shape. It'll keep doing that, then out of the blue, it will start the 9-point search again on a new print.

    I've removed the part out of the queue and re-sliced it, to see if it was something in that code, but that doesn't make a difference, either.

    I've added the second G29 command, and each time I've tried it since, it's done a double-bed probe, but the extra time it takes doing that twice is a lot less than the time spent pulling up all of the bad plastic and starting over...
     
  6. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Strange because there is no gcode in your startup gcode which is heating the bed(ie step 2). The M109 S??? is only setting the extruder temperature.

    Have you looked at the actual print gcode file just using a text editor? Have a look just to be sure it matches your start gcode.

    Can you post the actual gcode at the start of the print gcode file.

    Another question are you using mattercontrol or repetier?
     
  7. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Thanks a lot for helping me out with this.

    Here's the start of my gcode for the print I just ran. The machine is back in the skip-autoleveling mode.

    ; Generated with MatterSlice 1.0
    ; filamentDiameter = 1.75
    ; extrusionWidth = 0.4
    ; firstLayerExtrusionWidth = 0.6
    ; layerThickness = 0.2
    ; firstLayerThickness = 0.3
    ; automatic settings before start_gcode
    G21 ; set units to millimeters
    M107 ; fan off
    M190 S50 ; wait for bed temperature to be reached
    M104 T0 S210 ; wait for extruder 1 temperature
    T0 ; set the active extruder to 0
    ; settings from start_gcode
    G28 ; home all axes
    G1 Z5 F5000 ; lift nozzle
    M109 S210 ; set the extruder temp and wait
    G28 Z0 ; Home Z again in case there was filament on nozzle
    M565 Z0
    G29 ; probe the bed
    G29 ; probe the bed again
    ; automatic settings after start_gcode
    T0 ; set the active extruder to 0
    G90 ; use absolute coordinates
    G92 E0 ; reset the expected extruder position
    M82 ; use absolute distance for extrusion
    ; Layer count: 1
    ; LAYER:0
    M107
    G0 F9000 X134.20 Y147.20 Z1.00
    G0 X134.20 Y147.20
    ; TYPE:SKIRT
    G1
    It appears that there is a bed temp set, M190, that happens before the extruder, as I'd noticed. There are also the two G29 commands, which are not being performed.

    It's very strange, because everything else seems to be working.
     
  8. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    The start gcode in the file looks completely normal.

    It is possible that

    1) the line "G28 Z0 ; Home Z again in case there was filament on nozzle" is screwing things up - but not very likely.

    2) the M565 Z0 is causing problems. There are versions of the Robo firmware where this function is NOT implemented. Maybe, just maybe that is the problem.

    As both of these gcode lines are not essential (ie another G28 Z0 should not be required and M565 Z0 does not change the z offest) I suggest you comment both lines out using a semicolon eg


    G1 Z5 F5000 ; lift nozzle
    M109 S210 ; set the extruder temp and wait
    ; G28 Z0 ; Home Z again in case there was filament on nozzle
    ; M565 Z0
    G29 ; probe the bed
    G29 ; probe the bed again

    If the printer then behaves normally then we can narrow which line is the problem.
     
  9. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Commented out the lines; no bed probe :(
     
  10. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Can you try this gcode as a simple print file (same as I posted above)

    G21 ; milimeters
    G90 ; absolute coords
    G1 Z10
    G28 ; Home all axes
    G1 Z5 F5000
    M565 Z0
    G29 ; probe bed
    G1 Z5.00 F5000 ; get ready to move
    G1 X100 Y110 F5000 ; move to centre
    G1 Z0.3

    This code should work 100% reliably
     
  11. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    I'll give it a shot tomorrow, as soon as it gets back into the "skip" mode. I started a 3-hour job, since it's currently working right.

    Very odd. I do a lot of automation at work, and these situations are the worst, kind of like some kind of race condition. Almost certainly caused by a software bug.

    I might try to reload the firmware, on the extremely unlikely possibility that something's wonky.

    I'll let you know how it goes, and I appreciate the help. I'm loving the printer - when it behaves! I still need to learn some tricks, like how to print tall, thin objects. They go fine when they're printing layers with other things, but as soon as they're the only one left, they start warping. I'm sure it's because they get too hot, so I've got to figure out some way to keep it from happening, besides making extra copies on the same print! Maybe a better fan?
     
  12. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    OK. If the test code I posted is not reliable on your Robo then it has to be a firmware issue. Unlikely to be a bug - more likely wrong version or upload screwup..

    @Mike Kelly will be able to point you to the correct version for you Robo model.
     
    2 people like this.
  13. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Alright, I've flashed the printer with the latest firmware on the Firmware page. MatterControl says there is an update available, but that's the one that I'd been using that has the weirdness. If this one works better, I'll just ignore the update notifications unless I hear that there's a better one released.

    I'll post if this solves my problem or not.
     
  14. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Even with the latest firmware from the Robo3D page and Ziggy's simple gcode, I'm still getting the weird problem of the bed probe being skipped.

    I'm not sure what's causing it, because when it's in that mode and I'm sending G29 commands during the terminal, it goes through the routine just fine. I don't know why it is skipped during the actual print gcode, and even when I load a gcode file that worked once, it still gets skipped when it gets in that mode.

    In any case, I've done so much tweaking and leveling that even when it's skipping the G29 instruction, it's now pretty straight, only slightly smooshing the first layer a bit more than normal, and I can still get a good print out of it. I'm pretty convinced that it's some software/firmware/hardware issue that is particular to my machine or computer. I see this enough at work, where code written on one computer simply won't work right on another exact setup. Sometimes you find the problem, and sometimes you don't.

    I'm just going to chalk this up to what you sometimes get from an inexpensive printer, I guess. I've got it tuned in pretty well, and I've been printing ABS like a madman. I must have gotten the magic spool, because with only Suave Max Hold hairspray on the heated glass, I've been getting perfect adhesion and almost textbook prints. With these results, I can easily work past the G29 problem. I want to calibrate my extruder next and see if I can squeeze a little more performance out of it, but overall, I'm very pleased with the printer.
     
  15. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Do you have G29 in your startup gcode
     
  16. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    Yep, even put it in again for good measure, and when it works, it does it twice as expected.

    It usually - but not always - works the very first time I turn on they system for the day.

    For example, I'll load up the 300microndisk file and start the print. The G29 code is executed on the machine, and I get a perfect print. When it's done, I can print the very same file again, and there's a 50/50 chance that it will either do the G29 again or not on the subsequent print. I can use the exact same code or slice another, but it won't do any more automated G29s until it decides it wants to again. Every time I manually send G29, it works, even when it's misbehaving.

    I was hoping that the printer was just keeping the G29 settings saved, but when it prints without it, the z-axis is dead steady when printing the layers. Before I got things manually leveled, it would result in disastrous prints. Now, at least, I can get a useable print, but the first layer is much nicer when the G29 is executed.
     
  17. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,276
    Are you loading Gcodes or STLs?
     
  18. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Can I just check you have run the test "print" file I posted above and it is still unreliable?

    If so..

    It is possible that it is the control software on your PC causing the problem.

    I assume you are using MatterControl on windows? When the G29 fails, copy the log file covering the print start through to the first layers of the print and post/upload here.

    There has to be a reason for this strange behaviour. To my knowledge no one else with a Robo has reported a problem like this. I am sure the problem can be found and fixed - but we need to tackle it systematically step by step.
     
    #18 Ziggy, Dec 22, 2014
    Last edited by a moderator: Dec 22, 2014
  19. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    I copied the terminal output from two consecutive prints using the same gcode. The first time it didn't do the G29, but it did the second time. I noticed a couple of differences between the two, but I don't know how to interpret them.

    Excerpt from the "good" print:

    <-T:235.1 E:0 W:2
    <-T:235.1 E:0 W:1
    <-T:235.2 E:0 W:0
    <-ok
    ->N12 G28 Z0*106
    <-ok
    ->N13 M114*21
    <-X:120.00 Y:127.00 Z:0.00 E:121.99 Count X: 120.00 Y:127.00 Z:0.00
    <-ok
    ->N14 M105*18
    <-ok T:235.4 /235.0 B:80.9 /80.0 T0:235.4 /235.0 @:74 B@:0
    ->N15 M565 Z0*91
    <-ok
    ->N16 G29*37
    <-Bed x: 15.00 y: 20.00 z: -0.00
    <-Bed x: 107.00 y: 20.00 z: 0.11
    <-Bed x: 199.00 y: 20.00 z: 0.18
    <-Bed x: 200.00 y: 130.00 z: 0.11
    <-Bed x: 108.00 y: 130.00 z: -0.02
    <-Bed x: 16.00 y: 130.00 z: -0.27
    <-Bed x: 15.00 y: 240.00 z: -0.04
    <-Bed x: 107.00 y: 240.00 z: 0.13
    <-Bed x: 199.00 y: 240.00 z: 0.33
    <-Eqn coefficients: a: 0.00 b: 0.00 d: -0.15
    <-planeNormal x: -0.00 y: -0.00 z: 1.00
    <-ok
    <-echo:endstops hit: Z:0.34
    ->N17 M105*17​

    Excerpt from the "bad" print:

    <-T:235.0 E:0 W:2
    <-T:235.0 E:0 W:1
    <-T:235.0 E:0 W:0
    <-ok
    ->N14 G28 Z0*108
    <-echo:Home X/Y before Z
    <-ok
    ->N15 M114*19
    <-X:120.00 Y:127.00 Z:5.00 E:121.99 Count X: 120.00 Y:127.00 Z:5.00
    <-ok
    ->N16 M105*16
    <-ok T:235.0 /235.0 B:80.3 /80.0 T0:235.0 /235.0 @:74 B@:0
    ->N17 M565 Z0*89
    <-ok
    ->N18 G29*43
    <-echo:Home X/Y before Z
    <-ok
    ->N19 T0*2
    It looks like something in the printer is preventing the G29 from being executed, and returning "-echo:Home X/Y before Z" to the computer. I'm sure it's an important clue, but I'm not sure how to get past it. Perhaps I can adjust the order in which the start code is written to make it work?
     
  20. Tanbam

    Tanbam Member

    Joined:
    Dec 20, 2014
    Messages:
    84
    Likes Received:
    28
    I added a new G28 command before the second z-drop. I'll see if it seems to work better.
     

Share This Page