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

    RRF 3.1 and DSF Object Models incompatible

    Scheduled Pinned Locked Moved Unsolved
    Beta Firmware
    4
    10
    408
    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.
    • gtj0undefined
      gtj0
      last edited by gtj0

      @dc42 and @chrishamm ...

      Structure is different.
      Naming is different
      Where naming is the same, the case doesn't match.

      This is going to make it very difficult for folks who have to work with both models.

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

        ... obviously. Some structures will be changed in DSF 1.3 to match the new RRF OM but don't forget that the current RRF OM isn't frozen yet. I have been busy with the configtool and DWC2 so I haven't had a chance to review everything in detail yet. I hope I can find time to review everything in approx. one week.

        Also, the case matches the internal DSF structures, but in the long-term I agree it would be better to provide those properties in camelCase where the first letter is lower-case in order to match the IPC structures provided by DSF.

        Duet software engineer

        1 Reply Last reply Reply Quote 0
        • gtj0undefined
          gtj0
          last edited by

          I just don't want to get too far down the line and then hear "Well it's too late now because people are used to it this way" 🙂

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

            @gtj0 said in RRF 3.1 and DSF Object Models incompatible:

            @dc42 and @chrishamm ...

            Structure is different.
            Naming is different
            Where naming is the same, the case doesn't match.

            This is going to make it very difficult for folks who have to work with both models.

            Please provide examples so we can bring them into line. Note, the change from the Electronics (DSF) to Boards array (RRF) is deliberate and agreed between me and chrishamm, so expect the next major release of DSF to have this change.

            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
            • gtj0undefined
              gtj0
              last edited by

              Well, all you have to do is compare the 2 json output, but ok...

              RRF: Top level element is "key" with an empty value, then everything is "value"
              DCS: Top level element is "result" with everything under it.

              Apart from the name, electronics/boards is different:
              RRF

                    "Boards" : [
                       {
                          "FirmwareFileName" : "Duet3Firmware_MB6HC.bin",
                          "IAPFileNameSBC" : "Duet3_SBCiap_MB6HC.bin",
                          "IAPFileNameSD" : "Duet3_SDiap_MB6HC.bin",
                          "MaxHeaters" : 16,
                          "MaxMotors" : 6,
                          "Name" : "Duet 3 MB6HC",
                          "ShortName" : "MB6HC"
                       }
                    ],
              

              DCS:

                    "electronics" : {
                       "expansionBoards" : [],
                       "firmware" : {
                          "date" : "2020-01-10b2",
                          "name" : "RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0",
                          "version" : "3.1alpha"
                       },
                       "mcuTemp" : {
                          "current" : 34.4,
                          "max" : 34.5,
                          "min" : 33.7
                       },
                       "name" : "Duet 3 MB6HC",
                       "processorID" : null,
                       "revision" : "0.6",
                       "shortName" : "MB6HC",
                       "type" : "duet3",
                       "vIn" : {
                          "current" : 25.2,
                          "max" : 25.4,
                          "min" : 9.3
                       },
                       "version" : "1.2.3.0"
                    },
              

              Heat is different:
              RRF:

                    "Heat" : {
                       "ColdExtrudeTemperature" : 160,
                       "ColdRetractTemperature" : 90,
                       "Heaters" : [
                          {
                             "Current" : 20.6,
                             "Sensor" : 0,
                             "State" : "Off"
                          },
                          {
                             "Current" : -273.1,
                             "Sensor" : 1,
                             "State" : "Off"
                          }
                       ],
                       "Sensors" : [
                          {
                             "LastReading" : 20.6,
                             "Name" : "Bed",
                             "Type" : "Thermistor"
                          },
                          {
                             "LastReading" : -273.1,
                             "Name" : "HotEnd",
                             "Type" : "Thermistor"
                          },
                          {
                             "LastReading" : 20.2,
                             "Name" : "Bed Check",
                             "Type" : "Thermistor"
                          },
                          {
                             "LastReading" : 19.7,
                             "Name" : "Ambient",
                             "Type" : "Thermistor"
                          }
                       ]
                    },
              
              

              DCS:

                    "heat" : {
                       "beds" : [
                          {
                             "active" : [
                                70
                             ],
                             "heaters" : [
                                0
                             ],
                             "name" : null,
                             "standby" : [
                                55
                             ]
                          }
                       ],
                       "chambers" : [],
                       "coldExtrudeTemperature" : 160,
                       "coldRetractTemperature" : 90,
                       "extra" : [
                          {
                             "current" : 31.8,
                             "name" : "*Bed",
                             "sensor" : null,
                             "state" : null
                          },
                          {
                             "current" : 23.3,
                             "name" : "*HotEnd",
                             "sensor" : null,
                             "state" : null
                          },
                          {
                             "current" : 31.6,
                             "name" : "*Bed Check",
                             "sensor" : null,
                             "state" : null
                          },
                          {
                             "current" : 22.5,
                             "name" : "*Ambient",
                             "sensor" : null,
                             "state" : null
                          }
                       ],
                       "heaters" : [
                          {
                             "current" : 31.8,
                             "max" : 290,
                             "model" : {
                                "customPID" : false,
                                "d" : 0,
                                "deadTime" : null,
                                "gain" : null,
                                "i" : 0,
                                "maxPwm" : null,
                                "p" : 0,
                                "standardVoltage" : null,
                                "timeConstant" : null,
                                "usePID" : true
                             },
                             "name" : "Bed",
                             "sensor" : 0,
                             "state" : 0
                          }
                       ]
                    },
              

              etc...

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

                The values returned by RRF are as documented in the html doc files in the DSF github repo. That's why the names all start with uppercase characters. Chrishamm and I will sort out whether to make everything start with uppercase or not.

                I can easily change RRF to return "result" instead of "value". "key" is the query string you sent in the M408 P1 F parameter. It's needed when using a serial connection, so that you can tie up a response with the original query, allowing for possibly delayed or lost responses.

                RRF doesn't yet implement the entire OM documented in the DSF project, which is why DSF has some fields not yet present in RRF. Likewise, DSF lacks some important properties that I have included in RRF, for example Heat.Sensors. These will be added to DSF.

                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
                • dc42undefined
                  dc42 administrators
                  last edited by

                  The latest RRF commit uses camelCase for the property names instead of UpperCase. It also replaces M408 P1 by M409 and replaces "value" by "result" in the returned JSON object.

                  I've added some more values to the RRF ON, but there are still values in DSF not in the RRF OM (mostly because I haven't implemented them yet), and vice versa (because features have been added to RRF after the DSF OM was designed).

                  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

                  wilrikerundefined 1 Reply Last reply Reply Quote 0
                  • wilrikerundefined
                    wilriker @dc42
                    last edited by

                    @dc42 said in RRF 3.1 and DSF Object Models incompatible:

                    It also replaces M408 P1 by M409 and replaces "value" by "result" in the returned JSON object.

                    There's a bug with that. Here is how my result output starts:

                    {"key":""{"flags":"","result":{"boards":
                    

                    This is no valid JSON because there is a { instead of , after the value for "key" and "flags".

                    Manuel
                    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                    with probably always latest firmware/DWC (incl. betas or self-compiled)
                    My Tool Collection

                    1 Reply Last reply Reply Quote 0
                    • wilrikerundefined
                      wilriker
                      last edited by

                      Also not very important but nevertheless:

                      {
                          "lastReading": 0.0,
                          "name": "TMC",
                          "type": "TMC2660 temperature warnings"
                      },
                      

                      type is not correct for Maestro/Duet 3 boards.

                      Manuel
                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                      My Tool Collection

                      1 Reply Last reply Reply Quote 0
                      • gtj0undefined
                        gtj0
                        last edited by

                        Oh one of the most critical things is for @dc42 and @chrishamm to get the PID parameters sorted. Right now issuing an M500 overwrites an existing config-override.g with...

                        ; config-override.g file generated in response to M500 at 2020-01-14 11:04
                        
                        ; Heater model parameters
                        M307 H0 A C D S V B0
                        M307 H1 A C D S V B0
                        ; Workplace coordinates
                        
                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA