Close



Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 89
  1. #61
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by regpye View Post
    I am able to add some code when slicing to do the lift, that works fine. Just that everyone would have to use this front end code when slicing each part. If using just the G28 it will drag on the bed before homing and that throws all the calculations out a mile.
    I will remove that line and wait for some feedback from you.
    Can you also send your current Marlin_Main.cpp file?

    The easy and nice way to do the lift is using the do_blocking_move() functions. But what I can do is the equivalent with the lower level functions and get that working as it should. And it would be easier to just insert them into your Marlin_Main.cpp file and send that back instead of writing up directions for you to make the change. But until that is done, I guess you can continue testing with the 'Start Up GCode' alterations. I do agree it would be better for your users to not have to use special 'Start Up GCode' ! That is kind of asking for support problems.

  2. #62
    Technician
    Join Date
    Oct 2013
    Location
    South Australia
    Posts
    50
    Quote Originally Posted by Roxy View Post
    Can you also send your current Marlin_Main.cpp file?

    The easy and nice way to do the lift is using the do_blocking_move() functions. But what I can do is the equivalent with the lower level functions and get that working as it should. And it would be easier to just insert them into your Marlin_Main.cpp file and send that back instead of writing up directions for you to make the change. But until that is done, I guess you can continue testing with the 'Start Up GCode' alterations. I do agree it would be better for your users to not have to use special 'Start Up GCode' ! That is kind of asking for support problems.
    Attaching mainMarlin_main.zip

  3. #63
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    It will be a couple days... I'm swamped!

  4. #64
    Technician
    Join Date
    Oct 2013
    Location
    South Australia
    Posts
    50
    Quote Originally Posted by Roxy View Post
    It will be a couple days... I'm swamped!
    Me too, being retired doesn't mean I am not still very busy.

    Would it be possible to have the head return to X0, Y0 at the end of probing?

    That would save me having to do it is the start code as well.

    I took that line of code out and tried it out again.
    The Z does lift, but it lifts after the X and Y have homed instead of before they home.

    Thanks, take your time.
    Last edited by regpye; 05-12-2014 at 07:54 PM. Reason: addition

  5. #65
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    I found a number of things that I think were a problem in your Marlin_Main.cpp. First, in the run_z_probe() function you were missing these lines:

    // we have to let the planner know where we are right now as it is not where we said to go.
    zPosition = st_get_position_mm(Z_AXIS);
    plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS]);

    // move up the retract distance
    zPosition += home_retract_mm(Z_AXIS);
    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
    st_synchronize();

    // move back down slowly to find bed
    feedrate = homing_feedrate[Z_AXIS]/4;
    zPosition -= home_retract_mm(Z_AXIS) * 2;
    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
    st_synchronize();

    I don't think you meant to delete them. But if you did, I put them back in the file so you are going to have to remove them again. These lines are important because when it is trying to touch the bed with the Z-Probe it goes at a higher speed at first, and then once it touches, it backs off and does it again at a slower (and more accurate) speed.

    I actually compiled your modified Marlin_Main.cpp file that I'm sending back to you and loaded it into my printer.

    When you do a G28, you are going to see the nozzle move up, and then move down and up 3 times. This is just to confirm the G28 code is going to raise the nozzle when it starts. After you see it do that... Go to line 1284 and delete the 6 lines of C code that do that. (and of course... Recompile and load it into your board)

    For the G29 stuff... You need to go into your Configuration.h file and set:

    #define AUTO_BED_LEVELING_GRID_POINTS 5

    Is your origin in the front left of the bed? I assume that was where it was and set the G29 to use that as the origin. If this is not true, go to line 1511 of Marlin_Main.cpp and enable the #define for where your origin is. That will setup the Bed Level Topology map so you can see how high or low a given spot is on your bed. (Do a G29 n 4 T)

    When you do the G29 Watch the Z-Probe. After it takes the measurement, it raises. And then it raises again. We might have over done it. And it is possible the problem we were fighting is related to that missing code in the run_z_probe() function. Let me know if you think it is raising twice on your machine. If so, we can pull out the extra lift.

    At the end of the G29 I have it raise the nozzle (and then once again, I think we see the Z go up twice because the retract_z_probe() function is doing it too) and then move it to (x,y) = (100,100). I know you said (x,y) = (0,0) but isn't (100,100) more useful because that is in the center of the bed??? If you really want the nozzle to goto (x,y) = (0,0) you will see the line that makes that happen at line # 1790. However, even if you want it at (0,0) I would encourage you to make it (5,5) because at (0,0) you are going to trigger the X & Y end-stops.

    Also, It was easier to put the M48 Z-Probe_Repeatability code into your Marlin_Main.cpp than to work around it when I was making sure your code compiled. So... If you want to see how accurate your Z-Probe is, just give it a command like: M48 x 100 y 100 n 10 v 4 Or... If you want to stress the X & Y axis while taking measurements give it a M48 x 100 y 100 n 10 v 4 L 6
    Attached Files Attached Files
    Last edited by Roxy; 05-13-2014 at 06:13 PM.

  6. #66
    Technician
    Join Date
    Oct 2013
    Location
    South Australia
    Posts
    50
    Quote Originally Posted by Roxy View Post
    I found a number of things that I think were a problem in your Marlin_Main.cpp. First, in the run_z_probe() function you were missing these lines:

    // we have to let the planner know where we are right now as it is not where we said to go.
    zPosition = st_get_position_mm(Z_AXIS);
    plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS]);

    // move up the retract distance
    zPosition += home_retract_mm(Z_AXIS);
    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
    st_synchronize();

    // move back down slowly to find bed
    feedrate = homing_feedrate[Z_AXIS]/4;
    zPosition -= home_retract_mm(Z_AXIS) * 2;
    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
    st_synchronize();

    I don't think you meant to delete them. But if you did, I put them back in the file so you are going to have to remove them again. These lines are important because when it is trying to touch the bed with the Z-Probe it goes at a higher speed at first, and then once it touches, it backs off and does it again at a slower (and more accurate) speed.

    I actually compiled your modified Marlin_Main.cpp file that I'm sending back to you and loaded it into my printer.

    When you do a G28, you are going to see the nozzle move up, and then move down and up 3 times. This is just to confirm the G28 code is going to raise the nozzle when it starts. After you see it do that... Go to line 1284 and delete the 6 lines of C code that do that. (and of course... Recompile and load it into your board)

    For the G29 stuff... You need to go into your Configuration.h file and set:

    #define AUTO_BED_LEVELING_GRID_POINTS 5

    Is your origin in the front left of the bed? I assume that was where it was and set the G29 to use that as the origin. If this is not true, go to line 1511 of Marlin_Main.cpp and enable the #define for where your origin is. That will setup the Bed Level Topology map so you can see how high or low a given spot is on your bed. (Do a G29 n 4 T)

    When you do the G29 Watch the Z-Probe. After it takes the measurement, it raises. And then it raises again. We might have over done it. And it is possible the problem we were fighting is related to that missing code in the run_z_probe() function. Let me know if you think it is raising twice on your machine. If so, we can pull out the extra lift.

    At the end of the G29 I have it raise the nozzle (and then once again, I think we see the Z go up twice because the retract_z_probe() function is doing it too) and then move it to (x,y) = (100,100). I know you said (x,y) = (0,0) but isn't (100,100) more useful because that is in the center of the bed??? If you really want the nozzle to goto (x,y) = (0,0) you will see the line that makes that happen at line # 1790. However, even if you want it at (0,0) I would encourage you to make it (5,5) because at (0,0) you are going to trigger the X & Y end-stops.

    Also, It was easier to put the M48 Z-Probe_Repeatability code into your Marlin_Main.cpp than to work around it when I was making sure your code compiled. So... If you want to see how accurate your Z-Probe is, just give it a command like: M48 x 100 y 100 n 10 v 4 Or... If you want to stress the X & Y axis while taking measurements give it a M48 x 100 y 100 n 10 v 4 L 6
    Wow! Thanks for all of that, you have been busy. I will give it all a try this morning.
    I have been busy too and have made a build page of one of these little machines that this code will be working on.
    http://regpye.com.au/SmartRap%20builds.html

  7. #67
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by regpye View Post
    Wow! Thanks for all of that, you have been busy. I will give it all a try this morning.
    I have been busy too and have made a build page of one of these little machines that this code will be working on.
    http://regpye.com.au/SmartRap%20builds.html
    Wow! That is a clean design!

    Back to the double raising of the Z-Axis. If you agree it is doing that... Probably we should make the

    #define Z_RAISE_BETWEEN_PROBINGS 2

    The reason is... You only deflect less than 1mm to activate the Z-Probe. Going up a whole bunch is making the double raising too much now that the code (very likely) is getting the nozzle off of the bed after a measurment. But I don't have a machine to test on.
    Last edited by Roxy; 05-13-2014 at 08:38 PM.

  8. #68
    Technician
    Join Date
    Oct 2013
    Location
    South Australia
    Posts
    50
    Quote Originally Posted by Roxy View Post
    Wow! That is a clean design!
    OK, I have done all of that and checked it.
    The G28 second lift (EDIT) is really not needed now as the (EDIT) first lift takes care of the problem we had before.
    I changed the G29 final home to 5x 5 y 2z because I run a routine that sends a length of filament down before starting the print. I like to see a line of filament come out clean before hand.
    Ran all the tests and didn't see any problem except for the second lift when using a G28.
    The machine design really needs a bit more support for the bed axis, too much physical flex at the X positive side. I think I will redesign another machine with wider Y rods so that the support is more even across the bed.


    SENDING:M48 x 100 y 100 n 10 v 4
    M48 Z-Probe Repeatability test. Version 1.85
    Positioning probe for the test.
    1 of 10 z: 1.433000 mean: 1.433000 sigma: 0.000000
    2 of 10 z: 1.493750 mean: 1.463375 sigma: 0.030375
    3 of 10 z: 1.451500 mean: 1.459417 sigma: 0.025425
    4 of 10 z: 1.464750 mean: 1.460750 sigma: 0.022139
    5 of 10 z: 1.440750 mean: 1.456750 sigma: 0.021357
    6 of 10 z: 1.434750 mean: 1.453083 sigma: 0.021150
    7 of 10 z: 1.437750 mean: 1.450893 sigma: 0.020303
    8 of 10 z: 1.439000 mean: 1.449406 sigma: 0.019395
    9 of 10 z: 1.415750 mean: 1.445667 sigma: 0.021124
    10 of 10 z: 1.471500 mean: 1.448250 sigma: 0.021487
    Mean: 1.448250
    Standard Deviation: 0.021487
    echo:endstops hit: Z:-3.53






    SENDING:M48 x 100 y 100 n 10 v 4 L 6
    M48 Z-Probe Repeatability test. Version 1.85
    Positioning probe for the test.
    x: 101.74y: 90.15
    x: 98.54y: 88.09
    x: 96.06y: 89.73
    x: 97.38y: 93.51
    x: 92.78y: 91.70
    1 of 10 z: 1.439000 mean: 1.439000 sigma: 0.000000
    x: 106.50y: 111.26
    x: 110.07y: 109.73
    x: 110.29y: 106.18
    x: 113.81y: 105.86
    x: 112.22y: 104.45
    2 of 10 z: 1.488250 mean: 1.463625 sigma: 0.024625
    x: 89.80y: 104.12
    x: 85.02y: 100.79
    x: 84.41y: 96.40
    x: 83.04y: 89.40
    x: 81.89y: 84.25
    3 of 10 z: 1.490250 mean: 1.472500 sigma: 0.023702
    x: 119.15y: 83.93
    x: 114.34y: 79.52
    x: 111.47y: 83.62
    x: 110.44y: 79.51
    x: 105.26y: 82.79
    4 of 10 z: 1.483000 mean: 1.475125 sigma: 0.021024
    x: 96.87y: 82.27
    x: 94.38y: 86.09
    x: 88.67y: 86.01
    x: 86.42y: 89.77
    x: 83.20y: 93.55
    5 of 10 z: 1.499750 mean: 1.480050 sigma: 0.021228
    x: 102.26y: 112.80
    x: 104.39y: 114.34
    x: 108.33y: 117.08
    x: 112.47y: 114.34
    x: 112.73y: 112.73
    6 of 10 z: 1.611000 mean: 1.501875 sigma: 0.052509
    x: 119.40y: 126.70
    x: 116.78y: 124.87
    x: 110.11y: 125.03
    x: 102.93y: 127.85
    x: 97.82y: 124.90
    7 of 10 z: 1.738250 mean: 1.535643 sigma: 0.095942
    x: 92.02y: 115.01
    x: 87.50y: 112.95
    x: 86.42y: 111.81
    x: 88.86y: 106.70
    x: 88.32y: 105.70
    8 of 10 z: 1.447500 mean: 1.524625 sigma: 0.094361
    x: 89.22y: 92.73
    x: 92.50y: 91.96
    x: 93.71y: 92.23
    x: 94.26y: 91.81
    x: 97.00y: 92.58
    9 of 10 z: 1.450500 mean: 1.516389 sigma: 0.091964
    x: 88.72y: 104.10
    x: 90.17y: 106.88
    x: 91.45y: 106.92
    x: 92.09y: 107.64
    x: 93.19y: 113.37
    10 of 10 z: 1.464500 mean: 1.511200 sigma: 0.088623
    Mean: 1.511200
    Standard Deviation: 0.088623
    echo:endstops hit: Z:-3.54




    SENDING:G29 n 4 T
    Eqn coefficients: a: -0.01 b: -0.00 d: 5.30
    Correct +.14 with one clockwise turn.


    Bed Height Topography:
    +0.75933 +0.21208 --0.36417 --0.93592
    +0.77933 +0.35908 --0.32967 --1.09992
    +0.66358 +0.22008 --0.28592 --0.69142
    +0.85158 +0.50908 --0.14017 --0.50692


    planeNormal x: 0.01 y: 0.00 z: 1.00


    Bed Level Correction Matrix:
    1.00 0.00 -0.01
    0.00 1.00 -0.00
    0.01 0.00 1.00
    echo:endstops hit: Z:-1.57
    Last edited by regpye; 05-13-2014 at 08:28 PM.

  9. #69
    Technician
    Join Date
    Oct 2013
    Location
    South Australia
    Posts
    50
    Quote Originally Posted by Roxy View Post
    Wow! That is a clean design!

    Back to the double raising of the Z-Axis. If you agree it is doing that... Probably we should make the

    #define Z_RAISE_BETWEEN_PROBINGS 2

    The reason is... You only deflect less than 1mm to activate the Z-Probe. Going up a whole bunch is making the double raising too much now that the code (very likely) is getting the nozzle off of the bed after a measurment. But I don't have a machine to test on.
    OK, I will try that first. I am running a test print that will take about 40 minutes and then I will make the change and try again.

  10. #70
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by regpye View Post
    OK, I will try that first. I am running a test print that will take about 40 minutes and then I will make the change and try again.
    And... Depending upon what happens when you bump that down to a 'reasonable' number... You may want to go to the very end of the run_z_probe() function and delete the code we added earlier.

    //SERIAL_PROTOCOLLNPGM( "At end of run_z_probe() raising nozzle." );
    do_blocking_move_relative( 0.0, 0.0, (float) Z_RAISE_BETWEEN_PROBINGS );
    //SERIAL_PROTOCOLLNPGM( "At end of run_z_probe() done raising nozzle." );
    } <---<<< Leave that brace in!

    I think this is why we are getting the double lift. But be ready with your finger on the reset button if you take that line out!!!!

    Looking at your Standard Deviation... Those numbers (.02) are a little bit on the big side. You should still get good prints, but you are getting close to an order of magnitude of your layer height. Oh! I just noticed you did the Z-Probe Standard Deviation both ways. The one that stresses the X & Y axis is concerning. .08 is getting too big in my opinion. The fact you get .02 without X & Y movement implies you have .05mm of slop in the X & Y axis. It is hard to say without the machine in front of me, but somehow moving the X & Y is adding .05mm of slop to the measurement ?????

    On the bed topography. You have 1.5 mm or more slope from left to right. Can that be adjusted out on your design?

    It's bed time for me. With a little luck, I'll get 9 hours of sleep tonight!
    Last edited by Roxy; 05-13-2014 at 09:24 PM.

Page 7 of 9 FirstFirst ... 56789 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
  •