EZABL Pro™: M119 End-stop Test
What is the M119 command?
Marlin’s M119 command is called “End-stop States”. This reports the current status of each end-stop switch (and filament sensor, if present) at the time it is run.
The data is retrieved by the printer and output to a terminal connected to the printer. The data typically looks like the following:
If an end-stop switch is triggered at the time the M119 command is run, the switch will report a status of “Triggered”, rather than “open.”
Why is this helpful information for my EZABL?
The EZABL is specifically designed to be a replacement for an end-stop switch on the Z axis of most printers. Because our wiring connects it to the Z-MIN port on most mainboards, the EZABL responds to the M119 command as the “z_min” end-stop device.
The M119 command is a great way to test the EZABL, because it does not require any physical motion of the device to test. The EZABL will trigger if any object is placed under it, and thus can be tested at any height using M119.
In other words, you can test the EZABL without risking the nozzle contacting your bed.
How do I use M119?
First, you will need to attach the printer to a computer using a USB cable. You will also need a program with a “terminal” feature, which can be used to send commands to and display information from the printer. There are several programs to choose from… OctoPrint, Simplify3D, Pronterface, and Repetier are the most common. If you don’t have one already, we recommend that you begin with Pronterface using the download link and article here.
Once you have the terminal connected to the printer, simply send the command “M119” to the printer. The printer will process the command and output the data to the terminal, as seen here:
For best results, you will need to run this test twice. Run it once while the sensor is triggered, and then again while it is clear of obstruction. Ideally, you will see the status change from “triggered” to “open” as appropriate. Any working endstop switch should respond the same… “triggered” while the switch is triggered, and “open” while it’s clear.
EZABL Only Reports One Status
During the installation of an EZABL, you may encounter the EZABL responding incorrectly to M119. If you find that you only receive one status (only “open” or only “triggered”) despite the sensor’s status, the signal from the EZABL is incorrect.
To fix this issue, flip the small switch built into the EZABL control board (diagram available in our EZABL installation guide). Then test using M119 again, both open and triggered. The switch on the EZABL control board reverses the polarity of the wires running to the mainboard, thus correcting the signal sent to the printer.
The desired result is that the EZABL should report a different status depending on whether it is triggered or not. Ideally, it will match the actual status of the sensor (“triggered” when it should be, “open” otherwise). If the sensor reports the opposite status than what you expect, see the next section.
(If you have an older EZABL, such as the EZABL 3.1 or earlier, your control board may not have a switch built in. Please see this article for fixes covering older EZABL kits.)
EZABL Reports Opposite What It Should
In some cases, you may find that the EZABL reports the opposite status of what you expect to see. For example, the EZABL may report “Triggered” when it’s actually clear, and vice versa.
This issue is usually caused by reversed wiring on the Z-MIN port on the mainboard, compared to other boards. Luckily, this is easy to fix.
If you are comfortable with modifying your current firmware, there are two options you can use to correct the problem:
#define Z_MIN_ENDSTOP_INVERTING false #define Z_MIN_PROBE_ENDSTOP_INVERTING false
Changing these settings from “false” to “true” (or vice versa) will invert the signal. In practice, that means that it should reverse its status reports, and ideally should cause the EZABL to respond to M119 appropriately.
If you are not comfortable with modifying your firmware on your own, submit a ticket to our support department and include a copy of your configuration.h file from your firmware. Our support team can tell you exactly which lines you would need to change.