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

    Continuous movements in a new way

    Scheduled Pinned Locked Moved
    CNC
    2
    4
    308
    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.
    • meelooundefined
      meeloo
      last edited by

      Hello,

      It would be very nice to have a new way to control the movement of the drivers on the duet by giving a speed per axis instead of a destination coordinate/offset.

      The current implementation makes it quite cumbersome to use a playstation / xbox controller in a responsive way: you have to decide on the speed before the move which makes the movements discreet by definition. What I would like instead is to be able to do set the speed depending on the position of the control sticks and taking into account the actual position of the stick instead of just triggering a move when an axis of the stick is beyond a certain threshold.

      I haven't found a GCode that would enable that but I think it would be super useful for that particular case. I guess there are other cases where this would be useful for some non conventional machines (for example to control a coil winder to make guitar pickup...).

      I had a cursory look at the firmware code (I'm an experienced C/C++ dev) but it goes a bit over my head and I'll like your inputs before (may be) diving in :-).

      hurzhurzundefined 1 Reply Last reply Reply Quote 0
      • hurzhurzundefined
        hurzhurz @meeloo
        last edited by hurzhurz

        While it is not nearly as good as a real implementation in firmware would be, you could have a look on how I did an implemented for continuous mode in my Duet-USB-CNC-Pendant project.

        The rough principle is described here: https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.md#working-principle

        Changing the speed while moving would be possible, though I have not actually implemented that for the basic PS3 controller support. EDIT: just implemented it (in a separat branch for now)

        1 Reply Last reply Reply Quote 3
        • o_lampeundefined o_lampe referenced this topic
        • meelooundefined
          meeloo
          last edited by meeloo

          Hey @hurzhurz thanks for your reply, I don't know why I didn't get a notification 🤔.

          I looked at your code and it makes sense but it implies to have rather complex setup with the pendant and Arduino. I'd rather have a solution that works directly without additional hardware like the joystick plugins for DWC. This is why I'd like to have an actual solution that works with Gcode.

          hurzhurzundefined 1 Reply Last reply Reply Quote 0
          • hurzhurzundefined
            hurzhurz @meeloo
            last edited by

            @meeloo You don't need to use my whole project, you could just look how I implemented the continuous mode in a G code way: via macros and especially the usage of the daemon.g.

            If you want to try that (without Arduino etc.), you can prepare the macros like described here:
            https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.md#preparation

            Then, to command a continuous movement, you have to send this command every 500ms (or more often):

            M98 P"pendant-continuous-run.g" A"X" F1000 D1
            # for moving the X axis in the positive direction with a feedrate of 1000
            

            If the regularly sending of this command stops, the movement will automatically stop after a short time.

            To immediately stop, you can send:

            M98 P"pendant-continuous-stop.g"
            

            Again, this not a perfect solution and you will notice a little delay, but I think it is working well enough.

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