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. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    The are a number of peculiarities with start up gcode when auto levelling is set in the firmware. For example:

    G28 is not the same as G28 X0 Y0 Zo. You would expect both commands to home all axes - but they are don't.

    With #define Z_SAFE_HOMING set and auto bed levelling set, only the G28 with no parameters will actually home the X, Y and the Z. The G28 first homes X then Y, then the Z is raised while moving to the centre of the bed before moving down to probe for the Z homing position.

    G28 X0 Y0 will home X and Y. But G28 Z0 will not home the Z by itself.


    Before the G29, the X and Y axes must be homed, otherwise the G29 probing fails. Also the firmware completely forgets that X and Y have been homed if the printer is inactive (eg heating a bed/extruder) for more than 60 seconds.

    Another perculiarity to be aware of is if you use G28 gcodes after the G29, the auto bed levelling information will be reset and lost.

    So in the start up gcode it makes sense to do the bed and extruder heating first, then home using G28, then start the auto level probing using G29.

    If you want to home X and Y before the heating to get the extruder out of the way, just use G28 X0 Y0.

    Simple start up gcode would look like

    G28 X0 Y0 ; get extruder out of the way

    ( the bed/extruder heating gcodes)

    G28; Home X and Y, probe for Z home

    (M565 Z?? ; adjust Z offset if required)
    G29; Probe 9 points for auto levelling


    (if needed move extruder to front left and raise Z before starting the print eg G1 X10 Y10 Z10 F5000)
     
    #41 Ziggy, Dec 26, 2014
    Last edited by a moderator: Dec 28, 2014
    5 people like this.
  2. John Burgardt

    John Burgardt New Member

    Joined:
    Jun 13, 2015
    Messages:
    22
    Likes Received:
    3
    Similar problems here too. As Ben R says it happens randomly. I rearranged g-code for awhile then finally just powered off and on again and the z-axis probe seemed to work. When that did not work; I eliminated the extra space between the g29 and g28 commands and things are working again. (too much cut and pasting - who wants to edit g-code anyway?) G-code is gcode and should be very basic. After an hour of restarting several programs because of no Z-probing, it finally probed and laid down a correct layer. What is up with that? I'm using a cura program from Repetier loaded to a SD micro card and running under matter control. As always, any help is appreciated. Maybe just a basic list of bullet proof g-code commands to start a program with ROBO3DR1V3 firmware would be nice. Thx
     
  3. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,277
    Did you start the print from matter control?

    If so, it has a weird "feature" (bug) that if you did a G29 command I guess the software "remembers" the values and keeps those for the session. In order to get a new autolevel sequence you would need to close and reopen mattercontrol.
     
  4. John Burgardt

    John Burgardt New Member

    Joined:
    Jun 13, 2015
    Messages:
    22
    Likes Received:
    3
    Mike, yes; the program was opened and started from the matter control software. I put the printer in a room next door with a 50' USB cable. That works fine for small programs but the larger ones have to run off the card. It is the randomness that is crazy. I'll share any new information if I come across something solid. Thanks again.
     
  5. John Burgardt

    John Burgardt New Member

    Joined:
    Jun 13, 2015
    Messages:
    22
    Likes Received:
    3
    Using Repetier V1.5.0 and cura slicer, i made a new program and saved to SD card. It would not auto level after multiple attempts. I then loaded an older program that worked fine. After studying the code for a few minutes, the only thing different was the G29 command was lower case or "g29". Changing this to upper case worked the first time. I did not G-code was case sensitive. @Mike Kelly

    Thanks again for past and future help. Here is what the code looks like;

    ;Generated with Cura_SteamEngine 15.01
    g21
    M107
    M190 S50 ; set bed temperature
    M104 S195 ; set temperature
    T0
    G28x0y0z0 ; home all axes
    G1 Z5 F5000 ; lift nozzle

    M109 S195 ; wait for temperature to be reached
    G28 X0 Y0 Z0
    M565 Z-.9
    G29
    t0
    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M82 ; use absolute distances for extrusion
    M107
    G0 F9000 X129.73 Y84.25 Z0.30
    G0 X129.73 Y84.25
    G92 E0
    ;Layer count: 34
    ;LAYER:0
    M107
    G0 F9000 X206.326 Y30.878 Z0.300
    ;TYPE:SKIRT
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,914
    Likes Received:
    7,338
    A lot of the firmware versions are case sensitive.
     
  7. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Just an FYI GCode required all codes and parameters be in uppercase. Sometimes you can get away with lowercase as case is not checked in all situations. The latest Marlin firmware (not ROBO, which is still just 1.0.0) has some recent commits this past week to remove all checks for uppercase. So it will be truly case insensitive.
     
  8. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,277
    When in doubt, assume things are case sensitive
     

Share This Page