SOLVED Different Leveling Code

Discussion in 'Calibration, Help, and Troubleshooting' started by xreymason, Mar 12, 2016.

  1. xreymason

    xreymason Member

    Joined:
    Mar 1, 2016
    Messages:
    16
    Likes Received:
    0
    What's the Gcode command to check the IR Sensors height? I like coding so I thought I'd give it a go to make a program that will make it so the IR sensor gets moved to 3 particular spots starting at the center point, checks the sensor then moves over to 1 side and continually checks the sensor until it matches the center points height, then moves all the way to the other side and continually measures that until it matches the opposite ends height. Then it should repeat checking both sides until it finds that they match each other. Thought it might be a good idea since I know that 1 issue I've been having is that my bed isn't level on the lead screws. I also wouldn't mind hearing others more experienced input on the matter.

    So far,
    M190 S0 ; set bed temperature
    M104 S0 ; set temperature
    G28 ; home all axes
    G1 Z5 ; lift nozzle
    ;read IR HERE
    M117 Z ; show IR center value
    G1 X0 Y100 ; Move IR to X0 Y100 Z???
    ;loop section<
    ;read IR HERE
    M117 Z ; show IR left value
    ;>until IR left value = center value
     
  2. goose117

    goose117 Member

    Joined:
    Sep 5, 2015
    Messages:
    22
    Likes Received:
    13
    Give G30 a try, It should report back the Height at what ever coordinate you are at. I haven't tried it with the big box.


    http://reprap.org/wiki/G-code
     

Share This Page