Close



Page 26 of 65 FirstFirst ... 16242526272836 ... LastLast
Results 251 to 260 of 757

Hybrid View

  1. #1
    Student DjWang's Avatar
    Join Date
    Sep 2014
    Location
    Canada
    Posts
    10
    Add DjWang on Thingiverse
    Quote Originally Posted by DarkAlchemist View Post
    Well, here is something I have been wondering about for a while now but what is the purpose behind raising and lowering the arm between each probing? I see absolutely no reason for it and on a delta printer it doesn't do that. Makes very little sense to me to keep raising and lowering the arm/switch between probings when you can just lower the arm (before probing the first point), keep everything else the same, and after the last point is measured raise the arm.
    I couldn't find it in this post but did come across this on: http://forums.reprap.org/read.php?151,246132,page=11

    Regpye: Find this code block in the G29 command. If you replace it with the slightly modified version, the probe will only kick down at the start and then retract at the very end. That is better from a repeatability perspective because you only get the probe positioning error once, not once per probed point.



    for (double yProbe=FRONT_PROBE_BED_POSITION; yProbe <= BACK_PROBE_BED_POSITION+.001 /* incase of round off errors */ ; yProbe += yGridSpacing)
    {
    double xProbe, xInc;
    if (zig)
    {
    xProbe = LEFT_PROBE_BED_POSITION;
    //xEnd = RIGHT_PROBE_BED_POSITION;
    xInc = xGridSpacing;
    zig = false;
    } else // zag
    {
    xProbe = RIGHT_PROBE_BED_POSITION;
    //xEnd = LEFT_PROBE_BED_POSITION;
    xInc = -xGridSpacing;
    zig = true;
    }

    for (int xCount=0; xCount < ACCURATE_BED_LEVELING_POINTS; xCount++)
    {
    if (probePointCounter == 0)
    {
    // raise before probing
    do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BEFORE_PROBING);
    engage_z_probe(); // EDN wants the probe to only kick down once, so we do it
    // before we start the probe loop.
    } else
    {
    // raise extruder
    do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
    }

    do_blocking_move_to(xProbe - X_PROBE_OFFSET_FROM_EXTRUDER, yProbe - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);

    // engage_z_probe(); // Engage Z Servo endstop if available
    run_z_probe();
    eqnBVector[probePointCounter] = current_position[Z_AXIS];
    // retract_z_probe();

    eqnAMatrix[probePointCounter + 0*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELI NG_POINTS] = xProbe;
    eqnAMatrix[probePointCounter + 1*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELI NG_POINTS] = yProbe;
    eqnAMatrix[probePointCounter + 2*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELI NG_POINTS] = 1;
    probePointCounter++;
    xProbe += xInc;
    }
    }
    retract_z_probe(); // EDN moved this to end so we only kick down the probe once
    // and only bring it back up once. This helps the repeatability
    // of the Z-Probe in many implementations.

    clean_up_after_endstop_move();

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Actually... I could be mistaken... But I think that feature is already folded back into the code provided in the very first post of this thread.

    Is this the feature you are talking about?


    • This step is also optional. Because of how some people's Z-Probe is constructed, it is best to raise the nozzle prior to retracting the probe. The Enhanced G29 code handles this circumstance. But as it turns out, the stock G28 command is also guilty of this bad behavior. If you need the G28 command to raise the nozzle prior to retracting the probe, make the following changes in Marlin_Main.cpp :


    Find the following code:
    // Retract Servo endstop if enabled

    #ifdef SERVO_ENDSTOPS
    if (servo_endstops[axis] > -1) {
    servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
    }
    #endif
    #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
    if (axis==Z_AXIS) retract_z_probe();
    #endif
    add these lines of code immediately after the "// Retract Servo endstop if enabled" comment.
    #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
    if (axis==Z_AXIS)
    do_blocking_move_relative(0, 0, Z_RAISE_BEFORE_PROBING);
    #endif

    It should look like this when you have made the change:
    // Retract Servo endstop if enabled
    #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
    if (axis==Z_AXIS)
    do_blocking_move_relative(0, 0, Z_RAISE_BEFORE_PROBING);
    #endif

    #ifdef SERVO_ENDSTOPS
    if (servo_endstops[axis] > -1) {
    servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
    }
    #endif
    #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
    if (axis==Z_AXIS) retract_z_probe();
    #endif
    Last edited by Roxy; 09-11-2014 at 05:55 PM.

  3. #3
    DjWang: That is not the same code but after looking at the newest code it seems the culprit is in probe_pt but I just spotted something of interest:
    if (retract_probe)
    retract_z_probe();
    I need to see if a retract is outside that call but I sure do not like the engage being called each time the routine is used.

    Hmmmm, g29 with an E it makes the retract_flag++ (=1) but I never use G29 E so not sure what is going on.

    perfect as this new code does not retract my Z probe each time but I have to admit I am going to change the engage part of probe_pt so if the retract flag is zip the engage will only happen once as well. No need to tell the servo to deploy more than once as that will make the servo engage and will skew the numbers possibly.

    Both of these changes are in Marlin_Main.cpp

    Go around line 1614 and you will see something like this
    Code:
                  for (int xCount=0; xCount < n_points; xCount++)              {
                    float z_before;
                    if (probePointCounter == 0)
                    {
    changed that to read this way
    Code:
      if (retract_flag == 0)
      engage_z_probe();   // Engage Z Servo endstop if available
    
    
                  for (int xCount=0; xCount < n_points; xCount++)
                  {
                    float z_before;
                    if (probePointCounter == 0)
                    {
    Now go around line 1043 and see this
    Code:
      engage_z_probe();   // Engage Z Servo endstop if available
      run_z_probe();
    and change that to
    Code:
      if (retract_probe)
      engage_z_probe();   // Engage Z Servo endstop if available
    
    
      run_z_probe();
    and you are set.
    Last edited by DarkAlchemist; 09-11-2014 at 09:32 PM.

  4. #4
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by DarkAlchemist View Post
    Well, here is something I have been wondering about for a while now but what is the purpose behind raising and lowering the arm between each probing? I see absolutely no reason for it and on a delta printer it doesn't do that. Makes very little sense to me to keep raising and lowering the arm/switch between probings when you can just lower the arm (before probing the first point), keep everything else the same, and after the last point is measured raise the arm.
    I realize why I didn't immediately know what you meant. You are talking about Engaging and Retracting the Z-Probe and not raising and lowering the nozzle, right?

  5. #5
    Quote Originally Posted by Roxy View Post
    I realize why I didn't immediately know what you meant. You are talking about Engaging and Retracting the Z-Probe and not raising and lowering the nozzle, right?
    Yes, exactly.

  6. #6
    Super Moderator RobH2's Avatar
    Join Date
    Nov 2013
    Location
    Baltimore, MD
    Posts
    897
    Add RobH2 on Thingiverse
    There is a post here that talks about that so you can stop that default action. I know this is a long thread but it's here somewhere. I used it and my arm lowers, takes 9 probes, and then goes up to begin printing.
    Bambu P1S/AMS
    NVision4D http://nvision4d.com

  7. #7
    Quote Originally Posted by RobH2 View Post
    There is a post here that talks about that so you can stop that default action. I know this is a long thread but it's here somewhere. I used it and my arm lowers, takes 9 probes, and then goes up to begin printing.
    Ahhh, so I was right and it really isn't needed? Good to know and my accuracy will go through the roof with it removed (as can be seen with my M48 without the E).

    I wonder what the original intention of that was?

    Thanks.

    edit: Ugh, I have reread the first 16 pages of this thread four times and I am just not seeing it but I do agree with your point from July saying this thread is just too big now.
    Last edited by DarkAlchemist; 09-11-2014 at 11:50 AM.

  8. #8
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by DarkAlchemist View Post
    edit: Ugh, I have reread the first 16 pages of this thread four times and I am just not seeing it but I do agree with your point from July saying this thread is just too big now.
    Yes, Rob is right. This is too long. But it will be months before I can break it up into sub-topics. School is eating up all my time. But if somebody interested in this thread wants to help and break it up into sub-topics, the help would be appreciated.

  9. #9
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by DarkAlchemist View Post
    Well, here is something I have been wondering about for a while now but what is the purpose behind raising and lowering the arm between each probing? I see absolutely no reason for it and on a delta printer it doesn't do that. Makes very little sense to me to keep raising and lowering the arm/switch between probings when you can just lower the arm (before probing the first point), keep everything else the same, and after the last point is measured raise the arm.
    Well... Think about this.... The Auto Bed Leveling code for Marlin was done by somebody truly gifted about a year ago. He coded up the pattern that you are seeing. And certainly, on the surface, it makes sense. Lower the probe until it touches, back off a little bit and re-take the measurement at a slow speed for increased accuracy. And then raise the probe a safe amount and move to the next point. Part of this was he was trying to make the code general purpose so it would work on most people's machine. But a big part of it is he was just trying to get it to work. And once he found a solution to a problem, he moved on to the next show stopper.

    Since then, only a few changes have been made. Marlin doesn't have as many firmware developers as it deserves to have. So... There are going to be things that seem like they should be changed, but not enough people are playing with it to make it happen.

    A good example is this: The original developer obviously did not have a Z-Probe that had to be raised prior to retraction. But a fair number of Marlin users do have this condition. That 'fix' had to be added after the fact. He didn't realize this condition even existed because he never saw it. If he had seen it, none of us would have seen it because it would have been fixed before we got the code.
    Last edited by Roxy; 09-11-2014 at 02:35 PM.

  10. #10
    Technician
    Join Date
    Jun 2014
    Posts
    74
    Roxy- I can't tell you how much I appreciate your code and this thread. It's been a week long adventure getting ABL working on my i3V, and it wouldn't have worked (because of the probe hitting the glass during retract) without your code added. Plus, all the new features you added like topographic maps, etc. I originally decided to implement your code just for the Z raise before retract, but there is a lot more in your code that adds great value, and my prints are so much better now! So just wanted to say thanks and let you know that after many hours getting everything to work my printer's quality has significantly surpassed my expectations. So great job!

    For anyone struggling to get this code change working (I certainly did), stick with it... the results are really worth the effort. And if you're new to any kind of programming like I am, you will learn a ton about how all the code works that creates the magic in the process.

Page 26 of 65 FirstFirst ... 16242526272836 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •