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

    Asking for sensor status in a macro

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    9
    494
    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.
    • WillGIamundefined
      WillGIam
      last edited by

      Hey guys,

      I want to make a script for loading filament and need the status of a photoelectric barrier. Is there a way to ask for it and use something like an if-loop?

      William

      1 Reply Last reply Reply Quote 0
      • Danalundefined
        Danal
        last edited by

        In RepRap firmware 3, yes. Which board are you using?

        Delta / Kossel printer fanatic

        WillGIamundefined 1 Reply Last reply Reply Quote 0
        • WillGIamundefined
          WillGIam @Danal
          last edited by

          @Danal said in Asking for sensor status in a macro:

          In RepRap firmware 3, yes. Which board are you using?

          Im using Duet 2 Wifi and Ethernet.

          I saw this and conditional gcode already. But before I will integrate the loading script I want to ask for levelling status of my auto bed levelling. Everytime the levelling fails because of "probe not triggered ... " or "probings not consistent" he continues the print instead of stopping it... That results in damaged build plates and unhappy users. Is there a way to ask for this? A public variable for example? Im not getting an answer in my other threads... 😞

          William

          1 Reply Last reply Reply Quote 0
          • Danalundefined
            Danal
            last edited by

            Your original Q seemed to be "read a sensor pin", which will be in the object model. The follow up seems to be "detect errors", which is probably possible, but I'm a little less sure of exactly what will or won't be in the object model regarding errors and the relationship to given points in time.

            Entering M409 at the console, will give you the top level of the object model, and then M409 K"xxxx" will drill into keys, and chain with dots to keep going M409 K"xxx.yyy" and/or subscripts M409 "xxx.yyy[0]"

            Poke around and see what you see for various error statuses (stati?)

            Delta / Kossel printer fanatic

            WillGIamundefined 1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by

              Oh, and to be super clear, you must be on firmware 3 to do any of this. RRF3 runs fine on Duet 2 hardware.

              Do be aware that converting from RRF2 to RRF3 involves quite a bit of change to config.g. There are guides on the dozuki.

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • WillGIamundefined
                WillGIam @Danal
                last edited by

                @Danal Yes. I was talking about my other Q, where no one is answering anymore.

                Thank you fot that information, but how can I reed this out in a script and use it as a variable?

                Yes, I already updated some printers to RRF3.

                Thanks for your patience.

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

                  To read the status of a digital input:

                  • Use RRF 3.01-RC3 or later
                  • Create a GPIn port for that input using M950 with the J parameter
                  • Then you can read it from the object model as sensors.inputs[n] where n is the GPIn number you specified in the J parameter of the M950 command

                  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

                  WillGIamundefined 1 Reply Last reply Reply Quote 0
                  • WillGIamundefined
                    WillGIam @dc42
                    last edited by

                    @dc42 Okay, but the error is not provided by the Z probe with a digital input, it created by the duets firmware. I dont know where to ask for a error message produced by the duet.

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

                      If you just want to check for probing errors, see the example at the end of https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Using_conditional_GCode_commands_in_bed_g_to_calibrate_a_delta_printer.

                      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