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

    Reading status of input pin in roto toolboard

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    3
    6
    174
    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.
    • RockBundefined
      RockB
      last edited by

      Hello,

      I have a roto tool board on CAN network communicating with mainboard 6HC. How can I read the status of input pin io2.in in IO 2 of roto tool board?

      jay_s_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @RockB
        last edited by

        @RockB you can get that information from the object model https://docs.duet3d.com/en/User_manual/RepRapFirmware/Object_Model

        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

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

          @RockB to expand on the response from Jay: use M950 with the Jn parameter for your own choice of n (e.g. zero if you have not configured any other inputs) to configure that pin as an input port; then query sensors.gpIn[n] in the object model to find the current value.

          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

          RockBundefined 1 Reply Last reply Reply Quote 0
          • RockBundefined
            RockB @dc42
            last edited by RockB

            @dc42 @jay_s_uk I have configured an input using M950 in my config.g

            M950 J0 C"20.io2.in"; create input 0 for air cylinder in tool 0 
            

            I am not sure how to query sensors.gpIn[0] in the object model. Navigating to the object model plugin in DWC, I see sensors.gpIn is an array but can't see any values

            a44470f9-6ade-4850-ae6d-1d47b1ce87ee-image.png

            How do I query the sensors.gpIn[0]?

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

              @RockB I think your M950 command has failed. Which version of RRF are you using? What happens when you send that M950 command from the console?

              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

              RockBundefined 1 Reply Last reply Reply Quote 0
              • RockBundefined
                RockB @dc42
                last edited by

                @dc42 Looks like the roto tool board was running an older version (3.5.0 rc1) of the firmware. After updating the firmware to the latest 3.5.2 everything works as expected.

                1 Reply Last reply Reply Quote 0
                • dc42undefined dc42 marked this topic as a question
                • dc42undefined dc42 has marked this topic as solved
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA