Welcome! Log In Create A New Profile

Advanced

Duet- using end stops. and not stopping

Posted by Epop 
Duet- using end stops. and not stopping
April 29, 2015 01:15AM
(disclamer- I'm not much of an electronics guy. If you guys have info of where I can educate myself and stop bugging you, let me know... thx)
Using DC42 fork @v1.04f

Okay, it took me a min. So... when I...

homey- there's no movement but set y=0
homex- it moves as programmed LED on board lights up but motor grinds(hit hard limit) and does not set 0.
homez- "

M119 reports
"Endstops - X: not stopped, Y: at min stop, Z: not stopped "
The head is currently in the middle of the table... and status does not change on X or Z when switches are pressed.

I also have M574 E1 S0 in my config.g... because the local electronics store didn't have any normally closed micro switches... I gave it a try anyway.

Then I looked through platform.h and found endstop pins that looked pretty random.

#define END_STOP_PINS {11, 28, 60, 31, 24, 46, 45, 44} //E Stops not currently used
on my board it says
11 =Y2A
28 =E02B
60 = (I'm not sure, didn't look it up)
...
45 =PC14 (on the expansion header... which seemed wrong to me.)

So I was thinking of changing to >

#define END_STOP_PINS {5, 7, 13, 15, 21, 23, 29, 31}
which are all labeled (x,y,z,e0)stp and gnd
Yeah?

Thanks,
Re: Duet- using end stops. and not stopping
April 29, 2015 04:30AM
Most microswitches have both normally open and normally closed contacts. The outer 2 of the 3 connections are usually the normally closed ones.

To use a normally open microswitch, use the M574 command to change the polarity to active high, see [reprap.org].

Note that you must also use a M558 command to tell the firmware which axes the proximity sensor is using. The default is M558 P0 X1 Y0 Z1 meaning the sensor is used for X and Z homing. If you are using microswitches for X and/or Z homing, you need to change this, e.g. M558 X0 Y0 Z0 means you use microswitches for all axes.



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: Duet- using end stops. and not stopping
April 29, 2015 09:44PM
Again, thank you... I didn't see that M word when browsing through the gcode list.

*edited out nonsense

config.g
"
;***end limit switch change
M558 P0 X0 Y0 Z0 ; 0=NO PROBE
M574 X1 Y2 Z1 S1 ; set endstop configuration (S1 active high should be normally open switch?)
"
this gets me there...

a couple of questions though
so... it isn't actually loading the config.g right after I transfer it from the web interface?
and
Back to the pin designation... was my thinking on the right track ? or was where i was looking for pin info totally wrong?

Thanks...

Edited 3 time(s). Last edit at 04/29/2015 11:20PM by Epop.
Re: Duet- using end stops. and not stopping
April 30, 2015 03:09AM
A normally open end switch is active low, so you need S0 in the M574 command.

After sending the config.g file, you need to reset the Duet to process it, either by pressing the reset button or by sending M999.

You can of course test the M558 and M574 commands, by sending them through the web interface. It's only the commands that set network parameters that take effect only after a reset. You could even tell the machine to execute config.g again by sending M98 Pconfig.g, although you are likely to get an error message about defining the same tool number twice.

I can't see why you would need to change the endstop pins. Pins 24, 46, 45, 44 are all on the Duet expansion connector, because drives beyond the first 4 are on the expansion boards.

HTH David



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: Duet- using end stops. and not stopping
April 30, 2015 09:50PM
Ah... made sense as soon as I read that... I lost track of what I had changed when and if I restarted or not etc...
but... for the record...

Quote
DC42
Most microswitches have both normally open and normally closed contacts. The outer 2 of the 3 connections are usually the normally closed ones.

To use a normally open microswitch, use the M574 command to change the polarity to active high, see [reprap.org].
smiling smiley

So its actually
M558 P0 X0 Y0 Z0 ; 0=NO PROBE
M574 X1 Y2 Z1 S0 ; set endstop configuration (S0 active low- normally open switch)

I would have assumed I needed to restart but the message window kept loading the config.g so I thought it might be processing it or why would it bother showing it?

I didn't think it would... figured setting params. would only load at startup/file read. I'll try to send settings/params M words though the web interface next time.

I figured the drivers on the expansion board could be used for other things... wouldn't have thought to put endstop/motion for more than x/y/z... unless you want a soft+ limit?

Thanks!
Re: Duet- using end stops. and not stopping
May 01, 2015 05:13AM
I agree, it seems a little perverse to associate endstop inputs with more than 3 drives. My firmware fork uses the E0 endstop pins to allow connection of a microswitch-type Z probe, as an alternative to the Z probes with analog output that are typically used with the Duet.



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