Дом вроде получился. Но когда каретки, стол доезжают до концевиков, прижимая их, каждый из шаговиков докручивает каретки и стол очень медленно в сторону концевиков, когда все и так до упора(??). И уже затем стол и каретки отъезжают от них на заданное расстояние (1мм). Так должно быть, или это что?
Сначала по Z быстрый поиск, после нахождения концевика отскок и снова поиск только медленнее. Далее отскок на расстояние указанное в $27. Потом тоже самое по X и Y только одновременно.
// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
// an axis is omitted from the defines, it will not home, nor will the system update its position.
// Meaning that this allows for users with non-standard cartesian machines, such as a lathe (x then z,
// with no y), to configure the homing cycle behavior to their needs.
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same
// cycle, but this requires some pin settings changes in cpu_map.h file. For example, the default homing
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
// may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all three axes
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
// will not be affected by pin sharing.
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
#define HOMING_CYCLE_0 (1<<Z_AXIS) // REQUIRED: First move Z to clear workspace.
#define HOMING_CYCLE_1
1<<X_AXIS)|(1<<Y_AXIS
// OPTIONAL: Then move X,Y at the same time.