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

    CNC Pendant Programming

    Scheduled Pinned Locked Moved
    General Discussion
    3
    5
    76
    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.
    • twcochran88undefined
      twcochran88
      last edited by droftarts

      Hello,

      I'm in the process of installing a CNC pendant on my custom clay printer following this guide:
      https://docs.duet3d.com/User_manual/Connecting_hardware/IO_CNC_Pendant

      My main hope for using this pendant is to be able to dial in my flow rate while printing, there's a ton of variability with clay, so being able to just turn a knob will be much more helpful than the web interface or panel due.

      The coding for it seems to be set up only for movement when nothing is running, I'm wondering how I might alter the output command for my extruder to do a +/-1% extrude factor override for each click of the wheel.

      The current pendant firmware can be found here:
      https://github.com/Duet3D/CNC-Pendant-Firmware

      Any help would be so much appreciated, thanks!!!

      dc42undefined droftartsundefined 2 Replies Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @twcochran88
        last edited by

        @twcochran88 to adjust the extrusion factor you would need to send a M221 command. If it's extruder 0 that you want to adjust then you could send this to increase it by 1%:

        M221 D0 S{move.extruders[0].factor*100+1}

        To reduce it by 1% replace +1 by -1.

        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

        twcochran88undefined 1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @twcochran88
          last edited by droftarts

          @twcochran88 Ideally, use the CRC16 branch, as this is needed for compatibility with RRF 3.5 and later. https://github.com/Duet3D/CNC-Pendant-Firmware/tree/crc16

          I think this should be doable, using one of the extra axis switches ie 4/5/6 (depending on which pendant you have). The pendant firmware does expect to send relative Gcode moves to an axis, and that is defined in this section: https://github.com/Duet3D/CNC-Pendant-Firmware/blob/1f9a55bb83a05ada6fbb12f5e5d92db590802086/src/CNC-pendant.ino#L126

          Currently, the pendant firmware doesn't ask the Duet for any information, so it doesn't know where any axis is, it just sends the relative axis movement. I think to use M221 it would need to read the current extrusion factor from the Duet firmware Object Model, then modify that and send it back to the Duet. This functionality currently doesn't exist in the Pendant firmware.

          I don't see anywhere that the sent commands are limited by the state the machine is in, but it might be done by fixing the line number to 0 in https://github.com/Duet3D/CNC-Pendant-Firmware/blob/crc16/src/GCodeSerial.cpp, ie a Gcode with a line number of 0 would be ignored during a running job. I think it would need to be changed to send the M221 command without a line number.

          Maybe @dc42 might offer more hints on what needs adding/changing?

          EDIT: @dc42 beat me to it! His method means the pendant doesn't need to check what the current extrusion factor is. Though I think what I wrote is still relevant.

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          twcochran88undefined 1 Reply Last reply Reply Quote 0
          • twcochran88undefined
            twcochran88 @dc42
            last edited by

            @dc42 Thank you so much! I'll hopefully be finished installing today and can test it out

            1 Reply Last reply Reply Quote 0
            • twcochran88undefined
              twcochran88 @droftarts
              last edited by

              @droftarts Much appreciated! Sounds like just the info I was in need of

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