Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Endstop pin state

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    2
    3
    162
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nikosundefined
      nikos
      last edited by

      I made machne that moves two sets of valves controled by duet2wifi . And I have problem with moving axes.
      I need to move axes from one endstop too another. Axes moves only in two position but I need to be sure that it reaches it and after power up, know in what position it is. Thats why I mounted two mechanical endstops.
      My problem is that I cant configure this second endstop.
      First thought was to make trigger. unfortunately G1 moves are stored in buffer and need to be finished before trigger.
      I serched for g/m code for imidately terminated moves but unfortunately I didnt find one. Only m112 but it shoot down duet too.

      I was thinking to make a small loop witch move axes for about 0,5mm but before each move check state on endstop pin. I know that duet with meta commands should do this but unfortunately I dont Know how.

      I can make loop and it work fine but when I add condition for checking a pin state It dosent work.

      I make input Pin with m950 and check state with m409 but it don't change value when I use endstop.

      For checking I use:
      M950 J1 C"^e0stop"
      M409 K"sensors.gpIn[1].value" or "m409 K"state.gpIn[1].value"

      At this point I use M574 for change endstop pin for axes when moving. But after power up duet don't know axes position before power off. I know that I can use m911 too save state on power loss but hopping that I will be able to configure it depends on pin state. It will open up for me whole new way to use Duet.

      1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk
        last edited by

        if you are just moving from on to the other why not just do it as a homing move?
        so for min

        M574 U1 S1 P"whatever"
        G1 H1 U-400
        

        then for max

        M574 U2 S1 P"whatever"
        G1 H1 U400
        

        Although you can only have one endstop at a time for each axis, theres nothing stopping you from reconfiguring it before a move

        You could also use a G38.2 probing move

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        nikosundefined 1 Reply Last reply Reply Quote 0
        • nikosundefined
          nikos @jay_s_uk
          last edited by

          @jay_s_uk Your solution is the way it works right now. But when I will be able to configure it with simple logic it will allow me make it full independent from user.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA