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

    Back with opnpnp again

    Scheduled Pinned Locked Moved
    General Discussion
    3
    17
    540
    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.
    • qlfecvundefined
      qlfecv
      last edited by

      I already have my machine configured with duet2 wifi with X, Y and Z axes and C and D rotary nozzles plus a few actuators.

      To finish I need to read the analog signal of 2 vacuum sensors, but I don't see how to read only the value.

      I have tried with:

      M308 S1 P "e0temp" Y "linear-analog" A "MySensor2" F1
      

      but reading it gives me this

      Sensor 1 (MySensor2) type Linear analog using pin e0temp, reading 99.9, last error: sensor not ready, filtered, range 0.0 to 100.0
      

      I just need to read only the value.

      Any idea how to do it?

      Jose

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

        The reading of 99.9 suggests that the analog input is at +3.3V. Have you measured the voltage on the input?

        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
        • qlfecvundefined
          qlfecv
          last edited by

          The value is OK, but I only want to read 99.9

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

            @qlfecv said in Back with opnpnp again:

            The value is OK, but I only want to read 99.9

            Please explain what you mean. What is the voltage on the analog input pin?

            Edit: Do you mean that you want a shorter response? You can get the value from the object model, for example using M409, or refer to it in a 'echo' 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

            1 Reply Last reply Reply Quote 0
            • qlfecvundefined
              qlfecv
              last edited by

              Yes, I want shorter response.

              How work M409 with M308 sensor?

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

                echo sensors.analog[1].lastReading
                25.9
                

                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
                • qlfecvundefined
                  qlfecv
                  last edited by

                  Thanks @dc42,

                  1 Reply Last reply Reply Quote 0
                  • qlfecvundefined
                    qlfecv
                    last edited by

                    @dc42 Is posible read digital value? (4095)

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

                      You could set the range in M308 to 0 to 4096 instead of 0 to 100. Then if you don't want any decimals, use the floor( ) function in the echo command to convert the reading to integer. Or you can stay with 0 to 100 and multiply by 4096.0/100 first. See https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Expressions to see what expressions you can use within the echo command (and in lots of other places).

                      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
                      • qlfecvundefined
                        qlfecv
                        last edited by

                        Thanks again 👍 👍

                        1 Reply Last reply Reply Quote 0
                        • qlfecvundefined
                          qlfecv
                          last edited by

                          I don't understand that I'm doing wrong.

                          I have this configuration

                          M950 C"bedtemp" C"nil"
                          M308 S2 P"bedtemp" Y"linear-analog" A"V_Sen_H2" F1 L0 H4095
                          

                          The pin is 0V I send this

                          echo sensors.analog[2].lastReading
                          0.0
                          

                          Now pin 3.3v

                          echo sensors.analog[2].lastReading
                          100.0
                          
                          1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators
                            last edited by dc42

                            @qlfecv, the M308 documentation for Linear Analog sensors was wrong. The min and max reading parameters are B and C, not L and H. So use B0 C4095.

                            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

                            qlfecvundefined 1 Reply Last reply Reply Quote 0
                            • qlfecvundefined
                              qlfecv
                              last edited by qlfecv

                              Ok, so I try it.

                              @dc42 what is the best option to add the sixth axis?

                              I don't like using additional hardware, but with duet2wifi I have no other solution.

                              When I can I will buy one " Duet 3 Main Board 6HC".

                              T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                              • T3P3Tonyundefined
                                T3P3Tony administrators @qlfecv
                                last edited by

                                @qlfecv where are you based?

                                www.duet3d.com

                                1 Reply Last reply Reply Quote 0
                                • qlfecvundefined
                                  qlfecv
                                  last edited by

                                  In Barcelona, Spain

                                  T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                                  • T3P3Tonyundefined
                                    T3P3Tony administrators @qlfecv
                                    last edited by

                                    @qlfecv ah cool. I think @dc42 will be in contact.

                                    www.duet3d.com

                                    1 Reply Last reply Reply Quote 0
                                    • qlfecvundefined
                                      qlfecv @dc42
                                      last edited by

                                      @dc42 said in Back with opnpnp again:

                                      @qlfecv, the M308 documentation for Linear Analog sensors was wrong. The min and max reading parameters are B and C, not L and H. So use B0 C4095.

                                      Working fine 👍

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