gcode for dual steppers

Hey there,

I succesfully set up my dual endstop config. What i am wondering is, how it is possible to set the offset for X2 / Y2.

With M666 X2 I set the offset off stepper X1 to 2mm.

When I just send M666 it schows me the offsets of X2 and Y2 and they are at 0.

Is there a code to move just stepper X2 / Y2?

So my questions are:

  • How can I set the offset to stepper X2 / Y2
  • Can I move just X2 / Y2
  • How can I display the actual offsets of X1 / Y1
Thanks!

Well, offsetting 2mm or more is done by moving the stop block, any less you can see the code on the dual endstop page. Once you find the right code you have the choice of baking it into your Gcode of re-flashing the firmware.

Yeah, I know that. My question is if there is a code to set an offset for the X2 stepper motor. Something like “M666 X2:value” or that kind, since M666 shows me the offsets of X2 and Y2. I am asking because I fixed the endstops on the rails and need to have the offset at X2 because I cant set a nagative offset on X1.

I think there must be some code to move the single steppers because the firmware is also able to do it for the offset.

Ohhh specifically for X or Y -2-. Never tried, I don’t have mine hard mounted so I make sure X or Y 1 needs the positive offset. Give M666 x2 1 a shot let me know if it works. the docs have little info about it.

Tried that already. Did not work.

I think one solution is to set “#define X_MAX_POS” to the needed offset since it is the endstop for stepper X2. Will try that tomorrow.

I think you could swap X and X2 at the control board. You’ll probably want to flip the connectors 180 degrees around to keep the motion the same.

1 Like

Good idea… and don’t forget the endstops need to match.

I’m just getting into this myself. If things are working as I suspect they are, then you should only have to specify one offset, not both. If you find that you need to move the X2 stepper, then you probably should move the X2 stop block 1 tooth (2mm) away from the corner and modify the software offset on X1 to square things back up. Alternatively, provided you have room to move the X1 stop block 1 tooth towards the corner, you would accomplish the same end result. You should only ever have to offset one side of the gantry to square things back up.

Hopefully my understanding is correct and I haven’t just confused things even more.

That is how it usually works Kyle, but Sami used some other sort of stop that is fixed for some reason.

I don’t know how I missed that point, but sure enough, there it is. That makes more sense then.