M666 Not working (Solved)

Hello,

I’m a bit lost with the dual endstop squaring thing. I downloaded the two Marlin zips that mentions Dual Endstop and Ramps from this link: https://github.com/Allted/Marlin

I can’t see what is the difference between them, so I tried both.

 

When I send M119 it shows that x_min, x2_min, etc are opened. I checked one by one and they change to Triggered when I touch them. So to that point it seems ok to me.

Then I send a M666 and nothing happens. Nothing gets back. So I try homing with G28 X Y but the motors don’t stop when they reach the first endstop, so I have to disconnect the machine.

Is the dual endstop squaring firmware working? What could be wrong with mine? Sorry for my poor english, I hope you understand (:

Hmmm. I haven’t actually tried M666. I know Ryan did at some point.

Does M119 show the x_min and x_max endstops too?

Have you tried just one axis at a time (G28 X)?

I would have guessed that it wasn’t configured for dual endstops, but you’ve got x2_min in M119 so… Not sure…

Did you get the version from Ryan that had the Configuration_adv.h set by him, or did you set the params yourself? The branch dropdown should show you versions like MPCNC_Ramps_T8_16T_LCD_32step_DualEndstop which is configured for ramps/t*/16T/etc.

1 Like

The only guess I could make is that you’ve got dual_endstops enabled and not dual_motors. But that doesn’t completely explain it.

1 Like

I tried both, MPCNC_Ramps_T8_16T_LCD_32Step_DualEndstop and MPCNC_T8_16T_Ramps_LCD_32Step_DualEndstop (weird little difference). Both are in the link I posted. I only changed the steps, I’m using 20T pulleys so instead of 200 I use 160.

 

When I do M119 it only shows x_min, x2_min, y_min, y2_min and z_min. And I tried G28 X too, it keeps pushing with both motors when it hits first endstop. Maybe the Dual Endstop option is not “finished” in those build I downloaded. I thought the squaring thing was already working since I saw the post in the “front” page.

 

Thanks for your answer :wink:

This is the firmware currently on my machine: https://www.dropbox.com/s/44ay1kppuda8o4v/Marlin%202.zip?dl=0

 

I couldn’t compile (long path name error) so I deactivated the LCD (I have not a LCD on my machine) and the thing worked, it has to do with the U8gLib I think. I changed steps per revolution to suit my 20T pulleys and deactivated an option that shut down my steppers after a few seconds of use, so my Kress 1050 (heavy thing) always ended sinking on the spoilboard in the middle of a program by its own weight.

It has been tested, and reviewed by several folks. It is not stable though, so it’s not like there are 1000 people using it.

Did you have it running with just a single endstop?

What board are you using, ramps or full rambo?

Sounds like m119 is correct, and when you hit home it goes towards the endstops?

Do you have both x endstops on the x axis not the y? ( I have screwed this up twice)

Also the Standard X goes with Xmin endstop, the E0 (x) goes with the Xmax endstop.

There is no reason it should not work.

1 Like

Two files that are that similar, use the most recent/current one. I will looking into that ASAP.

1 Like

I’m using Ramps. I checked the endstops manually first, x_min goes with the closest endstop (to me) on X axis and x_max goes with the other. Same for the Y axis.

 

I will make another try today after work. Thanks!

So… I’m trying right now… the problem was what you said to me T_T

The endstops where ‘related’ to the furthest stepper. I changed the plugs: x_min to x_max and x_max to x_min, same for the Y axis. G28 X Y and it works right.

Now I’m gonna try the M666 offset thing. I’ll post here if I can make it work or not. Thank you again :wink:

M666 is just a test, you have to change the number in the firmware to make it stick once you get it perfect.

When you draw a large square 100mm or larger (bigger the better) how far off are your diagonal measurements?

To test it you use “M666 X0.7” That would offset your X2 o.7mm from the endstop.

1 Like

It’s supposed to save in the EEPROM if you do the M500, or whatever the command is to save EEPROM settings. It will be reset when you flash, but it should stay in place through resets/power cycles.

Oh nice, thanks Heffe. I wasn’t sure so I didn’t want to say anything.

  • Not tested :slight_smile:

It’s good advice to put it in the config as soon as you get it though. I always make great adjustments to my printer, and don’t write them down or put them in the config, and then when I change the firmware for some reason, they disappear. #firstworldproblems.

I’ve done a 550mm square, one diagonal is 864mm and the other 857mm. So 7mm off aprox (measuring tape…). But I’ve tried several M666 commands and it seems to do nothing, I’ll try chaging it in the firmware directly.

 

The machine still do weird things, sometimes I send G28 X and it does the right thing, move to the endstops on X axis, at other times I send G28 X and the Z axis starts going up until I have to disconnect the power… And I expected to use G28 to square it and then use G92 as I’ve always been using to set my zero. But when I use G92 with this firmware things just go crazy.

 

This life is so hard… I’ll keep trying tomorrow :’(

 

EDIT: I’ve measured the square too, it couldn’t be 550mm. It is 607mm each side so my steps calculations must be wrong too T_T Maybe I smash the thing and make a ZenXY…

No, m666 works.

Try something like m666 X10. That would verify the function.

1 Like

You can also physically move the endstops, you do not have to use m666.

Your numbers are not even close to right, a 550mm square should have 777.8mm diagonals.

Can you verify 100mm is 100mm in the X and Y axis?

1 Like

Ok, I did a 100mm square and this is the result: https://drive.google.com/file/d/1RuUSVXqzvEEh15nnzjFZO6vBrU-Y6E7-/view?usp=sharing

100mm seems to be 100mm in both axis, diagonals a bit different so the error when I do a bigger thing should be bigger?

Are you happy with that? I would be, could you get it better, maybe.

If you are not you should let us have a peak at your pen mount, to get it more accurate than that we have to make sure the pen is not adding to the error.

 

 

1 Like

First off, accuracy above the point you are at is pretty nuts.

If you want to try and take it further for some reason, for this sort of thing now that you have a 100mm base line, do a square as large as you can fit in your machine. Then compare, like is teh X line still 0.2mm longer (that would suggest pen mount wobble not machine inaccuracy). Doing a full sized one will now reveal a lot more about the build.

1 Like