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

    Read Output pin state

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    8
    44
    2.7k
    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.
    • wayneosdiasundefined
      wayneosdias @wayneosdias
      last edited by

      @dc42 @alankilian @gloomyandy @OwenD @SIam @Stephen6309
      Thanks again.

      Now that I have M118 working within Openpnp with GCode compression via the Backslash option I have changed my other analog sensor queries;

      Initially using M308 was pretty verbose with 138 total char count

      >> M308S0
      << Sensor 0 (Pressure_1) type Linear analog using pin temp0, reading 1996.0, last error: success, unfiltered, range 0.0 to 4095.0
      

      Vs now using M118 a total char count of 50

      >> M118P1S{sensors.analog[0].lastReading}
      //actual Opnepnp syntax w compression and back slash
      // M118 P1 S{sensors\u002Eanalog[0]\u002ElastReading}
      << 1996.0
      

      Thanks Wayne

      OwenDundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD @wayneosdias
        last edited by

        @wayneosdias
        Glad it's all working.
        Be interesting to see a video of it in operation

        wayneosdiasundefined 1 Reply Last reply Reply Quote 0
        • wayneosdiasundefined
          wayneosdias @OwenD
          last edited by wayneosdias

          @owend
          Will do, I need to get the mechanicals back together first. 🙂
          If you dont know what this is, it's the aftermath drag pin machine crash. The pin with the bent tip slides up and down within the blue coil of the selenoid with the bent frame.

          I hope to get fixed tonight and put some of my new and improved RRF commands to work 🙂

          Thanks again.
          20220227_191412.jpg

          1 Reply Last reply Reply Quote 1
          • wayneosdiasundefined
            wayneosdias
            last edited by

            Heres a quick vid of the process.
            pick_2edOjyQd.mp4

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

              @wayneosdias Hi, is it okay to add a link to your wiki page on our wiki page here? https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_OpenPnP

              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

              wayneosdiasundefined 2 Replies Last reply Reply Quote 0
              • wayneosdiasundefined
                wayneosdias @droftarts
                last edited by

                @droftarts
                Yes absolutely. I do need to make some tweeks to the wiki as I have been making changes but haven't been updating the wiki. I'll spend some time tonight to tiding things up a bit.

                I don't want to spread any bad info so if you see anything that is not best practice please let me know.

                Lastly, just to put the original topic to bed, M118 is the best method for retrieving input/output/analog values from Duet using GCode correct? Best meaning timely and succinct.

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

                  @wayneosdias Great, thanks.

                  For sending messages to USB, I guess M118 is going to be the most useful; I actually can't think of any other way to do it. If you wanted to send to DWC or PanelDue (but I don't think you do), use M291 instead.

                  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

                  wayneosdiasundefined 1 Reply Last reply Reply Quote 0
                  • wayneosdiasundefined
                    wayneosdias @droftarts
                    last edited by

                    @droftarts
                    Ok good to know, for Openpnp its USB/serial or tcp.

                    1 Reply Last reply Reply Quote 0
                    • wayneosdiasundefined
                      wayneosdias @droftarts
                      last edited by

                      @droftarts
                      Ive updated the wiki, it is current. Feel free to post the link
                      https://github.com/openpnp/openpnp/wiki/Duet3D-Openpnp-Example

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

                        @droftarts said in Read Output pin state:

                        @wayneosdias Great, thanks.

                        For sending messages to USB, I guess M118 is going to be the most useful; I actually can't think of any other way to do it. If you wanted to send to DWC or PanelDue (but I don't think you do), use M291 instead.

                        Ian

                        You can also use 'echo' commands to retrieve information.

                        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