Welcome! Log In Create A New Profile

Advanced

Endstop for Z axis and offset not working?

Posted by unromeo21 
Endstop for Z axis and offset not working?
July 15, 2016 03:07PM
So I am commissioning my Duet on my home build printer (cartesian style, bed on Z axis) and decided to skip a Z probe at first, just a simple optical endstop on the Z axis, same as X and Y.

Now, this low end endstop is positioned to trigger a few mm before reaching 0 (when the nozzle should touch the bed). I was going to setup an offset for the endstop, and issue a G1 Z0 in the homez.g file to move the axis to 0.

What is the right way in doing this ? I tried adding the offset to the M208 with S1 parameter : M208 X0 Y0 Z3 S1 but after homing, 0 is always at the exact point where the switch triggers.
I tried adding an M206 Z3 but this did not helped at all, it just moves the Z axis at a really fast speed while rebooting the Duet (this scared me quite a bit !) . Homing still the same, 0 on exact switch trigger position. Or should I add M206 Z3 in the homing file ?

I have the M558 and M31 commented out, since I am not using any z probe.

Can somebody guide me on this issue please ?

Forgot to add: Endstop for Z axis is connected to the Z endstop connector near the stepper connector. G30 in the homez.g is commented out, since it does not respond to switch trigger. I do the homing with G1 and S1 parameter.

Edited 2 time(s). Last edit at 07/15/2016 03:42PM by unromeo21.
Re: Endstop for Z axis and offset not working?
July 15, 2016 04:50PM
After the G1 S1 command to do the homing move, insert a G92 Znnn command, where nnn is the height at which the homing switch triggers. This is covered at [duet3d.com].

Edited 1 time(s). Last edit at 07/15/2016 04:51PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 16, 2016 02:45AM
Thanks DC42 !

This is what happens when the information is scattered all over the place. I was reading the reprap.org wiki, configuring duet for Cartesian; same content almost, but this specific detail is missing there.

Regards
Re: Endstop for Z axis and offset not working?
July 16, 2016 04:01AM
The plan is to migrate all the information on RepRapFirmware and the Duet to the new wiki, which is currently hosted at duet3d.com but may be moved to a different host eventually. So I am putting new information in that wiki rather than anywhere else.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 17, 2016 05:31PM
Hi

Would you mind sharing you're config.g, homeall & homez files for me to analyze ? so I can understand the thought process and methodology.

I'm a kinesthetic learner so reading and reading reams of instruction is just a P.I.T.A.

But if I can see a working example to study I'm golden!!

Coming from "Marlin" where setting a z axis end stop was so simple you never gave it a second thought, then to go to g-code is a steep learning curve and one that is not the most logical (to me at least).

As to be honest there is no "real world" guide for this final part of the Duet Puzzle, yes there is loads and loads of information out there but I am seeing many many get lost in the sea of info. Yes there is guides and guides out there but some of us begin reading and start to glaze over...........

So For a Cartesian printer.

Some people just want the following namely (they, WE, I) want to know how to do the following:

How to use a normally closed switch to act as an end-stop on the Z axis that can be manually adjusted to raise or lower the nozzle height from the bed ( the print surface of the bed being classed as ZERO) this information in an easy to follow format would allow everyone to get things up and running faster. (and then later add a z probe if they so wish)

I know its a learning process but it also feels at times as if this section is like a test, pass it and you are in the club, fail and you can feck off you are not intelligent enough to play here. (sorry if that's harsh but that is how it comes across)

So it would be nice if we could just to forget about Z probes, auto probing, leveling etc

And if it was in the following format we could all play nice:


FOR EXAMPLE

If you want to set up a Cartesian printer's Z axis to act as an end-stop using a micro switch ONLY. (using a normally closed switch plugged into the duet boards Z axis end-stop)

You should edit the config.g to use the following G-code xxxxxxxxxxxxxxxxxxxx

And you should edit the homeall & homez files with the following G-code's xxxxxxxxxxxxxxxxxxxxxxxx

Maybe that is being too simplistic but in all honesty that is what nearly everyone wants.

Regards

Edited 1 time(s). Last edit at 07/17/2016 05:33PM by Calvinx66.
Re: Endstop for Z axis and offset not working?
July 18, 2016 04:47AM
This is covered in the section on homing files in [duet3d.com].

Btw there is a web based configuration tool in beta that will generate the configuration gcodes for you.

Edited 1 time(s). Last edit at 07/18/2016 04:48AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 18, 2016 07:24AM
Quote
dc42
Btw there is a web based configuration tool in beta that will generate the configuration gcodes for you.

Oh, that would be a really nice feature for those that just jumped into G-code boat. A web based tool to generate config files, much like the repetier configuration tool.

DuetWiFi is one of the most advanced controllers on the market at the moment. If the software/firmware is going to match the hardware platform, than it will be a total winner.
Re: Endstop for Z axis and offset not working?
July 18, 2016 08:36AM
Hello

Quote
dc42
This is covered in the section on homing files in [duet3d.com].

Yes its covered there, again its not in a very easy to follow format. And I know its not just me so that would appear to be a problem.

And while the assistance is excellent, it is still a problem with those who understand the system (because they get it) fundamentally failing to understand that just because "they get it" they mistakenly think everyone else around them should too!!

We can all be guilty of this, I know for certain things I have had to catch myself and think "no this guy is not stupid only inexperienced so I have to help him/her)

As an oil & gas technical skills trainer I have seen similar instances in my offshore work environment where guys who are super super intelligent stare blankly at someone telling them that they do not understand what they are trying to say, they just cannot comprehend that others sometimes need a different method of explanation to understand what they seemingly do not give a second thought to.

And having seen the configurator I have tried it, Only problem for me in chrome anyway is that even though there is an option for switches only the config still generates all the files as if you have a Z probe. (bug maybe ?) or maybe this tool requires to be run under I.E.?

I think the controller is a wonderful piece of equipment, maybe the only way forward is for someone with the understanding (and time) to do some setup/commissioning video's for people to follow.

And by the way don't get me wrong I have my Duet 0.8.5 running fine with a PNP BY inductive sensor, but it would be nice to have the fallback to use a end-stop switch in as simple a manner as Marlin does.

As I said great controller and if there were some step by step video's available for the masses to follow I think the controller would reach a much much wider audience

It is very easy to tell someone how to do a thing (if you understand it fully, or saying "go read @ x,y,z location) it is harder but better saying "come with me" and actually showing them, as an educator I feel its a job well done when I see my students face when the "penny drops" when they have been struggling to understand the theory behind a problem over an extended time frame.

I would do this myself but at the moment I don't feel competent enough to do such video's maybe in the future as I learn more.

Edited 2 time(s). Last edit at 07/18/2016 08:40AM by Calvinx66.
Re: Endstop for Z axis and offset not working?
July 24, 2016 09:06PM
I strongly second Calvinx66 post. I have followed every instruction I can find including some very detailed instruction from dc42 and still cant get the IR sensor to work properly. All I'm trying to do is use it to Home Z at 0. No probing. Videos are the way to go!
Re: Endstop for Z axis and offset not working?
July 25, 2016 07:30AM
Hi

While I have my system up and running with a PNP type proximity sensor I want to option to print on to glass so to this end I have purchased an IR sensor from David Crocker.

I will try to get it up and running and if successful I will then try to put together a setup video.

Regards
Re: Endstop for Z axis and offset not working?
July 25, 2016 02:41PM
Quote
Calvinx66
...

FOR EXAMPLE

If you want to set up a Cartesian printer's Z axis to act as an end-stop using a micro switch ONLY. (using a normally closed switch plugged into the duet boards Z axis end-stop)

You should edit the config.g to use the following G-code xxxxxxxxxxxxxxxxxxxx

And you should edit the homeall & homez files with the following G-code's xxxxxxxxxxxxxxxxxxxxxxxx

Maybe that is being too simplistic but in all honesty that is what nearly everyone wants.

Regards

Maybe you haven't seen it, but at [duet3d.com] I already provide this example:

Quote

If you home Z using a microswitch instead, then you can use a pattern similar to homex,g and homey.g. However, if you use a low-end homing switch that triggers a little before Z=0, then you can't use M208 to define the homing position, because it would prevent you moving below the trigger height. You can use a G92 command after homing instead. Here is an example, for the case where you have a low-end homing switch that triggers at Z=0.3mm:

G91 ; relative mode
G1 Z4 F200 ; raise head 4mm to ensure it is above the switch trigger height
G90 ; back to absolute mode
G1 X0 Y0 F2000 ; put head wherever you want it to be when you home Z (omit this line if it doesn't matter)
G91 ; relative mode
G1 Z-200 S1 F100 ; move Z down until the switch triggers
G90 ; back to absolute mode
G92 Z0.3 ; tell the firmware that we are at Z=0.3mm



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 25, 2016 04:17PM
Hi

Thank you for the info, I admit I did not see that part, and yes does explain it well enough.

I personally still think short instructional video's (in the same vein as Thomas Sanladerer's) are the way to go.

As g-code can be pain to get your head around.

Regards
Re: Endstop for Z axis and offset not working?
July 26, 2016 08:41AM
I followed the instructions in from the duet3d.com and got it working beautifully. It is worth mentioning that every user of RepRapFirmware should have the g-code "bible" to his side when working with config files and tweaking start or stop scripts in the G-code files.
Re: Endstop for Z axis and offset not working?
July 26, 2016 11:59AM
I'm going to try again to get this sensor working. I have attached some pictures just to make sure that I have the mechanical setup right. I know that with my heat bed I will never be able to use multi point leveling and that is fine. I taped a square of black paper under the glass at the home position and that is where I will probe to get my Z trigger height. The sensor is mounted to a holder 1.5mm above the nozzle tip. Can someone confirm that this setup will work please.
Attachments:
open | download - Black paper.jpg (66.6 KB)
open | download - IR sensor.jpg (93.2 KB)
open | download - Heat bed.jpg (127 KB)
Re: Endstop for Z axis and offset not working?
July 26, 2016 01:58PM
Joe, how high is the bottom edge of the sensor board above the tip of the nozzle? It's hard to tell from your photo. It should be between 1mm and 2mm.

It's possible that the sensor can work over the entire bed, but best get it working over the black paper first.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 26, 2016 03:07PM
1.5mm above nozzles

When I traverse the bed in the X Y at the trigger height of 534 the led goes on and off. I cant paint the glass black due to construction of the bed.

I can reset the Z probe by sending M561 then M556 S100 X0 Y0 Z0 correct?
Which version of the setup instructions should I follow?

Quick method

If it’s the first time you are setting the Z Probe (proximity probe), read the next section ‘Setting the Z Probe’ first, for a full explanation.
1.Send M561 then M556 S100 X0 Y0 Z0. This resets any bed plane and orthogonal axis compensation.
2.Move the X axis so that the proximity probe is over the bed target closest to X0 Y0. This is usually around X40 Y0. If the X and Y axes are homed, you can use ‘G1 X40 Y0’ to go there.
3.Move the Z axis down so the nozzle just touches the bed; use a piece of paper, move Z down 0.1mm at a time, until it traps the paper. Then move it down 0.1mm more.
4.Send G92 Z0. This sets the current Z position to 0, for reference.
5.Move the Z axis up 2mm. Send G31. The response will most likely be less than 600.
6.Move the Z axis up 0.1mm. Send G31.
7.Repeat the above until G31 reports a value of around 600, +/-20
8.Send M114, and note the Z height.
9.Send G31 Z[zzz] P[ppp], where [zzz] is the height of Z from the M114 command, and [ppp] is the value reported by the last G31 command
10.An EXAMPLE might be: G31 Z2.5 P598
11.Home Z to test, and adjust as necessary.
12.Copy the G31 Z[zzz] P[ppp] command you have derived into the config.g file on the SD card.

Or:
2. When you have installed a Z probe you need to measure its trigger height so that you can configure in in the config.g file (the Z parameter in your G31 command). To measure trigger height, I first tell the printer where Z=0 is using the above method. Then I command the head up 5mm, and then I send G30 S-1. This tells the firmware to probe the bed but not to use the result to adjust where Z=0 is. So after probing the bed, I can read off the Z height from the web interface, and that is the probe trigger height.

Or:
To calibrate the sensor for Z homing and bed probing, home X and Y, then position the head over the centre of the bed. With the nozzle at operating temperature, lower the head so that it is just touching the bed or just gripping a sheet of paper, then send G92 Z0 to define that position as Z=0. Raise the head 5mm and remove the paper. Then send G30 S-1 to probe the bed at that point without adjusting the Z height setting. Read off the Z height and use that value for the Z parameter in your G31 command in config.g.

Edited 2 time(s). Last edit at 07/26/2016 05:35PM by joestefano.
Re: Endstop for Z axis and offset not working?
July 26, 2016 09:20PM
Got it working, My Home all file needs work.
Re: Endstop for Z axis and offset not working?
July 27, 2016 02:37AM
The first one is for a different sort of IR probe. The second one is the same as the third one, except that the first step is missing. So use the third one:

Quote

To calibrate the sensor for Z homing and bed probing, home X and Y, then position the head over the centre of the bed. With the nozzle at operating temperature, lower the head so that it is just touching the bed or just gripping a sheet of paper, then send G92 Z0 to define that position as Z=0. Raise the head 5mm and remove the paper. Then send G30 S-1 to probe the bed at that point without adjusting the Z height setting. Read off the Z height and use that value for the Z parameter in your G31 command in config.g.

Except instead of using the centre of the bed, position the sensor over your target area with the black paper underneath the glass. Use a P value of 500 in your G31 command.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 27, 2016 02:39AM
I'm glad you got it working. Are you happy that you understand how the homeall.g file works?



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 27, 2016 06:59AM
M208 is X270 Y270 Z200
M208 X0 Y-10 Z0 S1

My black paper is located at X25 Y250. this file leaves the heads at X25 Y270 How do I get it to finish at X25 Y250 Z0

; Ormerod 2 homeall file for use with dc42 Duet firmware
; Adjust the bed upper and lower limits in config.g (M208 commands) to get the correct homing positions
G91
M558 F300
G1 Z4 F500
G1 X-270 Y270 F3000 S1 "the S1 looks for switch?"
G1 X25 Y250 F600
M558 F120
G1 Z0 F300
;G1 X-10 Y10 S1
G90
; Adjust the XY coordinates in the following to place the IR sensor over a suitable spot
; If you are using a dc42 IR sensor then you can change the coordinates to be near the centre of the bed
;G1 X25 Y22 F2000
;G30
;M558 F120
; This file leaves the head at the zprobe trigger height so that you can slip a piece of paper under it and then do G0 Z0 to check the height.
; If you prefer to send the printer to X0Y0Z0, un-comment the following lines
;G1 X25 Y22 F5000
;G1 Z0
Re: Endstop for Z axis and offset not working?
July 27, 2016 08:21AM
I don't see a G30 command in your homeall.g file. My guess is that you need something like this:

G91 ; relative mode
G1 Z4 F500 ; raise head 4mm to ensure it is above the bed
G1 X-270 Y270 F3000 S1 ; fast home X and Y
G1 X10 Y-10 F600 ; back off a little
G1 X-20 Y20 F600 ; fine home X and Y
G90 ; absolute mode
G1 X25 Y250 ; move over black paper
M558 F300 ; high probe speed
G30 ; fast home Z
G1 Z5 ; go up to 5mm
M558 F120 ; slow probing rate
G30 ; slow home Z



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 27, 2016 12:19PM
David, I had everything functioning fine. I then attempted a print, after purging the bed raised above the nozzles and they crashed into the side of the bed. I shut off power to the board. I reapplied power and homed all and have lost the Z0 the bed would not stop at 0. Home Z does not work either. This happened the last time I thought I had it figured out. What could be happening? what info do you need to help me with this? The only change I made today was using your homeall file.


Update: I cycled power 3 times and it fixed it self. It seems to happen if I kill power in the event of failure. What should be the procedure after a shut down?

Edited 1 time(s). Last edit at 07/27/2016 12:32PM by joestefano.
Re: Endstop for Z axis and offset not working?
July 28, 2016 04:10PM
Quote
joestefano
David, I had everything functioning fine. I then attempted a print, after purging the bed raised above the nozzles and they crashed into the side of the bed. I shut off power to the board. I reapplied power and homed all and have lost the Z0 the bed would not stop at 0. Home Z does not work either. This happened the last time I thought I had it figured out. What could be happening? what info do you need to help me with this? The only change I made today was using your homeall file.


Update: I cycled power 3 times and it fixed it self. It seems to happen if I kill power in the event of failure. What should be the procedure after a shut down?

You should not need to do anything special after a shutdown. The only thing you need to make sure of is that you don't use the IR Z prove until it has finished initialising and flashed its LED 4 times, all of which takes about 6 seconds from power up.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Endstop for Z axis and offset not working?
July 28, 2016 04:24PM
David, for clarification, when the sensor is anywhere else besides over the black paper target is it conducting readings? I'm not using it for multi position bed probing.
Re: Endstop for Z axis and offset not working?
July 28, 2016 05:56PM
Quote
joestefano
David, for clarification, when the sensor is anywhere else besides over the black paper target is it conducting readings? I'm not using it for multi position bed probing.

No, the readings are not used by the firmware (except to relay to the web interface) except when you are probing the bed in some way. During printing, the LEDs on the sensors on my printers are constantly turning on and off as the sensor moves over the print.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login