@jay_s_uk and @deckingman, will have a look at M581 and M669 commands. Both of your help and suggestions much appreciated
Latest posts made by p0rr1dg3
-
RE: Possible to have both high and low endstops for an axis?
-
RE: Possible to have both high and low endstops for an axis?
@jay_s_uk Thanks for that. Haven't gone particularly in depth into advanced Duet topics, so am not sure how I would go about setting endstops up as triggers. Any advice?
-
Possible to have both high and low endstops for an axis?
Hi
Have built a CNC machine which has dual Nema23s on both X and Y axes, and a single Nema 23 on the Z. Am using a Duet 2 Wifi (2.0.2 firmware) to control the machine and it is working fine.
Do have a problem with endstops though, in that can only define an endstop as high or low, and hitting an endstop does not stop subsequent commands. Not an issue with FDM machines where endstops are used in homing to define 0,0,0 (always in the same place) and axis travel extents work because calculated and absolute positions are the same.
With CNC machines however, 0,0,0 is not fixed but is set based on a point on the stock. This means that depending on the axis minima and maxima defined in the config, it is possible to give the machine a move command that exceeds the amount of travel physically available.
For example, my machine has 500x500x120mm travel (XYZ). Minima and maxima are set to -500,-500,-120 and 500,500 and 120 respectively. If my stock 0,0,0 is at 250,250,60 (absolute bed position), I could send G0 X-300 F750 which is within the defined min max limits but which will crash the machine as it tries to travel to absolute -50 X.
Thought endstops would be the answer. As a test, wired two microswitches in parallel and put them on either end of the x axis, and added it to config file using M574. Stops X axis when either switch is triggered, which is fine, but problem is 1) Duet assumes has hit whichever endstop is defined in config (high or low) regardless of actual endstop triggered, and 2) does not stop but will carry on with next move command.
All of this leads to my question - is it possible within the firmware framework to have none, high, low and both options for endstops, the last option using direction of travel to figure out which endstop has been hit, and to have a StopOnEndstopHit flag which would halt further command processing?
Thanks in advance