Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Best way to home a rotary valve for Duet controlled syringe pump?

    My Duet controlled machine
    2
    2
    575
    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.
    • cmefryday
      cmefryday last edited by

      Hi All,

      I'm trying to use a Duet Ethernet (1.18.1) to control a syringe pump with a rotary valve. I need help figuring out how I might write a homing routine for the valve, which has a segmented wheel which trips an optical sensor- sort of a 2-bit encoder with one wide slot (120 degrees of shaft rotation) and one narrow slot (about 3 degrees of shaft rotation).

      I have the optical sensors working as inputs to the endstops on the Duet.

      My issue is how to do a conditional IF statement to differentiate between the wide slot and the narrow slot? Would it be better to use move commands while checking sensors (G1 Xnnn Fnnn S1), or is there something using external triggers (M581) or Z sensors (M558) that would work better?

      Here's a graphic showing how the wheel and sensor work:

      One thought would be to do a large G1 "forward" (anti-Clockwise rotation) move looking for the sensor (S1), then a small forward move without checking (S0) just far enough to jump over the narrow slot. But then it seems like I would have to change the endstop configuration (M574).

      Any thoughts?

      Thanks in advance,

      -cmefryday

      1 Reply Last reply Reply Quote 0
      • dc42
        dc42 administrators last edited by

        That sounds reasonable to me. I don't think that changing the endstop configuration in the homing routine should have any adverse effects.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

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