Testing End Stopper and Emergency Push Button
-
Greetings
We are building a Cartesean machine and have completed the testing of the stepper motors on the X, Y, and Z axes via the YAT terminal. Thanks for the support and insights provided.
I would like to test the other devices connected, such as the end stopper, emergency push button, DC motor (known as the feeder motor), and relay.
Is there any documentation for the same?
Request to kindly provide your insights, plz........
I am providing the End Stopper and Emergency Push Button and Feeder Motor G Codes defined in the config.g file as reference,
-
X,Y & Z axis Minima as follows
; Endstops
M574 X1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in
M574 Y1 S1 P"io1.in+io7.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y1 & Y2 via pin io1.in & io7.in
M574 Z1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin io3.in -
X,Y & Z Axis Maxima as follows
; Custom settings are not defined
M950 J4 C"io1.in" ; Configure pin J2 as X Max(High End) Trigger and assign input pin "io1.in"
M581 P4 S1 T4 R0 ; Setup Pin 4 when trigger occurs S1 from NC to NO during any time R0
M950 J5 C"io3.in" ; Configure pin J5 as Y Max(High End) Trigger and assign input pin "io3.in"
M581 P5 S1 T5 R0 ; Setup Pin 5 when trigger occurs S1 from NC to NO during any time R0M950 J6 C"io5.in" ; Configure pin J6 as Z Max(High End) Trigger and assign input pin "io5.in"
M581 P6 S1 T6 R0 ; Setup Pin 6 when trigger occurs S1 from NC to NO during any time R0-
Emergency Push Button as follows (These two commands are placed before the X,Y & Z axes maxima commands)
; Custom settings are not defined
M950 J1 C"io6.in" ; Configure pin J1 as input and assign input pin "io6.in"
M581 P1 T0 S1 R0 ; Setup Pin 1 when trigger occurs S1 from High to Low State during any time R0 -
FEEDER MOTOR (Seperate MACRO Program to switch ON & OFF)
M950 P1 C"out1" Q100 ; Allocate GPIO port 1 to OUT_1 (fan output), 100Hz
M950 P2 C"out2" Q100 ; Allocate GPIO port 2 to OUT_2 (fan output), 100Hz -
RELAY (To switch ON & OFF a torch connected to Relay)
M950 P3 C"out9" ; Allocate GPIO port 3 to OUT_9 (fan output)
-
-
Greetings
This post is with reference to an earlier post under the same heading posted on June 12th.
End Stopper status was checked using the G Code M119 via the YAT Terminal. The status of the same was displayed. But there was a error in it, YAT Terminal displays as X @ MIN, Y @ MIN, Z @ MIN, but as could be seen in the program below, Z is configured for the high end.
X,Y & Z axis Minima as follows
; Endstops
M574 X1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in
M574 Y1 S1 P"io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y1 io1.in
M574 Z1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io3.in- What should be done to get the correct status of End Stopper?
While executing the homing command G28, machine is behaving unexpectedly. For example, if G28 X is sent via YAT Terminal, the Z axis is moved up and down and the X axis is moved by a very small distance. Neither the X nor the Z were traveling until the endstopper was triggered. The same behaviour was observed with G28 Y as well
- How do I home the axes properly via the YAT terminal? Is this due to any data transfer issues or due to the YAT Terminal instead of the DWC Interface?
The other end of the axis end stopper was configured as a trigger in the config.g file. When the trigger was pressed, the following message was displayed: "Macro file trigger 4.g file not found"
; Custom settings are not defined
M950 J4 C"io1.in" ; Configure pin J2 as X Max(High End) Trigger and assign input pin "io1.in"
M581 P4 S1 T4 R0 ; Setup Pin 4 when trigger occurs S1 from NC to NO during any time R0M950 J5 C"io4.in" ; Configure pin J5 as Y Max(High End) Trigger and assign input pin "io3.in"
M581 P5 S1 T5 R0 ; Setup Pin 5 when trigger occurs S1 from NC to NO during any time R0M950 J6 C"io5.in" ; Configure pin J6 as Z Max(High End) Trigger and assign input pin "io5.in"
M581 P6 S1 T6 R0 ; Setup Pin 6 when trigger occurs S1 from NC to NO during any time R0-
Does this mean a separate macro file for end stopper has to be placed in the macro?
-
Finally, if the axis stepper motor is traveling even after the end stopper is activated, The Z axis was about to crash, but luckily the end stopper was activated to prevent a major accident? Why did the end stopper, even though configured and activated, not stop the stepper motor?
Requesting your kind support in getting our machine work properly, Apologies for such a long post.
plz provide us your insights to solve these issues
-
@SANJR said in Testing End Stopper and Emergency Push Button:
; Endstops
M574 X1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in
M574 Y1 S1 P"io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y1 io1.in
M574 Z1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io3.inthis says the endstops are at the low end. If you want them at the high end, change X1 to X2 and so on
Are you using normally open or normally closed endstops?
trigger files go in sys
end stops are only monitored during homing moves
-
@SANJR said in Testing End Stopper and Emergency Push Button:
M574 Z1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io3.in
That line is configuring the endstop for the low end, not the high end (despite what the comment says). If you wish the endstop to be for the high end you need:
M574 Z2 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io3.in
See the documentation for M574: https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m574-set-endstop-configuration
-
Thanks for the update
I will reconfigure the end stop from Z1 to Z2 for the high end.
The Endstopper used is the Ramps 1.4 Endstop Switch for RepRap 3D Printer, it usually comes as an NO and i assume it to be NO (Image of the same is pasted below for reference)
-
@SANJR in which case you need to invert your endstops by adding a ! to the pin name in M574
-
@SANJR For endstop testing, see https://docs.duet3d.com/en/How_to_guides/Commissioning#h-8-check-endstops and the section after for reconfiguring as necessary.
To test a trigger, push the button. You can temporarily change the function of the button (T parameter in M581 command) to do something else, rather than reset, while you are testing.
To test the feeder motor and relay, send appropriate M42 commands to turn on and off these outputs.
Ian
-
@droftarts @jay_s_uk @gloomyandy Thanks for the insights provided
I have corrected the end stopper configuration and checked the home, It is working well.
Emergency push button is also working well.
I would be testing the feeder motor and relay in the coming week as per the insights provided.
Once again Thanks .....
-
Hi
With reference to the above query, the endstoppers have been configured and are working well. The status of the endstopper was checked by sending
- M119
- G28 X -> Home X, G28 Y -> Home Y & G28 Z -> Home Z and G28 -> Home All
We have also installed endstoppers at the opposite end as triggers. These endstoppers, which are configured as triggers, were tested by pressing while the axis was moving, It was assumed there would be a stop in the motion, but the axis kept on moving.
The EndStoppers Configuration in sys folder is as follow for X Axis @ Min
; Endstops
M574 X1 S1 P"!io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.inThe EndStopper as Trigger Configuration in sys folder for X Axis @ Max
; Custom settings are not defined
M950 J4 C"io1.in" ; Configure pin J2 as X Max(High End) Trigger and assign input pin "io1.in"
M581 P4 S1 T4 R0 ; Setup Pin 4 when trigger occurs S1 from NC to NO during any time R0The following message is displayed as ¨Warning : Macro file trigger4.g not found¨
How do I make the trigger endstop to make sure the axis is stopped while in motion? What is the inference of Message displayed in the YAT Terminal?
-
@SANJR see the triggers documentation here: https://docs.duet3d.com/en/User_manual/Tuning/Triggers
Basically, as you have used the parameter T4 when defining the trigger, you need to create a trigger4.g file in the /sys folder, containing what you want to happen when the endstop is hit.
Ian
-
@droftarts Thanks for the Update
I have created a trigger macro file in the sys folder, and now the end stoppers are working well.