Setup Z-probe and endstop



  • Hello,

    I have an inductive sensor mounted on the Zmax side,
    On the same axis, I have a limit switch mounted at Zmin.

    My homing sequence is correct, it goes to Z- until the endswitch is touched.

    My problem is that when I want to use the Zprobe (using G30 S-1), the Z axis goes to Zmin direction.

    Is there a way to setup the Z probe to probe to an opposite direction ?

    My Z probe is connected and configured as described in this page :
    https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe#Section_NPN_output_normally_open_inductive_or_capacitive_sensor

    Thank you,


  • Moderator

    @Algadz G30 should work with the probe, even if the endstop is defined. Does the probe respond correctly? It should respond like a switch, so DWC will report a probe value of either 0, or 1000 when triggered. Is the probe already triggered when you run G30 S-1 (check in the console), so the bed is moving away?

    Please can you post your config.g, and the response to M115 (firmware version etc). I assume you have wired it as the diagram in the section you linked above.

    Ian


  • Moderator

    I've never heard of using a probe on zmax. Are you just wanting to use it as an endstop?



  • Yes the probe works properly,

    If the inductive sensor is triggered (metal part in front) G31 returns 1000 and switch to 0 when I move away the metal part.
    The problem is not that the inductive sensor is not working, but just that I would like to reverse the direction in wich the probing is done (Z max instead of Zmin).

    When I'm using G30 S-1 the stage moves away (to Zmin) from the probe (installed at Z max) until I manually trigger the probe with a piece of metal.

    My config is the Following :
    Duet 2 ethernet V1.04c RRF 2.03c

    On the config.g file the probe is configured with M558 P5 I1 just before setting each axis stepper direction and endstop side.

    Here it is :

    M555 P2 ; Set output to look like Marlin
    G21 ; Work in millimetres

    ;Define axis
    M584 Z2 X0 Y1 U3 E4

    ;Set drive current an idle current at 20%
    M906 Z1500 X1500 Y1500 U1500 E1500 I20

    ;Set inactive time before idle to 5s
    M84 S5

    ; set microstepping with interpolation
    M350 X16 Y16 Z16 U61 E16 I1

    ;Set axis step/unit
    M92 Z3200 X3200 Y3200 U44.444444444444 E459.4040311 ;

    ;Set acceleration
    M201 Z200 X500 Y500 U20000 E3000

    ;Set max feedrate (unit/min)
    M203 Z800 X1600 Y1600 U216000 E10000

    ;Set instant speed changes mm/minute (Jerk)
    M566 X1200 Y1200 Z1200 E1200

    ; define Z probe
    M558 P5 I1

    ; Axis and motor configuration
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards

    ;define min and max travel
    M208 X-27 Y-29 Z2.9 u-1000000000000 S1; min travel
    M208 X25 Y23 Z100.1 u1000000000000 S0; max travel

    ;Endstop configuration
    M574 X2 Y2 Z1 u2 S1

    ;Tool definition
    M563 P0 D0

    ;Tool selection
    T0

    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves



  • @Phaedrux said in Setup Z-probe and endstop:

    I've never heard of using a probe on zmax. Are you just wanting to use it as an endstop?

    Yes it is for a specific application,
    My Z axis is homed at Zmin with a switch but later on the printing process I would like to be able to move the Z axis toward Zmax until the probe is triggered.

    Thanks


  • Moderator

    @Algadz Just to be clear, what is the layout of your machine? Does the bed move up and down, or the nozzle? When you say the probe is on 'zmax', this is when the bed and nozzle are at their furthest from each other? And your Z switch is at 'zmin', when the nozzle is just touching the bed?

    Ian


  • Moderator

    @Algadz said in Setup Z-probe and endstop:

    I would like to be able to move the Z axis toward Zmax until the probe is triggered.

    I think what's is confused here is that you are referring to it as a probe, however the application you're talking about using it in is using it as a endstop switch. In which case you won't use M558 and G31 and G30 anymore, as those moves are used for a probe that is able to move around in X and Y to map the bed surface.

    What you're describing sounds like the inductive sensor is fixed at the Z max position and you want it to stop bed movement when homing to zmax, which I believe should be possible. How is your inductive sensor wired currently? You'd need to use M574 to configure a Z max endstop before you want to use it. You can leave the current Z min endstop configuration active in config.g. Then you can reconfigure to zmax in your macro before homing.

    Something like described here: https://duet3d.dozuki.com/Guide/Ender+3+Pro+and+Duet+Maestro+Guide+Part+5:+Upgrades/54#s213


Log in to reply